9 overrides of ExplicitDefaultConstantValue
Microsoft.CodeAnalysis.CSharp (9)
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
83
internal override ConstantValue?
ExplicitDefaultConstantValue
=> null;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
554
internal sealed override ConstantValue?
ExplicitDefaultConstantValue
Symbols\SignatureOnlyParameterSymbol.cs (1)
79
internal override ConstantValue
ExplicitDefaultConstantValue
{ get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourceClonedParameterSymbol.cs (1)
75
internal override ConstantValue?
ExplicitDefaultConstantValue
Symbols\Source\SourceComplexParameterSymbol.cs (1)
94
internal sealed override ConstantValue?
ExplicitDefaultConstantValue
Symbols\Source\SourceSimpleParameterSymbol.cs (1)
48
internal override ConstantValue?
ExplicitDefaultConstantValue
Symbols\Source\ThisParameterSymbol.cs (1)
23
internal sealed override ConstantValue?
ExplicitDefaultConstantValue
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
83
internal override ConstantValue?
ExplicitDefaultConstantValue
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
79
internal sealed override ConstantValue?
ExplicitDefaultConstantValue
65 references to ExplicitDefaultConstantValue
Microsoft.CodeAnalysis.CSharp (24)
Binder\Binder_Conversions.cs (3)
2325
if (delegateParameter.
ExplicitDefaultConstantValue
is { } defaultValue &&
2364
lambdaParameter.
ExplicitDefaultConstantValue
is { IsBad: false } lambdaParamDefault)
2366
var delegateParamDefault = delegateParameter.HasExplicitDefaultValue ? delegateParameter.
ExplicitDefaultConstantValue
: null;
Binder\Binder_Expressions.cs (1)
11191
parameters.SelectAsArray(p => p.
ExplicitDefaultConstantValue
) :
Binder\Binder_Invocation.cs (1)
1671
var parameterDefaultValue = parameter.
ExplicitDefaultConstantValue
;
Binder\Semantics\Conversions\Conversions.cs (1)
75
var defaultValue = p.
ExplicitDefaultConstantValue
;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
532
x.
ExplicitDefaultConstantValue
== y.
ExplicitDefaultConstantValue
&&
Emitter\Model\ParameterSymbolAdapter.cs (4)
84
ConstantValue constant = AdaptedParameterSymbol.
ExplicitDefaultConstantValue
;
243
return this.
ExplicitDefaultConstantValue
!= null &&
244
this.
ExplicitDefaultConstantValue
.SpecialType != SpecialType.System_Decimal &&
245
this.
ExplicitDefaultConstantValue
.SpecialType != SpecialType.System_DateTime;
FlowAnalysis\NullableWalker.cs (1)
3000
isDefaultValue: parameter.
ExplicitDefaultConstantValue
?.IsNull == true);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
129
p.
ExplicitDefaultConstantValue
,
Symbols\MemberSignatureComparer.cs (2)
760
if (considerDefaultValues && param1.
ExplicitDefaultConstantValue
!= param2.
ExplicitDefaultConstantValue
)
Symbols\ParameterSymbol.cs (3)
201
[MemberNotNullWhen(true, nameof(
ExplicitDefaultConstantValue
))]
216
return IsOptional &&
ExplicitDefaultConstantValue
!= null;
237
return
ExplicitDefaultConstantValue
.Value;
Symbols\Source\SourceClonedParameterSymbol.cs (1)
80
return _suppressOptional ? _originalParam.DefaultValueFromAttributes : _originalParam.
ExplicitDefaultConstantValue
;
Symbols\Source\SourceParameterSymbolBase.cs (1)
87
var defaultValue = parameter.
ExplicitDefaultConstantValue
;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
318
oldParam.
ExplicitDefaultConstantValue
,
364
Debug.Assert(baseParameterForAttributes is null || baseParameterForAttributes.
ExplicitDefaultConstantValue
== defaultValue);
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
81
get { return _underlyingParameter.
ExplicitDefaultConstantValue
; }
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenOverridingAndHiding.cs (1)
4123
Assert.Equal(ConstantValue.Null, parameterB.
ExplicitDefaultConstantValue
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (39)
Semantics\NamedAndOptionalTests.cs (35)
2055
Assert.Null(parameters[0].
ExplicitDefaultConstantValue
);
2061
Assert.Equal(ConstantValue.Create(0), parameters[1].
ExplicitDefaultConstantValue
);
2067
Assert.Equal(ConstantValue.Create(1), parameters[2].
ExplicitDefaultConstantValue
);
2073
Assert.Null(parameters[3].
ExplicitDefaultConstantValue
);
2080
Assert.Equal(ConstantValue.Create(0), parameters[4].
ExplicitDefaultConstantValue
);
2087
Assert.Equal(ConstantValue.Create(1), parameters[5].
ExplicitDefaultConstantValue
);
2093
Assert.Equal(ConstantValue.Create(0), parameters[6].
ExplicitDefaultConstantValue
);
2099
Assert.Equal(ConstantValue.Create(1), parameters[7].
ExplicitDefaultConstantValue
);
2136
Assert.Null(parameters[0].
ExplicitDefaultConstantValue
);
2143
Assert.Equal(ConstantValue.Null, parameters[1].
ExplicitDefaultConstantValue
);
2149
Assert.Null(parameters[2].
ExplicitDefaultConstantValue
);
2188
Assert.Null(parameters[0].
ExplicitDefaultConstantValue
);
2194
Assert.Equal(ConstantValue.Null, parameters[1].
ExplicitDefaultConstantValue
);
2200
Assert.Equal(ConstantValue.Create("A"), parameters[2].
ExplicitDefaultConstantValue
);
2206
Assert.Null(parameters[3].
ExplicitDefaultConstantValue
);
2213
Assert.Equal(ConstantValue.Null, parameters[4].
ExplicitDefaultConstantValue
);
2219
Assert.Equal(ConstantValue.Null, parameters[5].
ExplicitDefaultConstantValue
);
2226
Assert.Equal(ConstantValue.Create("A"), parameters[6].
ExplicitDefaultConstantValue
);
2232
Assert.Equal(ConstantValue.Create("A"), parameters[7].
ExplicitDefaultConstantValue
); // not imported for non-optional parameter
2271
Assert.Null(parameters[0].
ExplicitDefaultConstantValue
);
2277
Assert.Equal(ConstantValue.Create(0M), parameters[1].
ExplicitDefaultConstantValue
);
2283
Assert.Equal(ConstantValue.Create(1M), parameters[2].
ExplicitDefaultConstantValue
);
2289
Assert.Null(parameters[3].
ExplicitDefaultConstantValue
);
2296
Assert.Equal(isFromSource ? ConstantValue.Create(0M) : null, parameters[4].
ExplicitDefaultConstantValue
); // not imported for non-optional parameter
2303
Assert.Equal(isFromSource ? ConstantValue.Create(1M) : null, parameters[5].
ExplicitDefaultConstantValue
); // not imported for non-optional parameter
2309
Assert.Equal(ConstantValue.Create(0M), parameters[6].
ExplicitDefaultConstantValue
);
2315
Assert.Equal(ConstantValue.Create(1M), parameters[7].
ExplicitDefaultConstantValue
);
2353
Assert.Null(parameters[0].
ExplicitDefaultConstantValue
);
2359
Assert.Equal(ConstantValue.Null, parameters[1].
ExplicitDefaultConstantValue
);
2365
Assert.Null(parameters[2].
ExplicitDefaultConstantValue
);
2372
Assert.Equal(isFromSource ? ConstantValue.Create(new DateTime(0)) : null, parameters[3].
ExplicitDefaultConstantValue
); // not imported for non-optional parameter
2379
Assert.Equal(isFromSource ? ConstantValue.Create(new DateTime(1)) : null, parameters[4].
ExplicitDefaultConstantValue
); // not imported for non-optional parameter
2385
Assert.Equal(ConstantValue.Create(new DateTime(0)), parameters[5].
ExplicitDefaultConstantValue
);
2391
Assert.Equal(ConstantValue.Create(new DateTime(1)), parameters[6].
ExplicitDefaultConstantValue
);
2463
Assert.Equal(ConstantValue.Bad, param.
ExplicitDefaultConstantValue
);
Semantics\StructConstructorTests.cs (4)
3555
Assert.True(g1.Parameters[0].
ExplicitDefaultConstantValue
.IsNull);
3560
Assert.True(g2.Parameters[0].
ExplicitDefaultConstantValue
.IsNull);
3582
Assert.False(g1.Parameters[0].
ExplicitDefaultConstantValue
.IsNull);
3587
Assert.False(g2.Parameters[0].
ExplicitDefaultConstantValue
.BooleanValue);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
FunctionPointerUtilities.cs (1)
127
Assert.Null(symbol.
ExplicitDefaultConstantValue
);