76 references to HasExplicitDefaultValue
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_Conversions.cs (2)
2381if (lambdaParameter.HasExplicitDefaultValue && 2384var delegateParamDefault = delegateParameter.HasExplicitDefaultValue ? delegateParameter.ExplicitDefaultConstantValue : null;
Binder\Binder_Expressions.cs (1)
11192var parameterDefaultValues = parameters.Any(p => p.HasExplicitDefaultValue) ?
Symbols\ParameterSymbol.cs (2)
221/// Returns the default value of the parameter. If <see cref="HasExplicitDefaultValue"/> 235if (HasExplicitDefaultValue)
Symbols\PublicModel\ParameterSymbol.cs (1)
77bool IParameterSymbol.HasExplicitDefaultValue => _underlying.HasExplicitDefaultValue;
Symbols\Source\SourceComplexParameterSymbol.cs (4)
1074else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1102else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1135else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1176else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenOverridingAndHiding.cs (2)
4114Assert.False(parameterA.HasExplicitDefaultValue, "ParameterArray param has default value"); 4122Assert.False(parameterB.HasExplicitDefaultValue, "ParameterArray param has default value");
Emit\NoPiaEmbedTypes.cs (2)
5892Assert.False(p.HasExplicitDefaultValue); 5961Assert.False(p.HasExplicitDefaultValue);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Attributes\AttributeTests_WellKnownAttributes.cs (5)
864Assert.False(ps[0].HasExplicitDefaultValue); 930Assert.False(ps[0].HasExplicitDefaultValue); 1019Assert.False(ps[0].HasExplicitDefaultValue); 1063Assert.False(ps[0].HasExplicitDefaultValue); 9747Assert.False(param.HasExplicitDefaultValue);
Semantics\InlineArrayTests.cs (3)
17280Assert.True(a.Parameters[2].HasExplicitDefaultValue); 17309Assert.True(a.Parameters[1].HasExplicitDefaultValue); 17348Assert.True(a.Parameters[1].HasExplicitDefaultValue);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (43)
Semantics\InterpolationTests.cs (2)
18711Assert.True(a.Parameters[1].HasExplicitDefaultValue); 18747Assert.True(a.Parameters[1].HasExplicitDefaultValue);
Semantics\LambdaTests.cs (2)
4875Assert.True(parameter.HasExplicitDefaultValue); 4930Assert.True(parameter.HasExplicitDefaultValue);
Semantics\NamedAndOptionalTests.cs (34)
2053Assert.False(parameters[0].HasExplicitDefaultValue); 2059Assert.True(parameters[1].HasExplicitDefaultValue); 2065Assert.True(parameters[2].HasExplicitDefaultValue); 2071Assert.False(parameters[3].HasExplicitDefaultValue); 2077Assert.False(parameters[4].HasExplicitDefaultValue); 2084Assert.False(parameters[5].HasExplicitDefaultValue); 2091Assert.True(parameters[6].HasExplicitDefaultValue); 2097Assert.True(parameters[7].HasExplicitDefaultValue); 2135Assert.False(parameters[0].HasExplicitDefaultValue); 2141Assert.True(parameters[1].HasExplicitDefaultValue); 2147Assert.False(parameters[2].HasExplicitDefaultValue); 2186Assert.False(parameters[0].HasExplicitDefaultValue); 2192Assert.True(parameters[1].HasExplicitDefaultValue); 2198Assert.True(parameters[2].HasExplicitDefaultValue); 2204Assert.False(parameters[3].HasExplicitDefaultValue); 2210Assert.False(parameters[4].HasExplicitDefaultValue); 2217Assert.True(parameters[5].HasExplicitDefaultValue); 2223Assert.False(parameters[6].HasExplicitDefaultValue); 2230Assert.True(parameters[7].HasExplicitDefaultValue); 2269Assert.False(parameters[0].HasExplicitDefaultValue); 2275Assert.True(parameters[1].HasExplicitDefaultValue); 2281Assert.True(parameters[2].HasExplicitDefaultValue); 2287Assert.False(parameters[3].HasExplicitDefaultValue); 2293Assert.False(parameters[4].HasExplicitDefaultValue); 2300Assert.False(parameters[5].HasExplicitDefaultValue); 2307Assert.True(parameters[6].HasExplicitDefaultValue); 2313Assert.True(parameters[7].HasExplicitDefaultValue); 2351Assert.False(parameters[0].HasExplicitDefaultValue); 2357Assert.True(parameters[1].HasExplicitDefaultValue); 2363Assert.False(parameters[2].HasExplicitDefaultValue); 2369Assert.False(parameters[3].HasExplicitDefaultValue); 2376Assert.False(parameters[4].HasExplicitDefaultValue); 2383Assert.True(parameters[5].HasExplicitDefaultValue); 2389Assert.True(parameters[6].HasExplicitDefaultValue);
Semantics\SemanticErrorTests.cs (1)
25123Assert.True(a.Parameters[1].HasExplicitDefaultValue);
Semantics\StructConstructorTests.cs (4)
3553Assert.True(g1.Parameters[0].HasExplicitDefaultValue); 3558Assert.True(g2.Parameters[0].HasExplicitDefaultValue); 3580Assert.True(g1.Parameters[0].HasExplicitDefaultValue); 3585Assert.True(g2.Parameters[0].HasExplicitDefaultValue);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\CompilationCreationTests.cs (2)
2355Assert.False(x1.HasExplicitDefaultValue); 2368Assert.True(x4.HasExplicitDefaultValue);
Symbols\ExtensionMethodTests.cs (1)
4129Assert.True(a.Parameters[1].HasExplicitDefaultValue);
Symbols\IndexerTests.cs (1)
2958Assert.True(a.Parameters[1].HasExplicitDefaultValue);
Symbols\Metadata\MetadataMemberTests.cs (2)
280Assert.False(p4.HasExplicitDefaultValue); 377Assert.False(p2.HasExplicitDefaultValue);
Symbols\Metadata\PE\LoadingMethods.cs (4)
118Assert.False(basicC1_M1.Parameters[0].HasExplicitDefaultValue); 122Assert.False(basicC1_M2.Parameters[0].HasExplicitDefaultValue); 125Assert.True(basicC1_M3.Parameters[0].HasExplicitDefaultValue); 128Assert.False(basicC1_M4.Parameters[0].HasExplicitDefaultValue);
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
207Assert.False(p1.HasExplicitDefaultValue, "Parameter has default value");