10 overrides of IsInterface
Microsoft.CodeAnalysis.CSharp (8)
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
164
internal sealed override bool
IsInterface
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
198
internal sealed override bool
IsInterface
Symbols\ErrorTypeSymbol.cs (1)
231
internal sealed override bool
IsInterface
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1796
internal sealed override bool
IsInterface
Symbols\Source\SourceMemberContainerSymbol.cs (1)
778
internal sealed override bool
IsInterface
Symbols\Synthesized\SynthesizedContainer.cs (1)
56
internal sealed override bool
IsInterface
=> this.TypeKind == TypeKind.Interface;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
126
internal override bool
IsInterface
=> false;
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
119
internal override bool
IsInterface
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\EENamedTypeSymbol.cs (1)
344
internal override bool
IsInterface
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\MockNamedTypeSymbol.cs (1)
149
internal override bool
IsInterface
90 references to IsInterface
Microsoft.CodeAnalysis.CSharp (86)
Binder\Binder_Expressions.cs (4)
1767
(currentType.
IsInterface
&& (declaringType.IsObjectType() || currentType.AllInterfacesNoUseSiteDiagnostics.Contains(declaringType))))
2075
(currentType.
IsInterface
&& (declaringType.IsObjectType() || currentType.AllInterfacesNoUseSiteDiagnostics.Contains(declaringType))))
4153
containingType.
IsInterface
);
7611
if (symbol.ContainingType?.
IsInterface
== true)
Binder\Binder_Lookup.cs (5)
1025
Debug.Assert(type.
IsInterface
);
1093
if (@interface.
IsInterface
&& !cycleGuard.ContainsReference(originalDefinition = @interface.OriginalDefinition) && visited.Add(@interface))
1153
Debug.Assert(type.
IsInterface
);
1218
return baseType.
IsInterface
&& GetBaseInterfaces(derivedType, basesBeingResolved, ref useSiteInfo).Contains(baseType);
1245
var hidingContainerIsInterface = hidingContainer.
IsInterface
;
Binder\Binder_Operators.cs (4)
999
Debug.Assert(!(signature.Method?.ContainingType?.
IsInterface
?? false));
1129
(t.
IsInterface
&& (signature.Method.IsAbstract || signature.Method.IsVirtual) &&
1347
if (operatorMethod.ContainingType.
IsInterface
&&
2353
if (methodOpt?.ContainingType?.
IsInterface
== true && methodOpt.IsStatic)
Binder\Semantics\AccessCheck.cs (2)
556
bool baseTypeIsInterface = baseType.
IsInterface
;
607
if (!currentBase.
IsInterface
)
Binder\Semantics\Conversions\ConversionsBase.cs (1)
3016
IsInterface
: true,
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (2)
104
if (declaringType.
IsInterface
)
119
if (declaringType.
IsInterface
)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (2)
252
if (declaringType.
IsInterface
)
267
if (declaringType.
IsInterface
)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
258
if (!@interface.
IsInterface
)
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
435
if (!@interface.
IsInterface
)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
1999
if (constructedSource.
IsInterface
|| constructedSource.IsDelegateType())
2084
if (!target.
IsInterface
)
2399
if (constructedTarget.
IsInterface
|| constructedTarget.IsDelegateType())
2465
if (!source.
IsInterface
)
2950
Debug.Assert(target.
IsInterface
);
Compilation\CSharpCompilation.cs (1)
1773
if (mainType is null || mainType.IsGenericType || (mainType.TypeKind != TypeKind.Class && mainType.TypeKind != TypeKind.Struct && !mainType.
IsInterface
))
Compiler\ClsComplianceChecker.cs (2)
495
if ((object)containingType != null && containingType.
IsInterface
)
511
if (symbol.
IsInterface
)
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
338
if (AdaptedNamedTypeSymbol.
IsInterface
)
375
if (AdaptedNamedTypeSymbol.
IsInterface
)
551
return AdaptedNamedTypeSymbol.
IsInterface
;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
361
bool isInterface = (namedType.
IsInterface
);
FlowAnalysis\NullableWalker.cs (2)
5795
if (implementationMethod.ContainingType.
IsInterface
)
7371
if (symbolContainer.
IsInterface
)
Lowering\DiagnosticsPass_Warnings.cs (1)
357
if ((object)nt == null || !nt.IsReferenceType || nt.
IsInterface
)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
1713
Debug.Assert(!meth.ContainingType.
IsInterface
);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
451
if (!receiver.Type.IsReferenceType && method.ContainingType.
IsInterface
)
Symbols\BaseTypeAnalysis.cs (1)
42
if (type.
IsInterface
)
Symbols\ConstraintsHelper.cs (1)
988
if (typeArgument.Type is NamedTypeSymbol {
IsInterface
: true } iface && SelfOrBaseHasStaticAbstractMember(iface, ref useSiteInfo, out Symbol member))
Symbols\MemberSymbolExtensions.cs (1)
129
Debug.Assert(symbol.ContainingType.
IsInterface
);
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1270
if (!method.ContainingType.
IsInterface
)
1292
if (method.ContainingType.
IsInterface
)
Symbols\Metadata\PE\SymbolFactory.cs (1)
114
if (!typeToCheck.
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)
480
if (symbol.ContainingType?.
IsInterface
== true && !symbol.ContainingAssembly.RuntimeSupportsDefaultInterfaceImplementation)
Symbols\Source\SourceConstructorSymbol.cs (1)
114
bool isInterface = ContainingType.
IsInterface
;
Symbols\Source\SourceDestructorSymbol.cs (1)
131
var mods = ModifierUtils.MakeAndCheckNonTypeMemberModifiers(isOrdinaryMethod: false, isForInterfaceMember: ContainingType.
IsInterface
, modifiers, DeclarationModifiers.None, allowedModifiers, location, diagnostics, out modifierErrors);
Symbols\Source\SourceEventSymbol.cs (3)
439
bool isInterface = this.ContainingType.
IsInterface
;
519
Debug.Assert(!IsStatic || ContainingType.
IsInterface
|| (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
523
bool isExplicitInterfaceImplementationInInterface = ContainingType.
IsInterface
&& IsExplicitInterfaceImplementation;
Symbols\Source\SourceMemberContainerSymbol.cs (1)
290
if (((NamedTypeSymbol)containingSymbol).
IsInterface
)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (4)
269
wasImplementingMemberFound && implementingMember.ContainingType.
IsInterface
)
680
if (symbol.ContainingType.
IsInterface
)
1549
if (!hidingMember.ContainingType.
IsInterface
)
1813
if (implementingMethod.ContainingType.
IsInterface
||
Symbols\Source\SourceMemberFieldSymbol.cs (1)
167
bool isInterface = containingType.
IsInterface
;
Symbols\Source\SourceMemberMethodSymbol.cs (2)
445
if (IsExplicitInterfaceImplementation && _containingType.
IsInterface
)
985
if (_containingType.
IsInterface
)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1208
return this.ContainingType.
IsInterface
&&
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
527
return ModifierUtils.MakeAndCheckNonTypeMemberModifiers(isOrdinaryMethod: true, isForInterfaceMember: ContainingType.
IsInterface
,
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (3)
205
bool isInterface = this.ContainingType.
IsInterface
;
322
Debug.Assert(!IsStatic || ContainingType.
IsInterface
|| (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
324
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation && ContainingType.
IsInterface
;
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
507
bool isInterface = this.ContainingType.
IsInterface
;
Symbols\Source\SourcePropertySymbol.cs (1)
277
bool isInterface = containingType.
IsInterface
;
Symbols\Source\SourcePropertySymbolBase.cs (3)
667
CheckInitializer(IsAutoProperty, ContainingType.
IsInterface
, IsStatic, Location, diagnostics);
847
Debug.Assert(!IsStatic || ContainingType.
IsInterface
|| (!IsAbstract && !IsVirtual)); // Otherwise should have been reported and cleared earlier.
849
bool isExplicitInterfaceImplementationInInterface = isExplicitInterfaceImplementation && ContainingType.
IsInterface
;
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
52
if (this.ContainingType.
IsInterface
&&
Symbols\SymbolExtensions.cs (2)
71
if (originalSuperType.
IsInterface
)
534
return !symbol.IsSealed && (symbol.IsAbstract || symbol.IsVirtual) && (symbol.ContainingType?.
IsInterface
?? false);
Symbols\TypeSymbol.cs (6)
729
if ((object)interfaceType == null || !interfaceType.
IsInterface
)
808
Debug.Assert((object)interfaceType != null && interfaceType.
IsInterface
);
1090
return !symbolAndDiagnostics.Symbol.ContainingType.
IsInterface
;
1263
if (!interfaceType.
IsInterface
)
1373
Debug.Assert(interfaceType.
IsInterface
);
1557
if ((object)implementingPropertyOrEvent != null && !implementingPropertyOrEvent.ContainingType.
IsInterface
)
Symbols\TypeSymbolExtensions.cs (3)
22
if (@interface.
IsInterface
&& TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2))
308
return type.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)type).
IsInterface
;
2068
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)
123
return _underlyingType.
IsInterface
;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\DefaultInterfaceImplementationTests.cs (4)
62530
Assert.True(baseInterface.
IsInterface
);
62531
Assert.True(i1.
IsInterface
);
62656
Assert.True(baseInterface.
IsInterface
);
62657
Assert.True(i1.
IsInterface
);