68 references to HasExplicitDefaultValue
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_Conversions.cs (2)
832if (lambdaParameter.HasExplicitDefaultValue && 835var delegateParamDefault = delegateParameter.HasExplicitDefaultValue ? delegateParameter.ExplicitDefaultConstantValue : null;
Binder\Binder_Expressions.cs (1)
9199var parameterDefaultValues = parameters.Any(p => p.HasExplicitDefaultValue) ?
Symbols\ParameterSymbol.cs (2)
207/// Returns the default value of the parameter. If <see cref="HasExplicitDefaultValue"/> 221if (HasExplicitDefaultValue)
Symbols\PublicModel\ParameterSymbol.cs (1)
73bool IParameterSymbol.HasExplicitDefaultValue => _underlying.HasExplicitDefaultValue;
Symbols\Source\SourceComplexParameterSymbol.cs (4)
1065else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1093else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1126else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1167else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenOverridingAndHiding.cs (2)
4112Assert.False(parameterA.HasExplicitDefaultValue, "ParameterArray param has default value"); 4118Assert.False(parameterB.HasExplicitDefaultValue, "ParameterArray param has default value");
Emit\NoPiaEmbedTypes.cs (2)
5675Assert.False(p.HasExplicitDefaultValue); 5744Assert.False(p.HasExplicitDefaultValue);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (5)
Attributes\AttributeTests_WellKnownAttributes.cs (5)
863Assert.False(ps[0].HasExplicitDefaultValue); 929Assert.False(ps[0].HasExplicitDefaultValue); 1018Assert.False(ps[0].HasExplicitDefaultValue); 1062Assert.False(ps[0].HasExplicitDefaultValue); 9659Assert.False(param.HasExplicitDefaultValue);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (40)
Semantics\LambdaTests.cs (2)
4860Assert.True(parameter.HasExplicitDefaultValue); 4888Assert.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\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 (9)
Symbols\CompilationCreationTests.cs (2)
2354Assert.False(x1.HasExplicitDefaultValue); 2367Assert.True(x4.HasExplicitDefaultValue);
Symbols\Metadata\MetadataMemberTests.cs (2)
278Assert.False(p4.HasExplicitDefaultValue); 373Assert.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)
206Assert.False(p1.HasExplicitDefaultValue, "Parameter has default value");