4 overrides of IsOptional
Microsoft.CodeAnalysis.CSharp (2)
Symbols\CustomModifier.cs (2)
79public override bool IsOptional 111public override bool IsOptional
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\CustomModifier.vb (2)
69Public Overrides ReadOnly Property IsOptional As Boolean 97Public Overrides ReadOnly Property IsOptional As Boolean
38 references to IsOptional
Microsoft.CodeAnalysis (1)
Symbols\CustomModifier.cs (1)
29return this.IsOptional;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
73=> x.IsOptional == y.IsOptional && AreEquivalent(x.Modifier, y.Modifier, equivalentTypesWithDifferingAssemblies);
Microsoft.CodeAnalysis.CSharp (15)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
461return modifier.IsOptional ? 952return modifier.IsOptional ?
Emitter\Model\CustomModifierAdapter.cs (1)
17get { return this.IsOptional; }
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
1075this.Builder.Add(CreatePart(InternalSymbolDisplayPartKind.Other, null, customModifier.IsOptional ? IL_KEYWORD_MODOPT : IL_KEYWORD_MODREQ));
Symbols\AbstractTypeMap.cs (2)
150builder.Add(customModifiers[i].IsOptional ? CSharpCustomModifier.CreateOptional(substituted) : CSharpCustomModifier.CreateRequired(substituted)); 158builder.Add(customModifiers[i].IsOptional ? CSharpCustomModifier.CreateOptional(substituted) : CSharpCustomModifier.CreateRequired(substituted));
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
790parameter.RefCustomModifiers.Any(static m => !m.IsOptional))
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
325if (targetCustomModifier.IsOptional != candidateCustomModifier.IsOptional ||
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
329_packedFlags.SetIsVolatile(customModifiersArray.Any(static m => !m.IsOptional && ((CSharpCustomModifier)m).ModifierSymbol.SpecialType == SpecialType.System_Runtime_CompilerServices_IsVolatile));
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
731newModifiers.Add(oldModifier.IsOptional ?
Symbols\Source\CustomModifierUtils.cs (4)
160return modifiers.Any(static modifier => !modifier.IsOptional && ((CSharpCustomModifier)modifier).ModifierSymbol.IsWellKnownTypeInAttribute()); 165return modifiers.Any(static modifier => modifier.IsOptional && ((CSharpCustomModifier)modifier).ModifierSymbol.IsWellKnownTypeRequiresLocationAttribute()); 170return modifiers.Any(static modifier => !modifier.IsOptional && ((CSharpCustomModifier)modifier).ModifierSymbol.IsWellKnownTypeIsExternalInit()); 175return modifiers.Any(static modifier => !modifier.IsOptional && ((CSharpCustomModifier)modifier).ModifierSymbol.IsWellKnownTypeOutAttribute());
Symbols\Symbol.cs (1)
1275if (checkRequiredModifiers && !modifier.IsOptional)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenFunctionPointersTests.cs (2)
709Assert.True(firstMod.IsOptional); 716Assert.False(inMod.IsOptional);
Emit\EmitMetadataTests.cs (1)
575Assert.False(mod.IsOptional);
Emit\InAttributeModifierTests.cs (1)
4568Assert.False(modifier.IsOptional);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
RefReadonlyParameterTests.cs (1)
108Assert.Equal(optional, mod.IsOptional);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Metadata\PE\LoadingFields.cs (1)
106Assert.False(mod.IsOptional);
Symbols\Source\FieldTests.cs (1)
156Assert.False(mod.IsOptional);
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2371=> oldModifier.IsOptional == newModifier.IsOptional &&
Microsoft.CodeAnalysis.VisualBasic (9)
Emit\CustomModifierAdapter.vb (1)
15Return Me.IsOptional
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (2)
351Return If(modifier.IsOptional, 625Return If(modifier.IsOptional,
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
584Me.Builder.Add(CreatePart(InternalSymbolDisplayPartKind.Other, Nothing, If(customModifier.IsOptional, IL_KEYWORD_MODOPT, IL_KEYWORD_MODREQ), True))
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (1)
264If targetCustomModifier.IsOptional <> candidateCustomModifier.IsOptional OrElse
Symbols\Retargeting\RetargetingSymbolTranslator.vb (1)
618newModifiers.Add(If(oldModifiers(i).IsOptional,
Symbols\Symbol.vb (1)
1093If Not modifier.IsOptional AndAlso
Symbols\TypeSubstitution.vb (2)
882builder.Add(If(customModifiers(i).IsOptional, VisualBasicCustomModifier.CreateOptional(substituted), VisualBasicCustomModifier.CreateRequired(substituted))) 889builder.Add(If(customModifiers(j).IsOptional, VisualBasicCustomModifier.CreateOptional(substituted), VisualBasicCustomModifier.CreateRequired(substituted)))
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
73=> x.IsOptional == y.IsOptional && AreEquivalent(x.Modifier, y.Modifier, equivalentTypesWithDifferingAssemblies);