9 overrides of ExplicitDefaultConstantValue
Microsoft.CodeAnalysis.CSharp (9)
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
83internal override ConstantValue? ExplicitDefaultConstantValue => null;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
554internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\SignatureOnlyParameterSymbol.cs (1)
79internal override ConstantValue ExplicitDefaultConstantValue { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Source\SourceClonedParameterSymbol.cs (1)
74internal override ConstantValue ExplicitDefaultConstantValue
Symbols\Source\SourceComplexParameterSymbol.cs (1)
91internal sealed override ConstantValue ExplicitDefaultConstantValue
Symbols\Source\SourceSimpleParameterSymbol.cs (1)
48internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\Source\ThisParameterSymbol.cs (1)
23internal sealed override ConstantValue? ExplicitDefaultConstantValue
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
83internal override ConstantValue? ExplicitDefaultConstantValue
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
79internal sealed override ConstantValue? ExplicitDefaultConstantValue
64 references to ExplicitDefaultConstantValue
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder_Conversions.cs (3)
2343if (delegateParameter.ExplicitDefaultConstantValue is { } defaultValue && 2382lambdaParameter.ExplicitDefaultConstantValue is { IsBad: false } lambdaParamDefault) 2384var delegateParamDefault = delegateParameter.HasExplicitDefaultValue ? delegateParameter.ExplicitDefaultConstantValue : null;
Binder\Binder_Expressions.cs (1)
11193parameters.SelectAsArray(p => p.ExplicitDefaultConstantValue) :
Binder\Binder_Invocation.cs (1)
1665var parameterDefaultValue = parameter.ExplicitDefaultConstantValue;
Binder\Semantics\Conversions\Conversions.cs (1)
75var defaultValue = p.ExplicitDefaultConstantValue;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
525x.ExplicitDefaultConstantValue == y.ExplicitDefaultConstantValue &&
Emitter\Model\ParameterSymbolAdapter.cs (4)
84ConstantValue constant = AdaptedParameterSymbol.ExplicitDefaultConstantValue; 243return this.ExplicitDefaultConstantValue != null && 244this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_Decimal && 245this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_DateTime;
FlowAnalysis\NullableWalker.cs (1)
3000isDefaultValue: parameter.ExplicitDefaultConstantValue?.IsNull == true);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
129p.ExplicitDefaultConstantValue,
Symbols\MemberSignatureComparer.cs (2)
760if (considerDefaultValues && param1.ExplicitDefaultConstantValue != param2.ExplicitDefaultConstantValue)
Symbols\ParameterSymbol.cs (3)
201[MemberNotNullWhen(true, nameof(ExplicitDefaultConstantValue))] 216return IsOptional && ExplicitDefaultConstantValue != null; 237return ExplicitDefaultConstantValue.Value;
Symbols\Source\SourceClonedParameterSymbol.cs (1)
79return _suppressOptional ? _originalParam.DefaultValueFromAttributes : _originalParam.ExplicitDefaultConstantValue;
Symbols\Source\SourceParameterSymbolBase.cs (1)
89var defaultValue = parameter.ExplicitDefaultConstantValue;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
318oldParam.ExplicitDefaultConstantValue,
Symbols\Wrapped\WrappedParameterSymbol.cs (1)
81get { return _underlyingParameter.ExplicitDefaultConstantValue; }
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenOverridingAndHiding.cs (1)
4123Assert.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)
127Assert.Null(symbol.ExplicitDefaultConstantValue);