13 overrides of IsInterface
Microsoft.CodeAnalysis.CSharp (13)
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
181
internal sealed override bool
IsInterface
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
216
internal sealed override bool
IsInterface
Symbols\ErrorTypeSymbol.cs (1)
244
internal sealed override bool
IsInterface
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2331
internal sealed override bool
IsInterface
Symbols\Source\SourceMemberContainerSymbol.cs (1)
845
internal sealed override bool
IsInterface
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
211
internal override bool
IsInterface
=> false;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
924
internal override bool
IsInterface
=> false;
Symbols\Synthesized\SynthesizedContainer.cs (1)
48
internal sealed override bool
IsInterface
=> this.TypeKind == TypeKind.Interface;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
148
internal override bool
IsInterface
=> false;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
138
internal override bool
IsInterface
=> false;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
132
internal override bool
IsInterface
=> false;
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
115
internal override bool
IsInterface
=> false;
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
121
internal override bool
IsInterface
109 references to IsInterface
Microsoft.CodeAnalysis.CSharp (109)
Binder\Binder.ValueChecks.cs (2)
3407
if (!_underlyingParameter.ContainingType.
IsInterface
|| _type.IsReferenceType)
3439
if (!_underlyingParameter.ContainingType.
IsInterface
|| _type.IsReferenceType)
Binder\Binder_Conversions.cs (1)
2747
Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.
IsInterface
: true }));
Binder\Binder_Expressions.cs (4)
2028
(currentType.
IsInterface
&& (declaringType.IsObjectType() || currentType.AllInterfacesNoUseSiteDiagnostics.Contains(declaringType))))
2383
(currentType.
IsInterface
&& (declaringType.IsObjectType() || currentType.AllInterfacesNoUseSiteDiagnostics.Contains(declaringType))))
4949
containingType.
IsInterface
);
9326
if (symbol.ContainingType?.
IsInterface
== true)
Binder\Binder_Invocation.cs (1)
1090
if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.
IsInterface
&& !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2))
Binder\Binder_Lookup.cs (5)
1071
Debug.Assert(type.
IsInterface
);
1139
if (@interface.
IsInterface
&& !cycleGuard.ContainsReference(originalDefinition = @interface.OriginalDefinition) && visited.Add(@interface))
1199
Debug.Assert(type.
IsInterface
);
1264
return baseType.
IsInterface
&& GetBaseInterfaces(derivedType, basesBeingResolved, ref useSiteInfo).Contains(baseType);
1291
var hidingContainerIsInterface = hidingContainer.
IsInterface
;
Binder\Binder_Operators.cs (5)
1566
Debug.Assert(!(signature.Method?.ContainingType?.
IsInterface
?? false));
1622
if (type is not NamedTypeSymbol {
IsInterface
: false } namedType || namedType.IsNullableType())
1766
(t.
IsInterface
&& (signature.Method.IsAbstract || signature.Method.IsVirtual) &&
2223
if (operatorMethod.ContainingType.
IsInterface
&&
3996
if (methodOpt?.ContainingType?.
IsInterface
== true && methodOpt.IsStatic)
Binder\Semantics\AccessCheck.cs (2)
557
bool baseTypeIsInterface = baseType.
IsInterface
;
608
if (!currentBase.
IsInterface
)
Binder\Semantics\Conversions\ConversionsBase.cs (3)
3023
Debug.Assert(targetInterfaceType.IsErrorType() || targetInterfaceType.
IsInterface
);
3057
Debug.Assert(targetInterfaceType.IsErrorType() || targetInterfaceType.
IsInterface
);
3260
IsInterface
: true,
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (2)
104
if (declaringType.
IsInterface
)
119
if (declaringType.
IsInterface
)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (2)
257
if (declaringType.
IsInterface
)
272
if (declaringType.
IsInterface
)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
271
if (!@interface.
IsInterface
)
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
716
if (!@interface.
IsInterface
)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
2223
if (constructedSource.
IsInterface
|| constructedSource.IsDelegateType())
2308
if (!target.
IsInterface
)
2623
if (constructedTarget.
IsInterface
|| constructedTarget.IsDelegateType())
2689
if (!source.
IsInterface
)
3156
Debug.Assert(target.
IsInterface
);
Compilation\CSharpCompilation.cs (1)
2032
if (mainType is null || mainType.IsGenericType || (mainType.TypeKind != TypeKind.Class && mainType.TypeKind != TypeKind.Struct && !mainType.
IsInterface
))
Compiler\ClsComplianceChecker.cs (2)
502
if ((object)containingType != null && containingType.
IsInterface
)
518
if (symbol.
IsInterface
)
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
344
if (AdaptedNamedTypeSymbol.
IsInterface
)
381
if (AdaptedNamedTypeSymbol.
IsInterface
)
564
return AdaptedNamedTypeSymbol.
IsInterface
;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
429
bool isInterface = (namedType.
IsInterface
);
FlowAnalysis\NullableWalker.cs (4)
7178
if (implementationMethod.ContainingType.
IsInterface
)
9176
if (symbolContainer.
IsInterface
)
10603
Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.
IsInterface
: true }));
10685
Debug.Assert(factory is { IsStatic: true, ContainingType.
IsInterface
: true });
Lowering\DiagnosticsPass_Warnings.cs (1)
356
if ((object)nt == null || !nt.IsReferenceType || nt.
IsInterface
)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
962
Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.
IsInterface
: true }));
1560
Debug.Assert(conversion.Method is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.
IsInterface
: true }));
1990
Debug.Assert(!meth.ContainingType.
IsInterface
);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
508
if (!receiver.Type.IsReferenceType && method.ContainingType.
IsInterface
)
Symbols\BaseTypeAnalysis.cs (1)
43
if (type.
IsInterface
)
Symbols\ConstraintsHelper.cs (1)
1091
if (typeArgument.Type is NamedTypeSymbol {
IsInterface
: true } iface && SelfOrBaseHasStaticAbstractMember(iface, ref useSiteInfo, out Symbol member))
Symbols\MemberSymbolExtensions.cs (1)
375
Debug.Assert(symbol.ContainingType.
IsInterface
);
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1393
if (!method.ContainingType.
IsInterface
)
1415
if (method.ContainingType.
IsInterface
)
Symbols\Metadata\PE\SymbolFactory.cs (1)
114
if (!typeToCheck.
IsInterface
)
Symbols\MethodSymbolExtensions.cs (1)
222
(containingType.IsStructType() == true || (containingType.
IsInterface
&& method.IsImplementable())) &&
Symbols\NamedTypeSymbol.cs (1)
1986
!type.
IsInterface
||
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
129
if (containingType.
IsInterface
)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
327
bool isInterface = type.
IsInterface
;
522
!genericType.
IsInterface
)
Symbols\Source\ModifierUtils.cs (1)
538
if (symbol.ContainingType?.
IsInterface
== true && !symbol.ContainingAssembly.RuntimeSupportsDefaultInterfaceImplementation)
Symbols\Source\SourceConstructorSymbol.cs (1)
160
bool isInterface = containingType.
IsInterface
;
Symbols\Source\SourceDestructorSymbol.cs (1)
140
var mods = ModifierUtils.MakeAndCheckNonTypeMemberModifiers(isOrdinaryMethod: false, isForInterfaceMember: containingType.
IsInterface
, modifiers, DeclarationModifiers.None, allowedModifiers, location, diagnostics, out modifierErrors, out _);
Symbols\Source\SourceEventSymbol.cs (3)
541
bool isInterface = this.ContainingType.
IsInterface
;
627
Debug.Assert(!IsStatic || ContainingType.
IsInterface
|| (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
631
bool isExplicitInterfaceImplementationInInterface = ContainingType.
IsInterface
&& IsExplicitInterfaceImplementation;
Symbols\Source\SourceMemberContainerSymbol.cs (1)
317
if (((NamedTypeSymbol)containingSymbol).
IsInterface
)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (4)
269
wasImplementingMemberFound && implementingMember.ContainingType.
IsInterface
)
696
if (symbol.ContainingType.
IsInterface
)
1650
if (!hidingMember.ContainingType.
IsInterface
)
1929
if (implementingMethod.ContainingType.
IsInterface
||
Symbols\Source\SourceMemberFieldSymbol.cs (1)
213
bool isInterface = containingType.
IsInterface
;
Symbols\Source\SourceMemberMethodSymbol.cs (2)
573
if (IsExplicitInterfaceImplementation && _containingType.
IsInterface
)
1086
if (_containingType.
IsInterface
)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
632
if (ContainingType.
IsInterface
|| IsExplicitInterfaceImplementation)
1665
return this.ContainingType.
IsInterface
&&
Symbols\Source\SourceOrdinaryMethodSymbol.cs (4)
458
return ModifierUtils.MakeAndCheckNonTypeMemberModifiers(isOrdinaryMethod: true, isForInterfaceMember: containingType.
IsInterface
,
754
bool isInterface = containingType.
IsInterface
;
869
Debug.Assert(!IsStatic || ContainingType.
IsInterface
|| (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
871
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation && ContainingType.
IsInterface
;
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
542
bool isInterface = containingType.
IsInterface
;
Symbols\Source\SourcePropertySymbol.cs (1)
381
bool isInterface = containingType.
IsInterface
;
Symbols\Source\SourcePropertySymbolBase.cs (5)
307
if (ContainingType.
IsInterface
&& !IsStatic)
930
ContainingType.
IsInterface
&&
1108
Debug.Assert(!IsStatic || ContainingType.
IsInterface
|| (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
1110
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation && ContainingType.
IsInterface
;
1643
if (ContainingType.
IsInterface
|| IsExplicitInterfaceImplementation)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (4)
63
if (this.ContainingType.
IsInterface
&&
145
else if (IsSealed && !IsOverride && !(IsExplicitInterfaceImplementation && ContainingType.
IsInterface
&& IsAbstract))
154
else if (IsAbstract && !ContainingType.IsAbstract && !ContainingType.
IsInterface
)
577
return ContainingType.
IsInterface
&& (IsAbstract || IsVirtual);
Symbols\SymbolExtensions.cs (2)
72
if (originalSuperType.
IsInterface
)
528
return !symbol.IsSealed && (symbol.IsAbstract || symbol.IsVirtual) && (symbol.ContainingType?.
IsInterface
?? false);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (4)
488
Debug.Assert(interfaceType.
IsInterface
);
587
Debug.Assert(interfaceType.
IsInterface
);
653
Debug.Assert(interfaceType.
IsInterface
);
737
Debug.Assert(interfaceType.
IsInterface
);
Symbols\TypeSymbol.cs (6)
735
if ((object)interfaceType == null || !interfaceType.
IsInterface
)
814
Debug.Assert((object)interfaceType != null && interfaceType.
IsInterface
);
1102
return !symbolAndDiagnostics.Symbol.ContainingType.
IsInterface
;
1275
if (!interfaceType.
IsInterface
)
1385
Debug.Assert(interfaceType.
IsInterface
);
1569
if ((object)implementingPropertyOrEvent != null && !implementingPropertyOrEvent.ContainingType.
IsInterface
)
Symbols\TypeSymbolExtensions.cs (3)
31
if (@interface.
IsInterface
&& TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2))
352
return type.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)type).
IsInterface
;
2264
return type is NamedTypeSymbol { Name: "INumberBase",
IsInterface
: true, Arity: 1, ContainingType: null } &&
Symbols\VarianceSafety.cs (1)
31
Debug.Assert((object)interfaceType != null && interfaceType.
IsInterface
);
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
125
return _underlyingType.
IsInterface
;