9 overrides of ExplicitDefaultConstantValue
Microsoft.CodeAnalysis.CSharp (9)
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
79internal override ConstantValue? ExplicitDefaultConstantValue => null;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
537internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\SignatureOnlyParameterSymbol.cs (1)
70internal override ConstantValue ExplicitDefaultConstantValue { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourceClonedParameterSymbol.cs (1)
67internal override ConstantValue ExplicitDefaultConstantValue
Symbols\Source\SourceComplexParameterSymbol.cs (1)
84internal sealed override ConstantValue ExplicitDefaultConstantValue
Symbols\Source\SourceSimpleParameterSymbol.cs (1)
30internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\Source\ThisParameterSymbol.cs (1)
73internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
78internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
79internal sealed override ConstantValue? ExplicitDefaultConstantValue
62 references to ExplicitDefaultConstantValue
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Conversions.cs (3)
794if (delegateParameter.ExplicitDefaultConstantValue is { } defaultValue && 833lambdaParameter.ExplicitDefaultConstantValue is { IsBad: false } lambdaParamDefault) 835var delegateParamDefault = delegateParameter.HasExplicitDefaultValue ? delegateParameter.ExplicitDefaultConstantValue : null;
Binder\Binder_Expressions.cs (1)
9200parameters.SelectAsArray(p => p.ExplicitDefaultConstantValue) :
Binder\Binder_Invocation.cs (1)
1356var parameterDefaultValue = parameter.ExplicitDefaultConstantValue;
Binder\Semantics\Conversions\Conversions.cs (1)
75var defaultValue = p.ExplicitDefaultConstantValue;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
728x.ExplicitDefaultConstantValue == y.ExplicitDefaultConstantValue &&
Emitter\Model\ParameterSymbolAdapter.cs (4)
81ConstantValue constant = AdaptedParameterSymbol.ExplicitDefaultConstantValue; 240return this.ExplicitDefaultConstantValue != null && 241this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_Decimal && 242this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_DateTime;
FlowAnalysis\NullableWalker.cs (1)
2759isDefaultValue: parameter.ExplicitDefaultConstantValue?.IsNull == true);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
140p.ExplicitDefaultConstantValue,
Symbols\ParameterSymbol.cs (3)
187[MemberNotNullWhen(true, nameof(ExplicitDefaultConstantValue))] 202return IsOptional && ExplicitDefaultConstantValue != null; 223return ExplicitDefaultConstantValue.Value;
Symbols\Source\SourceClonedParameterSymbol.cs (1)
72return _suppressOptional ? _originalParam.DefaultValueFromAttributes : _originalParam.ExplicitDefaultConstantValue;
Symbols\Source\SourceParameterSymbolBase.cs (1)
81var defaultValue = this.ExplicitDefaultConstantValue;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
293oldParam.ExplicitDefaultConstantValue,
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
81get { return _underlyingParameter.ExplicitDefaultConstantValue; }
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenOverridingAndHiding.cs (1)
4119Assert.Equal(ConstantValue.Null, parameterB.ExplicitDefaultConstantValue);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (39)
Semantics\NamedAndOptionalTests.cs (35)
2055Assert.Null(parameters[0].ExplicitDefaultConstantValue); 2061Assert.Equal(ConstantValue.Create(0), parameters[1].ExplicitDefaultConstantValue); 2067Assert.Equal(ConstantValue.Create(1), parameters[2].ExplicitDefaultConstantValue); 2073Assert.Null(parameters[3].ExplicitDefaultConstantValue); 2080Assert.Equal(ConstantValue.Create(0), parameters[4].ExplicitDefaultConstantValue); 2087Assert.Equal(ConstantValue.Create(1), parameters[5].ExplicitDefaultConstantValue); 2093Assert.Equal(ConstantValue.Create(0), parameters[6].ExplicitDefaultConstantValue); 2099Assert.Equal(ConstantValue.Create(1), parameters[7].ExplicitDefaultConstantValue); 2136Assert.Null(parameters[0].ExplicitDefaultConstantValue); 2143Assert.Equal(ConstantValue.Null, parameters[1].ExplicitDefaultConstantValue); 2149Assert.Null(parameters[2].ExplicitDefaultConstantValue); 2188Assert.Null(parameters[0].ExplicitDefaultConstantValue); 2194Assert.Equal(ConstantValue.Null, parameters[1].ExplicitDefaultConstantValue); 2200Assert.Equal(ConstantValue.Create("A"), parameters[2].ExplicitDefaultConstantValue); 2206Assert.Null(parameters[3].ExplicitDefaultConstantValue); 2213Assert.Equal(ConstantValue.Null, parameters[4].ExplicitDefaultConstantValue); 2219Assert.Equal(ConstantValue.Null, parameters[5].ExplicitDefaultConstantValue); 2226Assert.Equal(ConstantValue.Create("A"), parameters[6].ExplicitDefaultConstantValue); 2232Assert.Equal(ConstantValue.Create("A"), parameters[7].ExplicitDefaultConstantValue); // not imported for non-optional parameter 2271Assert.Null(parameters[0].ExplicitDefaultConstantValue); 2277Assert.Equal(ConstantValue.Create(0M), parameters[1].ExplicitDefaultConstantValue); 2283Assert.Equal(ConstantValue.Create(1M), parameters[2].ExplicitDefaultConstantValue); 2289Assert.Null(parameters[3].ExplicitDefaultConstantValue); 2296Assert.Equal(isFromSource ? ConstantValue.Create(0M) : null, parameters[4].ExplicitDefaultConstantValue); // not imported for non-optional parameter 2303Assert.Equal(isFromSource ? ConstantValue.Create(1M) : null, parameters[5].ExplicitDefaultConstantValue); // not imported for non-optional parameter 2309Assert.Equal(ConstantValue.Create(0M), parameters[6].ExplicitDefaultConstantValue); 2315Assert.Equal(ConstantValue.Create(1M), parameters[7].ExplicitDefaultConstantValue); 2353Assert.Null(parameters[0].ExplicitDefaultConstantValue); 2359Assert.Equal(ConstantValue.Null, parameters[1].ExplicitDefaultConstantValue); 2365Assert.Null(parameters[2].ExplicitDefaultConstantValue); 2372Assert.Equal(isFromSource ? ConstantValue.Create(new DateTime(0)) : null, parameters[3].ExplicitDefaultConstantValue); // not imported for non-optional parameter 2379Assert.Equal(isFromSource ? ConstantValue.Create(new DateTime(1)) : null, parameters[4].ExplicitDefaultConstantValue); // not imported for non-optional parameter 2385Assert.Equal(ConstantValue.Create(new DateTime(0)), parameters[5].ExplicitDefaultConstantValue); 2391Assert.Equal(ConstantValue.Create(new DateTime(1)), parameters[6].ExplicitDefaultConstantValue); 2463Assert.Equal(ConstantValue.Bad, param.ExplicitDefaultConstantValue);
Semantics\StructConstructorTests.cs (4)
3555Assert.True(g1.Parameters[0].ExplicitDefaultConstantValue.IsNull); 3560Assert.True(g2.Parameters[0].ExplicitDefaultConstantValue.IsNull); 3582Assert.False(g1.Parameters[0].ExplicitDefaultConstantValue.IsNull); 3587Assert.False(g2.Parameters[0].ExplicitDefaultConstantValue.BooleanValue);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
FunctionPointerUtilities.cs (1)
125Assert.Null(symbol.ExplicitDefaultConstantValue);