53 references to IsDelegateType
Microsoft.CodeAnalysis.CSharp (46)
Binder\Binder_Expressions.cs (1)
9299
if (!possibleDelegateType.
IsDelegateType
())
Binder\Binder_Invocation.cs (1)
1582
if (((object)type != null) && type.
IsDelegateType
())
Binder\Binder_Lookup.cs (1)
1745
return (object)type != null && (type.
IsDelegateType
() || type.IsDynamic() || type.IsFunctionPointer());
Binder\Binder_Operators.cs (1)
275
if (delegateType.
IsDelegateType
()) // Otherwise, suppress cascading.
Binder\Binder_WithExpression.cs (1)
34
else if (receiverType.IsAnonymousType && !receiverType.
IsDelegateType
())
Binder\LocalBinderFactory.cs (3)
275
NamedTypeSymbol namedType when namedType.
IsDelegateType
() => getDelegateParameters(namedType),
304
case NamedTypeSymbol namedType when namedType.
IsDelegateType
():
314
Debug.Assert(delegateType.
IsDelegateType
());
Binder\Semantics\Conversions\Conversions.cs (1)
47
if (!destination.
IsDelegateType
())
Binder\Semantics\Conversions\ConversionsBase.cs (8)
1528
if (!delegateType.
IsDelegateType
())
1553
if (type.
IsDelegateType
())
2614
if (!source.
IsDelegateType
())
2875
if (!s.
IsDelegateType
() || !d.
IsDelegateType
())
3401
if (destination.
IsDelegateType
())
3420
if (!source.
IsDelegateType
() || !destination.
IsDelegateType
())
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
361
var leftDelegate = (object)leftType != null && leftType.
IsDelegateType
();
363
var rightDelegate = (object)rightType != null && rightType.
IsDelegateType
();
750
((object)left.Type == null || (!left.Type.
IsDelegateType
() && left.Type.SpecialType != SpecialType.System_String && left.Type.SpecialType != SpecialType.System_Delegate)) &&
751
((object)right.Type == null || (!right.Type.
IsDelegateType
() && right.Type.SpecialType != SpecialType.System_String && right.Type.SpecialType != SpecialType.System_Delegate));
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
534
Debug.Assert(delegateOrFunctionPointerType.
IsDelegateType
() || delegateOrFunctionPointerType is FunctionPointerTypeSymbol);
1999
if (constructedSource.IsInterface || constructedSource.
IsDelegateType
())
2399
if (constructedTarget.IsInterface || constructedTarget.
IsDelegateType
())
2857
Debug.Assert(target.
IsDelegateType
());
CodeGen\EmitConversion.cs (1)
353
if (!method.IsStatic && method.IsMetadataVirtual() && !method.ContainingType.
IsDelegateType
() && !receiver.SuppressVirtualCalls)
CodeGen\EmitExpression.cs (2)
3633
if (!(expr.Type.IsInterfaceType() || expr.Type.
IsDelegateType
()))
3708
return (to.
IsDelegateType
() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) ||
Compilation\CSharpSemanticModel.cs (1)
3369
else if (expr.Type.
IsDelegateType
())
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
571
if (typeSymbol.
IsDelegateType
())
Compiler\MethodCompiler.cs (2)
946
if (methodSymbol.IsAbstract || methodSymbol.ContainingType?.
IsDelegateType
() == true)
2273
Debug.Assert(!method.ContainingType.
IsDelegateType
());
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
560
return AdaptedNamedTypeSymbol.
IsDelegateType
();
Emitter\NoPia\EmbeddedType.cs (1)
191
return UnderlyingNamedType.AdaptedNamedTypeSymbol.
IsDelegateType
();
FlowAnalysis\NullableWalker.cs (3)
3390
(LambdaSymbol l, NamedTypeSymbol n) _ when n.
IsDelegateType
() => AreLambdaAndNewDelegateSimilar(l, n),
8695
Debug.Assert(node.Type.
IsDelegateType
());
8968
Debug.Assert(delegateTypeOpt?.
IsDelegateType
() != false);
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
59
Debug.Assert(delegateType.
IsDelegateType
());
Operations\CSharpOperationFactory.cs (1)
1115
boundConversion.Type.
IsDelegateType
())
Symbols\Metadata\PE\PEEventSymbol.cs (1)
419
(eventType.
IsDelegateType
() || eventType.IsErrorType()) &&
Symbols\Source\SourceEventSymbol.cs (1)
590
else if (!this.Type.
IsDelegateType
() && !this.Type.IsErrorType())
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3229
Debug.Assert(!this.
IsDelegateType
());
Symbols\TypeSymbolExtensions.cs (3)
386
return type.
IsDelegateType
() ? (NamedTypeSymbol)type : null;
521
Debug.Assert(type is FunctionPointerTypeSymbol || type.
IsDelegateType
());
548
RoslynDebug.Assert(type.
IsDelegateType
() || type.IsExpressionTree());
Symbols\VarianceSafety.cs (1)
102
Debug.Assert(!container.
IsDelegateType
());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\WinMdDelegateTests.cs (1)
232
if (!fieldType.
IsDelegateType
())
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_Tuples.cs (1)
345
Assert.True(delegate1.
IsDelegateType
());
FlowAnalysis\FlowTestBase.cs (1)
26
if (sourceSymbol == null || sourceSymbol.ContainingType.
IsDelegateType
())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\OperatorTests.cs (3)
8171
if (leftType.
IsDelegateType
() && rightType.
IsDelegateType
())
8268
leftType.
IsDelegateType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\TypeTests.cs (1)
1614
Assert.True(deleType.
IsDelegateType
());