369 references to Delegate
Microsoft.CodeAnalysis.CodeStyle (10)
EditorConfigNamingStyleParser_SymbolSpec.cs (2)
134private static readonly SymbolKindOrTypeKind _delegate = new(TypeKind.Delegate); 397case TypeKind.Delegate:
ISymbolExtensions.cs (2)
244=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 633if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
ITypeSymbolExtensions.cs (2)
86=> symbol?.TypeKind == TypeKind.Delegate; 264case TypeKind.Delegate:
SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
500if (x.TypeKind == TypeKind.Delegate)
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
195if (x.TypeKind == TypeKind.Delegate)
SymbolSpecification.cs (1)
78new SymbolKindOrTypeKind(TypeKind.Delegate),
SymbolUsageAnalysis.Walker.cs (1)
383symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
CodeGenerationNamedTypeSymbol.cs (1)
100return this.TypeKind == TypeKind.Delegate
CodeGenerationSymbolFactory.cs (1)
490typeKind: TypeKind.Delegate,
Microsoft.CodeAnalysis.CSharp (66)
Binder\Binder_Constraints.cs (1)
568case TypeKind.Delegate:
Binder\Binder_Conversions.cs (5)
386case TypeKind.Delegate: 1276Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } } 1409TypeKind.Delegate => ErrorCode.ERR_MethDelegateMismatch, 1417TypeKind.Delegate => ErrorCode.ERR_DelegateRefMismatch, 1443Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
Binder\Binder_Crefs.cs (1)
576case TypeKind.Delegate:
Binder\Binder_Expressions.cs (4)
2565if (targetType.TypeKind != TypeKind.Delegate || 2614TypeKind.Delegate => ErrorCode.ERR_CannotConvertAddressOfToDelegate, 4448case TypeKind.Delegate: 4600else if (argument.Type.TypeKind == TypeKind.Delegate)
Binder\Binder_Lookup.cs (2)
195case TypeKind.Delegate: 1878case TypeKind.Delegate:
Binder\Binder_Operators.cs (1)
785(object)left.Type != null && left.Type.TypeKind == TypeKind.Delegate)
Binder\Binder_Statements.cs (2)
2434case TypeKind.Delegate when fromAddressOf: 2437case TypeKind.Delegate:
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2517case TypeKind.Delegate:
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1185else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.Delegate &&
Compilation\CSharpCompilation.cs (1)
3985if (csharpLeftType.TypeKind is TypeKind.Delegate &&
Compiler\ClsComplianceChecker.cs (4)
247if (symbol.TypeKind == TypeKind.Delegate) 467if (type.TypeKind == TypeKind.Delegate) 731System.Diagnostics.Debug.Assert(method.ContainingType.TypeKind == TypeKind.Delegate); 996case TypeKind.Delegate:
Emitter\Model\MethodSymbolAdapter.cs (1)
612return this.IsExtern || (object)ContainingType != null && ContainingType.TypeKind == TypeKind.Delegate;
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
509case TypeKind.Delegate:
Emitter\NoPia\EmbeddedType.cs (1)
160case TypeKind.Delegate:
Emitter\NoPia\EmbeddedTypesManager.cs (3)
278case TypeKind.Delegate: 385Debug.Assert(namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum || namedType.TypeKind == TypeKind.Delegate); 441if (containerKind == TypeKind.Interface || containerKind == TypeKind.Delegate ||
FlowAnalysis\NullableWalker.cs (2)
7997NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { Parameters: { } parameters } signature } => (signature, parameters), 8717case BoundExpression arg when arg.Type is { TypeKind: TypeKind.Delegate }:
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
720if ((object)d != null && d.TypeKind == TypeKind.Delegate)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (6)
319if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 359if (symbolName is null && symbol.IsAnonymousType && symbol.TypeKind == TypeKind.Delegate) 583symbol.TypeKind == TypeKind.Delegate && 600case TypeKind.Delegate: 678if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 724case TypeKind.Delegate:
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
37public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
213public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\ConstraintsHelper.cs (3)
192case TypeKind.Delegate: 194Debug.Assert(inherited || currentCompilation == null || constraintType.TypeKind != TypeKind.Delegate); 1454case TypeKind.Delegate:
Symbols\EnumConversions.cs (1)
27return TypeKind.Delegate;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
411case TypeKind.Delegate:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
99case TypeKind.Delegate:
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1226if (_containingType.TypeKind == TypeKind.Delegate)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1718case TypeKind.Delegate: 1774result = TypeKind.Delegate;
Symbols\NamedTypeSymbol.cs (1)
182if (TypeKind != TypeKind.Delegate)
Symbols\Source\SourceMemberContainerSymbol.cs (3)
325case TypeKind.Delegate: 361case TypeKind.Delegate: 2186if (this.TypeKind == TypeKind.Delegate)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
514case TypeKind.Delegate:
Symbols\Source\SourceNamedTypeSymbol.cs (1)
815case TypeKind.Delegate:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (2)
520baseType.TypeKind == TypeKind.Delegate || 745case TypeKind.Delegate:
Symbols\Symbol_Attributes.cs (1)
73case TypeKind.Delegate:
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
88if (_containingType.TypeKind == TypeKind.Delegate)
Symbols\TypeSymbolExtensions.cs (5)
506return type.TypeKind == TypeKind.Delegate; 626case TypeKind.Delegate: 701case TypeKind.Delegate: 765case TypeKind.Delegate: 1402case TypeKind.Delegate:
Symbols\VarianceSafety.cs (2)
80case TypeKind.Delegate: 374case TypeKind.Delegate:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
CastSimplifier.cs (2)
245if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 262if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
CSharpTypeInferenceService.TypeInferrer.cs (3)
447if (type.TypeKind == TypeKind.Delegate) 1037if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1039return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate);
NamedTypeGenerator.cs (2)
91if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 187else if (namedType.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
NamingStylesTests.cs (1)
215[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (34)
Diagnostics\GenerateType\GenerateTypeTests_Dialog.cs (28)
2324typeKind: TypeKind.Delegate, 2359typeKind: TypeKind.Delegate, 2392typeKind: TypeKind.Delegate, 2425typeKind: TypeKind.Delegate, 2458typeKind: TypeKind.Delegate, 2487typeKind: TypeKind.Delegate, 2516typeKind: TypeKind.Delegate, 2546typeKind: TypeKind.Delegate, 2581typeKind: TypeKind.Delegate, 2616typeKind: TypeKind.Delegate, 2649typeKind: TypeKind.Delegate, 2682typeKind: TypeKind.Delegate, 2712typeKind: TypeKind.Delegate, 2741typeKind: TypeKind.Delegate, 2776typeKind: TypeKind.Delegate, 2811typeKind: TypeKind.Delegate, 2844typeKind: TypeKind.Delegate, 2877typeKind: TypeKind.Delegate, 2907typeKind: TypeKind.Delegate, 2936typeKind: TypeKind.Delegate, 2970typeKind: TypeKind.Delegate, 3001typeKind: TypeKind.Delegate, 3323typeKind: TypeKind.Delegate, 3348typeKind: TypeKind.Delegate, 3383typeKind: TypeKind.Delegate, 3410typeKind: TypeKind.Delegate, 3517typeKind: TypeKind.Delegate, 3556typeKind: TypeKind.Delegate,
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (4)
181new SymbolKindOrTypeKind(TypeKind.Delegate) 229new SymbolKindOrTypeKind(TypeKind.Delegate) 344[InlineData("*", new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 345[InlineData(null, new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })]
NamingStylesTests.cs (1)
215[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)]
SymbolKey\SymbolKeyTestBase.cs (1)
408else if (tinfo.Type != null && tinfo.Type.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\NoPiaEmbedTypes.cs (1)
1338Assert.Equal(TypeKind.Delegate, test11.TypeKind);
Microsoft.CodeAnalysis.CSharp.Features (6)
ChangeSignature\CSharpChangeSignatureService.cs (1)
156if (typeSymbol != null && typeSymbol.IsKind(SymbolKind.NamedType) && ((ITypeSymbol)typeSymbol).TypeKind == TypeKind.Delegate)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
175if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is INamedTypeSymbol type && within != null && type.TypeKind != TypeKind.Delegate)
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
86if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } or IFunctionPointerTypeSymbol) 140if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } expressionType)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
87if (type.TypeKind == TypeKind.Delegate) 126Debug.Assert(type.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\NullableReferenceTypesTests.cs (4)
112894Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 112914Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 112925Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 113034Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind);
Semantics\ScriptSemanticsTests.cs (1)
475Assert.Equal(TypeKind.Delegate, members[0].TypeKind);
Semantics\UseSiteErrorTests.cs (5)
2302Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 2320Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 2331Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 2376Assert.Equal(TypeKind.Delegate, compilation5.GetTypeByMetadataName("D").TypeKind); 2417Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Compilation\SemanticModelGetSemanticInfoTests.cs (14)
5658Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 6437Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7169Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7171Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7233Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7235Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7851Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7853Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7917Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7919Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 7983Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 7985Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind); 10713Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind); 10715Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind);
Symbols\Metadata\PE\TypeKindTests.cs (1)
58Assert.Equal(TypeKind.Delegate, func.TypeKind);
Symbols\Source\DelegateTests.cs (3)
110Assert.Equal(TypeKind.Delegate, fieldType.TypeKind); 130Assert.Equal(TypeKind.Delegate, v.TypeKind); 208Assert.Equal(TypeKind.Delegate, d.TypeKind);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ReadOnlyStructs.cs (1)
128Assert.Equal(TypeKind.Delegate, s2.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Extensions.cs (2)
433if ((typeSym.TypeKind == TypeKind.Interface || typeSym.TypeKind == TypeKind.Class || typeSym.TypeKind == TypeKind.Struct || typeSym.TypeKind == TypeKind.Delegate)) 678return type.TypeKind == TypeKind.Delegate;
UsesIsNullableVisitor.cs (2)
171case TypeKind.Delegate: 186case TypeKind.Delegate:
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CastSimplifier.cs (2)
245if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 262if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate)
CSharpTypeInferenceService.TypeInferrer.cs (3)
447if (type.TypeKind == TypeKind.Delegate) 1037if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1039return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate);
NamedTypeGenerator.cs (2)
91if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 187else if (namedType.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
SymbolFinder\DependentTypeFinderTests.cs (1)
580var delegates = transitiveImpls.Where(i => i.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
349TypeKind.Delegate => FeaturesResources.delegate_, 4297if (newContainingSymbol.ContainingSymbol is INamedTypeSymbol { TypeKind: TypeKind.Delegate } newContainingDelegateType)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
43if (options.TypeKind == TypeKind.Delegate)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
522if (symbol.TypeKind == TypeKind.Delegate)
Shared\Extensions\ISymbolExtensions_2.cs (1)
64case TypeKind.Delegate:
Microsoft.CodeAnalysis.VisualBasic (70)
Binding\Binder_Conversions.vb (4)
782Case TypeKind.Delegate 1218If targetType.TypeKind <> TypeKind.Delegate AndAlso targetType.TypeKind <> TypeKind.Error Then 1370If(targetDelegateType.TypeKind = TypeKind.Delegate AndAlso targetDelegateType.IsFromCompilation(Me.Compilation), 1422If(targetDelegateType.TypeKind = TypeKind.Delegate AndAlso targetDelegateType.IsFromCompilation(Me.Compilation),
Binding\Binder_Delegates.vb (1)
234ElseIf targetType.TypeKind <> TypeKind.Delegate Then
Binding\Binder_Invocation.vb (1)
288ElseIf targetType.Kind = SymbolKind.NamedType AndAlso targetType.TypeKind = TypeKind.Delegate Then
Binding\Binder_Lookup.vb (2)
580Case TypeKind.Class, TypeKind.Module, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum 606Case TypeKind.Class, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum
Binding\Binder_ObjectInitializer.vb (2)
80Case TypeKind.Delegate 235TypeKind.Delegate,
Binding\BinderFactory.vb (1)
386containingType.TypeKind = TypeKind.Delegate Then
Binding\DocumentationCommentBinder.vb (1)
44If commentedNamedType IsNot Nothing AndAlso commentedNamedType.TypeKind <> TypeKind.Delegate Then
Binding\DocumentationCommentParamBinder.vb (1)
30If namedType.TypeKind = TypeKind.Delegate Then
Compilation\ClsComplianceChecker.vb (4)
186If symbol.TypeKind = TypeKind.Delegate Then 439If type.TypeKind = TypeKind.Delegate AndAlso type.IsImplicitlyDeclared AndAlso TryCast(type, NamedTypeSymbol)?.AssociatedSymbol Is symbol Then 595Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module 621Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (2)
739Case TypeKind.Delegate 768If namedType.TypeKind <> TypeKind.Delegate Then
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (2)
123If namedType.TypeKind = TYPEKIND.Delegate Then 131Me.ParamAndParamRefSupported = namedType.TypeKind = TYPEKIND.Delegate
Compilation\DocumentationComments\DocumentationCommentCompiler.NamedType.vb (2)
107If namedType.TypeKind = TypeKind.Delegate Then 116If namedType.TypeKind = TypeKind.Delegate Then
Compilation\SyntaxTreeSemanticModel.vb (1)
1080Debug.Assert(typeSymbol.TypeKind = TYPEKIND.Delegate)
Emit\NamedTypeSymbolAdapter.vb (1)
449Case TypeKind.Enum, TypeKind.Interface, TypeKind.Delegate
Emit\NoPia\EmbeddedType.vb (1)
129Case TypeKind.Enum, TypeKind.Delegate, TypeKind.Interface
Emit\NoPia\EmbeddedTypesManager.vb (3)
225TypeKind.Delegate 320namedType.TypeKind = TypeKind.Delegate) 370containerKind = TypeKind.Delegate OrElse
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
446Debug.Assert(delegateType.TypeKind = TYPEKIND.Delegate)
Semantics\Conversions.vb (3)
2867Case TypeKind.Delegate 2898Return typeKind = TypeKind.Class OrElse typeKind = TypeKind.Module OrElse typeKind = TypeKind.Delegate 2907Return type.TypeKind = TypeKind.Delegate
SymbolDisplay\SymbolDisplayVisitor.Types.vb (4)
199symbol.TypeKind = TypeKind.Delegate AndAlso 257Case TypeKind.Delegate 335Case TypeKind.Delegate 455Case TypeKind.Delegate
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (1)
115Case TypeKind.Delegate
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (1)
218Case TypeKind.Delegate
Symbols\AnonymousTypes\PublicSymbols\AnonymousDelegate_TypePublicSymbol.vb (1)
123Return TypeKind.Delegate
Symbols\AnonymousTypes\PublicSymbols\AnonymousTypeOrDelegatePublicSymbol.vb (1)
21(TypeKind = TypeKind.Delegate AndAlso TypeOf Me Is AnonymousDelegatePublicSymbol))
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousDelegate_TemplateSymbol.vb (1)
162Return TypeKind.Delegate
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTemplateSymbol.vb (3)
53Debug.Assert(TypeKind = TypeKind.Class OrElse TypeKind = TypeKind.Delegate) 60If TypeKind = TypeKind.Delegate AndAlso typeDescr.Fields.IsSubDescription() Then 67Debug.Assert(TypeKind = TypeKind.Delegate)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTypeParameterSymbol.vb (1)
59If _container.TypeKind = TypeKind.Delegate Then
Symbols\ConstraintsHelper.vb (1)
248TypeKind.Delegate,
Symbols\EventSymbol.vb (1)
170If type IsNot Nothing AndAlso type.TypeKind = TypeKind.Delegate Then
Symbols\Metadata\PE\MetadataDecoder.vb (1)
359Case TypeKind.Delegate,
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
391If Not IsShared AndAlso String.Equals(name, WellKnownMemberNames.DelegateInvokeName, StringComparison.Ordinal) AndAlso _containingType.TypeKind = TypeKind.Delegate Then
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
1017result = TypeKind.Delegate
Symbols\NamedTypeSymbol.vb (1)
224If TypeKind <> TypeKind.Delegate Then
Symbols\Source\SourceMemberContainerTypeSymbol.vb (3)
39[Delegate] = CUShort(TypeKind.Delegate) << TypeKindShift 340Case TypeKind.Delegate 1654If TypeKind <> TypeKind.Delegate Then
Symbols\Source\SourceMemberMethodSymbol.vb (1)
756Case TypeKind.Interface, TypeKind.Structure, TypeKind.Enum, TypeKind.Delegate
Symbols\Source\SourceNamedTypeSymbol.vb (4)
240If TypeKind = TypeKind.Delegate Then 1114Case TypeKind.Interface, TypeKind.Enum, TypeKind.Delegate, TypeKind.Structure, TypeKind.Module, TypeKind.Array ' array can't really occur 1393Case TypeKind.Delegate 1503ElseIf TypeKind = TypeKind.Delegate Then
Symbols\Symbol_Attributes.vb (1)
110Case TypeKind.Delegate
Symbols\SymbolExtensions.vb (1)
45Case TypeKind.Delegate
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (1)
357Return TypeKind.Delegate
Symbols\TypeSymbolExtensions.vb (7)
233Return type.TypeKind = TypeKind.Delegate 410Case TypeKind.Array, TypeKind.Delegate, TypeKind.Enum, TypeKind.Structure, TypeKind.Module 834TypeKind.Delegate 866TypeKind.Delegate, 1066If typeArgument.TypeKind = TypeKind.Delegate Then 1082If type.TypeKind = TypeKind.Delegate Then 1096If type.TypeKind = TypeKind.Delegate Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
VisualBasicTypeInferenceService.TypeInferrer.vb (2)
296If namedType.TypeKind = TypeKind.Delegate Then 712Return lambdaTypes.Where(Function(t) t.InferredType.TypeKind = TypeKind.Delegate).SelectMany(Function(t) t.InferredType.GetMembers(WellKnownMemberNames.DelegateInvokeName).OfType(Of IMethodSymbol)().Select(Function(m) New TypeInferenceInfo(m.ReturnType)))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (26)
Diagnostics\GenerateType\GenerateTypeTests_Dialog.vb (26)
1671typeKind:=TypeKind.Delegate, 1701typeKind:=TypeKind.Delegate, 1727typeKind:=TypeKind.Delegate, 1751typeKind:=TypeKind.Delegate, 1779typeKind:=TypeKind.Delegate, 1807typeKind:=TypeKind.Delegate, 1835typeKind:=TypeKind.Delegate, 1863typeKind:=TypeKind.Delegate, 1891typeKind:=TypeKind.Delegate, 1915typeKind:=TypeKind.Delegate, 1943typeKind:=TypeKind.Delegate, 1967typeKind:=TypeKind.Delegate, 1993typeKind:=TypeKind.Delegate, 2017typeKind:=TypeKind.Delegate, 2045typeKind:=TypeKind.Delegate, 2069typeKind:=TypeKind.Delegate, 2094typeKind:=TypeKind.Delegate, 2121typeKind:=TypeKind.Delegate) 2209typeKind:=TypeKind.Delegate, 2244typeKind:=TypeKind.Delegate, 2387typeKind:=TypeKind.Delegate, 2425typeKind:=TypeKind.Delegate, 2488typeKind:=TypeKind.Delegate, 2512typeKind:=TypeKind.Delegate, 2640typeKind:=TypeKind.Delegate, 2666typeKind:=TypeKind.Delegate,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\NoPiaEmbedTypes.vb (1)
1165Assert.Equal(TypeKind.Delegate, test11.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Features (5)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
131If typeSymbol IsNot Nothing AndAlso typeSymbol.IsKind(SymbolKind.NamedType) AndAlso DirectCast(typeSymbol, ITypeSymbol).TypeKind = TypeKind.Delegate Then
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
147If type IsNot Nothing AndAlso within IsNot Nothing AndAlso type.TypeKind <> TypeKind.[Delegate] Then
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
236If type.TypeKind <> TypeKind.Delegate Then
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
146If parameter.Type.TypeKind = TypeKind.Delegate Then
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (1)
88Dim itemsAndSelected = If(type.TypeKind = TypeKind.Delegate,
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (26)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (1)
745Assert.Equal(TypeKind.Delegate, typeSymbol10.TypeKind)
DeclaringSyntaxNodeTests.vb (2)
552If nt.TypeKind = TypeKind.Delegate AndAlso nt.Name.EndsWith("EventHandler", StringComparison.Ordinal) Then 588If nt.TypeKind = TypeKind.Delegate AndAlso nt.Name.EndsWith("EventHandler", StringComparison.Ordinal) Then
Semantics\FieldInitializerBindingTests.vb (1)
528Assert.Equal(TypeKind.Delegate, field.Type.TypeKind)
Semantics\GetExtendedSemanticInfoTests.vb (11)
6932Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6934Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7007Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 7009Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7082Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 7084Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7157Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 7159Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7859Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 7861Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 7894Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind)
Semantics\SelectCaseTests.vb (3)
210Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 241Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 243Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind)
Semantics\SyncLockTests.vb (3)
241Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 438Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 443Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind)
Semantics\UseSiteErrorTests.vb (5)
601Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind) 621Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind) 632Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind) 674Assert.Equal(TypeKind.Delegate, compilation5.GetTypeByMetadataName("D").TypeKind) 715Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (12)
SymbolsTests\Metadata\PE\TypeKindTests.vb (1)
50Assert.Equal(TypeKind.Delegate, func.TypeKind)
SymbolsTests\Retargeting\RetargetingTests.vb (2)
1013Assert.Equal(TypeKind.Delegate, CType(sourceType.GetMembers.Item(1), SourceNamedTypeSymbol).TypeKind) 1014Assert.Equal(TypeKind.Delegate, CType(sourceType.GetMembers.Item(2), SourceNamedTypeSymbol).TypeKind)
SymbolsTests\Source\DelegateTests.vb (1)
246Assert.Equal(TypeKind.Delegate, funcDel.TypeKind)
SymbolsTests\Source\EventTests.vb (7)
1607Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 1609Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 1645Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 1647Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 1685Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 1687Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 1718Assert.Equal(TypeKind.Delegate, DirectCast(mems(0), NamedTypeSymbol).TypeKind)
SymbolsTests\Source\TypeTests.vb (1)
127Assert.Equal(TypeKind.Delegate, delegateB.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Extensions.vb (1)
226typeSymTypeKind = TypeKind.Structure OrElse typeSymTypeKind = TypeKind.Delegate Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
CodeGeneration\NamedTypeGenerator.vb (2)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 96ElseIf namedType.TypeKind = TypeKind.Delegate Then
IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
VisualBasicTypeInferenceService.TypeInferrer.vb (2)
296If namedType.TypeKind = TypeKind.Delegate Then 712Return lambdaTypes.Where(Function(t) t.InferredType.TypeKind = TypeKind.Delegate).SelectMany(Function(t) t.InferredType.GetMembers(WellKnownMemberNames.DelegateInvokeName).OfType(Of IMethodSymbol)().Select(Function(m) New TypeInferenceInfo(m.ReturnType)))
Microsoft.CodeAnalysis.Workspaces (20)
Classification\ClassificationExtensions.cs (1)
17TypeKind.Delegate => ClassificationTypeNames.DelegateName,
CodeGenerationNamedTypeSymbol.cs (1)
100return this.TypeKind == TypeKind.Delegate
CodeGenerationSymbolFactory.cs (1)
490typeKind: TypeKind.Delegate,
Editing\SyntaxGenerator.cs (2)
802TypeKind.Delegate => type.GetMembers(WellKnownMemberNames.DelegateInvokeName) is [IMethodSymbol invoke, ..] 862case TypeKind.Delegate:
EditorConfigNamingStyleParser_SymbolSpec.cs (2)
134private static readonly SymbolKindOrTypeKind _delegate = new(TypeKind.Delegate); 397case TypeKind.Delegate:
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
56TypeKind.Delegate or
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
29return symbol.ContainingType.TypeKind == TypeKind.Delegate
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (1)
118if (searchSymbol.IsConstructor() && searchSymbol.ContainingType.TypeKind == TypeKind.Delegate)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs\ISymbolExtensions.cs (2)
244=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 633if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (2)
86=> symbol?.TypeKind == TypeKind.Delegate; 264case TypeKind.Delegate:
Shared\Extensions\IMethodSymbolExtensions.cs (1)
22Contract.ThrowIfFalse(delegateType.TypeKind == TypeKind.Delegate);
Shared\Extensions\SemanticModelExtensions.cs (1)
140if (namedType.TypeKind == TypeKind.Delegate ||
SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
500if (x.TypeKind == TypeKind.Delegate)
SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
195if (x.TypeKind == TypeKind.Delegate)
SymbolSpecification.cs (1)
78new SymbolKindOrTypeKind(TypeKind.Delegate),
SymbolUsageAnalysis.Walker.cs (1)
383symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
EditorConfigParsing\NamingStyleParserTests.cs (1)
166symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Delegate), symbolKind),
Microsoft.VisualStudio.LanguageServices (6)
GenerateType\GenerateTypeDialogViewModel.cs (1)
230PopulateTypeKind(TypeKind.Delegate, "delegate", "Delegate");
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
181if (symbol.TypeKind == TypeKind.Delegate) 448return (symbol.Kind == SymbolKind.NamedType && ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Delegate)
Library\ObjectBrowser\ObjectList.cs (1)
216case TypeKind.Delegate:
Progression\GraphBuilder.cs (1)
563case TypeKind.Delegate:
Progression\GraphProvider.cs (1)
200IsAnyTypeKind(n, TypeKind.Class, TypeKind.Interface, TypeKind.Struct, TypeKind.Enum, TypeKind.Delegate)))
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (1)
761TypeKind.Delegate)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
39if (namedType.TypeKind == TypeKind.Delegate)
ObjectBrowser\DescriptionBuilder.cs (2)
35Debug.Assert(typeSymbol.TypeKind == TypeKind.Delegate); 184typeSymbol.TypeKind != TypeKind.Delegate)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
120typeKind: TypeKind.Delegate);
Microsoft.VisualStudio.LanguageServices.Implementation (4)
CodeModel\AbstractCodeModelService.cs (2)
227case TypeKind.Delegate: 561case TypeKind.Delegate:
Options\Style\NamingPreferences\SymbolSpecification\SymbolSpecificationViewModel.cs (2)
61new SymbolKindViewModel(TypeKind.Delegate, ServicesVSResources.NamingSpecification_CSharp_Delegate, specification), 103new SymbolKindViewModel(TypeKind.Delegate, ServicesVSResources.NamingSpecification_VisualBasic_Delegate, specification),
Microsoft.VisualStudio.LanguageServices.VisualBasic (7)
CodeModel\Extenders\GenericExtender.vb (3)
39TypeKind.Delegate, 67TypeKind.Delegate, 93Case TypeKind.Delegate,
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
45If namedTypeSymbol.TypeKind = TypeKind.Delegate Then
ObjectBrowser\DescriptionBuilder.vb (3)
30Debug.Assert(typeSymbol.TypeKind = TypeKind.Delegate) 279If eventType IsNot Nothing AndAlso eventType.TypeKind = TypeKind.Delegate Then 319typeSymbol.TypeKind <> TypeKind.Delegate AndAlso