343 references to Delegate
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
195if (type.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.CodeStyle (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
306=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 697if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
88=> symbol?.TypeKind == TypeKind.Delegate; 266case TypeKind.Delegate:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
411symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
134private static readonly SymbolKindOrTypeKind _delegate = new(TypeKind.Delegate); 392case TypeKind.Delegate:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
70new SymbolKindOrTypeKind(TypeKind.Delegate),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
513if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
493typeKind: TypeKind.Delegate,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
100return this.TypeKind == TypeKind.Delegate
Microsoft.CodeAnalysis.CSharp (64)
Binder\Binder_Constraints.cs (1)
609case TypeKind.Delegate:
Binder\Binder_Crefs.cs (1)
576case TypeKind.Delegate:
Binder\Binder_Expressions.cs (4)
2778if (targetType.TypeKind != TypeKind.Delegate || 2832TypeKind.Delegate => ErrorCode.ERR_CannotConvertAddressOfToDelegate, 5159case TypeKind.Delegate: 5400else if (argument.Type.TypeKind == TypeKind.Delegate)
Binder\Binder_Lookup.cs (2)
195case TypeKind.Delegate: 1878case TypeKind.Delegate:
Binder\Binder_Operators.cs (1)
816(object)left.Type != null && left.Type.TypeKind == TypeKind.Delegate)
Binder\Binder_Statements.cs (2)
2474case TypeKind.Delegate when fromAddressOf: 2477case TypeKind.Delegate:
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2666case TypeKind.Delegate:
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1220else if (argument.Kind == BoundKind.MethodGroup && parameterType.TypeKind == TypeKind.Delegate &&
Compilation\CSharpCompilation.cs (1)
4299if (csharpLeftType.TypeKind is TypeKind.Delegate &&
Compiler\ClsComplianceChecker.cs (4)
254if (symbol.TypeKind == TypeKind.Delegate) 474if (type.TypeKind == TypeKind.Delegate) 738System.Diagnostics.Debug.Assert(method.ContainingType.TypeKind == TypeKind.Delegate); 1003case TypeKind.Delegate:
Emitter\Model\MethodSymbolAdapter.cs (1)
615return this.IsExtern || (object)ContainingType != null && ContainingType.TypeKind == TypeKind.Delegate;
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
521case TypeKind.Delegate:
Emitter\NoPia\EmbeddedType.cs (1)
160case TypeKind.Delegate:
Emitter\NoPia\EmbeddedTypesManager.cs (3)
294case TypeKind.Delegate: 401Debug.Assert(namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum || namedType.TypeKind == TypeKind.Delegate); 457if (containerKind == TypeKind.Interface || containerKind == TypeKind.Delegate ||
FlowAnalysis\NullableWalker.cs (2)
8924NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { Parameters: { } parameters } signature } => (signature, parameters), 9675case BoundExpression arg when arg.Type is { TypeKind: TypeKind.Delegate }:
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
799if ((object)d != null && d.TypeKind == TypeKind.Delegate)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (6)
324if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 364if (symbolName is null && symbol.IsAnonymousType && symbol.TypeKind == TypeKind.Delegate) 589symbol.TypeKind == TypeKind.Delegate && 606case TypeKind.Delegate: 684if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 730case TypeKind.Delegate:
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
37public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
226public override TypeKind TypeKind => TypeKind.Delegate;
Symbols\ConstraintsHelper.cs (3)
221case TypeKind.Delegate: 223Debug.Assert(inherited || currentCompilation == null || constraintType.TypeKind != TypeKind.Delegate); 1540case TypeKind.Delegate:
Symbols\EnumConversions.cs (1)
27return TypeKind.Delegate;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
411case TypeKind.Delegate:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
98case TypeKind.Delegate:
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1271if (_containingType.TypeKind == TypeKind.Delegate)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1731case TypeKind.Delegate: 1787result = TypeKind.Delegate;
Symbols\NamedTypeSymbol.cs (1)
179if (TypeKind != TypeKind.Delegate)
Symbols\Source\SourceMemberContainerSymbol.cs (3)
340case TypeKind.Delegate: 376case TypeKind.Delegate: 2287if (this.TypeKind == TypeKind.Delegate)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
514case TypeKind.Delegate:
Symbols\Source\SourceNamedTypeSymbol.cs (1)
812case TypeKind.Delegate:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
44TypeKind is not (TypeKind.Enum or TypeKind.Delegate or TypeKind.Submission)) 521baseType.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 (6)
570return type.TypeKind == TypeKind.Delegate; 705case TypeKind.Delegate: 780case TypeKind.Delegate: 847goto case TypeKind.Delegate; 853case TypeKind.Delegate: 1514case TypeKind.Delegate:
Symbols\VarianceSafety.cs (2)
80case TypeKind.Delegate: 374case TypeKind.Delegate:
Utilities\TypeSymbolExtensions.cs (1)
194case TypeKind.Delegate:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
252if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 269if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
94if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 190else if (namedType.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
443if (type.TypeKind == TypeKind.Delegate) 1033if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1035return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
237[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (33)
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (28)
2404typeKind: TypeKind.Delegate, 2439typeKind: TypeKind.Delegate, 2472typeKind: TypeKind.Delegate, 2505typeKind: TypeKind.Delegate, 2538typeKind: TypeKind.Delegate, 2567typeKind: TypeKind.Delegate, 2596typeKind: TypeKind.Delegate, 2626typeKind: TypeKind.Delegate, 2661typeKind: TypeKind.Delegate, 2696typeKind: TypeKind.Delegate, 2729typeKind: TypeKind.Delegate, 2762typeKind: TypeKind.Delegate, 2792typeKind: TypeKind.Delegate, 2821typeKind: TypeKind.Delegate, 2856typeKind: TypeKind.Delegate, 2891typeKind: TypeKind.Delegate, 2924typeKind: TypeKind.Delegate, 2957typeKind: TypeKind.Delegate, 2987typeKind: TypeKind.Delegate, 3016typeKind: TypeKind.Delegate, 3050typeKind: TypeKind.Delegate, 3081typeKind: TypeKind.Delegate, 3403typeKind: TypeKind.Delegate, 3428typeKind: TypeKind.Delegate, 3463typeKind: TypeKind.Delegate, 3490typeKind: TypeKind.Delegate, 3597typeKind: TypeKind.Delegate, 3636typeKind: TypeKind.Delegate,
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (4)
178new SymbolKindOrTypeKind(TypeKind.Delegate) 226new SymbolKindOrTypeKind(TypeKind.Delegate) 341[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 })] 342[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 })]
SymbolKey\SymbolKeyTestBase.cs (1)
408else if (tinfo.Type != null && tinfo.Type.TypeKind != TypeKind.Delegate)
Microsoft.CodeAnalysis.CSharp.Features (6)
ChangeSignature\CSharpChangeSignatureService.cs (1)
166if (typeSymbol != null && typeSymbol.IsKind(SymbolKind.NamedType) && ((ITypeSymbol)typeSymbol).TypeKind == TypeKind.Delegate)
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
174if (semanticModel.GetTypeInfo(objectCreationExpression, cancellationToken).Type is INamedTypeSymbol type && within != null && type.TypeKind != TypeKind.Delegate)
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
83if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } or IFunctionPointerTypeSymbol) 131if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } expressionType)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
78if (type.TypeKind == TypeKind.Delegate) 115Debug.Assert(type.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
237[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\NullableReferenceTypesTests.cs (4)
116622Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 116642Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 116653Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 116762Assert.Equal(TypeKind.Delegate, compilation7.GetTypeByMetadataName("D").TypeKind);
Semantics\ScriptSemanticsTests.cs (1)
475Assert.Equal(TypeKind.Delegate, members[0].TypeKind);
Semantics\UseSiteErrorTests.cs (5)
2312Assert.Equal(TypeKind.Delegate, compilation1.GetTypeByMetadataName("D").TypeKind); 2330Assert.Equal(TypeKind.Delegate, compilation2.GetTypeByMetadataName("D").TypeKind); 2341Assert.Equal(TypeKind.Delegate, compilation3.GetTypeByMetadataName("D").TypeKind); 2386Assert.Equal(TypeKind.Delegate, compilation5.GetTypeByMetadataName("D").TypeKind); 2427Assert.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)
473if ((typeSym.TypeKind == TypeKind.Interface || typeSym.TypeKind == TypeKind.Class || typeSym.TypeKind == TypeKind.Struct || typeSym.TypeKind == TypeKind.Delegate)) 718return type.TypeKind == TypeKind.Delegate;
UsesIsNullableVisitor.cs (2)
171case TypeKind.Delegate: 186case TypeKind.Delegate:
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
252if (originalDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate) 269if (rewrittenDelegateCreationOperation.Type?.TypeKind != TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
94if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 190else if (namedType.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
443if (type.TypeKind == TypeKind.Delegate) 1033if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1035return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
SymbolFinder\DependentTypeFinderTests.cs (1)
580var delegates = transitiveImpls.Where(i => i.TypeKind == TypeKind.Delegate);
Microsoft.CodeAnalysis.Features (6)
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
164return type.TypeKind is not (TypeKind.Delegate or TypeKind.Struct or TypeKind.FunctionPointer or TypeKind.Pointer);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
303return (symbol is IParameterSymbol { ContainingType: not { TypeKind: TypeKind.Delegate } }) 344TypeKind.Delegate => FeaturesResources.delegate_,
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
43if (options.TypeKind == TypeKind.Delegate)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
465if (symbol.TypeKind == TypeKind.Delegate)
Shared\Extensions\ISymbolExtensions_2.cs (1)
64case TypeKind.Delegate:
Microsoft.CodeAnalysis.VisualBasic (69)
Binding\Binder_Conversions.vb (4)
790Case TypeKind.Delegate 1231If targetType.TypeKind <> TypeKind.Delegate AndAlso targetType.TypeKind <> TypeKind.Error Then 1383If(targetDelegateType.TypeKind = TypeKind.Delegate AndAlso targetDelegateType.IsFromCompilation(Me.Compilation), 1435If(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 240TypeKind.Delegate,
Binding\BinderFactory.vb (1)
395containingType.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)
455Case TypeKind.Enum, TypeKind.Interface, TypeKind.Delegate
Emit\NoPia\EmbeddedType.vb (1)
129Case TypeKind.Enum, TypeKind.Delegate, TypeKind.Interface
Emit\NoPia\EmbeddedTypesManager.vb (3)
239TypeKind.Delegate 334namedType.TypeKind = TypeKind.Delegate) 384containerKind = TypeKind.Delegate OrElse
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
461Debug.Assert(delegateType.TypeKind = TYPEKIND.Delegate)
Semantics\Conversions.vb (2)
2872Case TypeKind.Delegate 2912Return 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)
102Case TypeKind.Delegate
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (1)
219Case 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)
65If _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)
421If Not IsShared AndAlso String.Equals(name, WellKnownMemberNames.DelegateInvokeName, StringComparison.Ordinal) AndAlso _containingType.TypeKind = TypeKind.Delegate Then
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
1019result = TypeKind.Delegate
Symbols\NamedTypeSymbol.vb (1)
232If TypeKind <> TypeKind.Delegate Then
Symbols\Source\SourceMemberContainerTypeSymbol.vb (3)
39[Delegate] = CUShort(TypeKind.Delegate) << TypeKindShift 340Case TypeKind.Delegate 1645If 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 1508ElseIf TypeKind = TypeKind.Delegate Then
Symbols\Symbol_Attributes.vb (1)
110Case TypeKind.Delegate
Symbols\SymbolExtensions.vb (1)
45Case TypeKind.Delegate
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (1)
362Return 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 (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (2)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 96ElseIf namedType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
295If namedType.TypeKind = TypeKind.Delegate Then 711Return 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.Emit.UnitTests (1)
Emit\NoPiaEmbedTypes.vb (1)
1165Assert.Equal(TypeKind.Delegate, test11.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Features (5)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
132If 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)
6812Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6814Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 6887Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6889Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 6962Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 6964Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7037Assert.Equal(TypeKind.Delegate, semanticInfo.Type.TypeKind) 7039Assert.Equal(TypeKind.Delegate, semanticInfo.ConvertedType.TypeKind) 7739Assert.Equal(TypeKind.Delegate, semanticSummary.Type.TypeKind) 7741Assert.Equal(TypeKind.Delegate, semanticSummary.ConvertedType.TypeKind) 7774Assert.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)
51Assert.Equal(TypeKind.Delegate, func.TypeKind)
SymbolsTests\Retargeting\RetargetingTests.vb (2)
1014Assert.Equal(TypeKind.Delegate, CType(sourceType.GetMembers.Item(1), SourceNamedTypeSymbol).TypeKind) 1015Assert.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)
128Assert.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)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (2)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate, 96ElseIf namedType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
328objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContextExtensions.vb (1)
125objectCreationType.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\IMethodSymbolExtensions.vb (1)
32If parameter.Type.TypeKind = TypeKind.Delegate Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
295If namedType.TypeKind = TypeKind.Delegate Then 711Return 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,
Editing\SyntaxGenerator.cs (2)
790TypeKind.Delegate => type.GetMembers(WellKnownMemberNames.DelegateInvokeName) is [IMethodSymbol invoke, ..] 850case TypeKind.Delegate:
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
56TypeKind.Delegate or
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
30return symbol.ContainingType.TypeKind == TypeKind.Delegate
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (1)
127if (searchSymbol.IsConstructor() && searchSymbol.ContainingType.TypeKind == TypeKind.Delegate)
Shared\Extensions\IMethodSymbolExtensions.cs (1)
21Contract.ThrowIfFalse(delegateType.TypeKind == TypeKind.Delegate);
Shared\Extensions\SemanticModelExtensions.cs (1)
147if (namedType.TypeKind == TypeKind.Delegate ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
306=> symbol is ITypeSymbol { TypeKind: TypeKind.Delegate }; 697if (!methods.Any(x => x.Name == WellKnownMemberNames.OnCompleted && x.ReturnsVoid && x.Parameters is [{ Type.TypeKind: TypeKind.Delegate }]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
88=> symbol?.TypeKind == TypeKind.Delegate; 266case TypeKind.Delegate:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
411symbol.GetSymbolType()?.TypeKind != TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
134private static readonly SymbolKindOrTypeKind _delegate = new(TypeKind.Delegate); 392case TypeKind.Delegate:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
70new SymbolKindOrTypeKind(TypeKind.Delegate),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
513if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
192if (x.TypeKind == TypeKind.Delegate)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
493typeKind: TypeKind.Delegate,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
100return this.TypeKind == TypeKind.Delegate
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
EditorConfigParsing\NamingStyleParserTests.cs (1)
166symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Delegate), symbolKind),
Microsoft.Gen.Logging (2)
Parsing\Parser.LogProperties.cs (1)
308|| (property.Type.TypeKind == TypeKind.Delegate)
Parsing\Parser.Records.cs (1)
121if (memberType.TypeKind == TypeKind.Delegate)
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
222public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type is { TypeKind: TypeKind.Array or TypeKind.Delegate } or { SpecialType: SpecialType.System_Array or SpecialType.System_Object };
Microsoft.Interop.SourceGeneration (1)
ManagedTypeInfo.cs (1)
64if (type.TypeKind == TypeKind.Delegate)
Microsoft.VisualStudio.LanguageServices (6)
GenerateType\GenerateTypeDialogViewModel.cs (1)
229PopulateTypeKind(TypeKind.Delegate, "delegate", "Delegate");
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
180if (symbol.TypeKind == TypeKind.Delegate) 443return symbol is INamedTypeSymbol { TypeKind: TypeKind.Delegate }
Library\ObjectBrowser\ObjectList.cs (1)
210case TypeKind.Delegate:
Progression\GraphBuilder.cs (1)
577case 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)
758TypeKind.Delegate)
CodeModel\CSharpCodeModelService_Prototype.cs (1)
40if (namedType.TypeKind == TypeKind.Delegate)
ObjectBrowser\DescriptionBuilder.cs (2)
33Debug.Assert(typeSymbol.TypeKind == TypeKind.Delegate); 179typeSymbol.TypeKind != TypeKind.Delegate)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
119typeKind: TypeKind.Delegate);
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)
33Debug.Assert(typeSymbol.TypeKind = TypeKind.Delegate) 303If eventType IsNot Nothing AndAlso eventType.TypeKind = TypeKind.Delegate Then 343typeSymbol.TypeKind <> TypeKind.Delegate AndAlso