3 implementations of IsAnonymousType
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
167bool ITypeSymbol.IsAnonymousType => UnderlyingTypeSymbol.IsAnonymousType;
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
55public bool IsAnonymousType => _symbol.IsAnonymousType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
251Public Overridable ReadOnly Property IsAnonymousType As Boolean Implements ITypeSymbol.IsAnonymousType
85 references to IsAnonymousType
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Emitters\DiagnosticEmitter.cs (1)
24if (response.ResponseType?.IsAnonymousType == true)
Microsoft.CodeAnalysis (4)
Operations\ControlFlowGraphBuilder.cs (3)
7143operation.Property.ContainingType.IsAnonymousType && 7917if (operation.Type!.IsAnonymousType) 7944Debug.Assert(operation.Type!.IsAnonymousType);
Operations\ControlFlowGraphBuilder.ImplicitInstanceInfo.cs (1)
45Debug.Assert(currentInitializedAnonymousType.IsAnonymousType);
Microsoft.CodeAnalysis.CodeStyle (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
309=> symbol is INamedTypeSymbol { IsAnonymousType: true };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
97=> symbol?.IsAnonymousType == true; 326if (type.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
65if (symbol.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousTypeSymbolKey.cs (2)
20Debug.Assert(symbol.IsAnonymousType); 37contextualSymbol = contextualSymbol is { IsAnonymousType: true } ? contextualSymbol : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
423else if (namedTypeSymbol.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (1)
200if (x is { MethodKind: MethodKind.DelegateInvoke, ContainingType.IsAnonymousType: true })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (6)
360x.IsAnonymousType != y.IsAnonymousType || 406if (x.IsAnonymousType) 586if (x.ContainingType.IsAnonymousType && y.ContainingType.IsAnonymousType) 640if (x.TypeParameterKind == TypeParameterKind.Type && x.ContainingType.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
175Hash.Combine(x.IsAnonymousType, 180if (x.IsAnonymousType) 275if (x.TypeParameterKind == TypeParameterKind.Type && x.ContainingType.IsAnonymousType)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
40if (typeToGenerateIn.IsAnonymousType)
Microsoft.CodeAnalysis.CSharp (5)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
473var name = Format.CompilerInternalOptions.IncludesOption(SymbolDisplayCompilerInternalOptions.UseMetadataMemberNames) || symbol.ContainingType == null || symbol.ContainingType.IsAnonymousType
SymbolDisplay\SymbolDisplayVisitor.Types.cs (3)
324if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate) 364if (symbolName is null && symbol.IsAnonymousType && symbol.TypeKind == TypeKind.Delegate) 684if (symbol.IsAnonymousType && symbol.TypeKind != TypeKind.Delegate)
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
128if (!(symbol.IsAnonymousType || symbol.IsTupleType))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
188if (symbol.Name == string.Empty || symbol.IsAnonymousType)
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
47if (type == null || type.TypeKind == TypeKind.Error || type.IsAnonymousType)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Compilation\CompilationAPITests.cs (3)
2610Assert.True(type.IsAnonymousType); 2631Assert.True(type.IsAnonymousType); 2646Assert.True(type.IsAnonymousType);
Symbols\AnonymousTypesSemanticsTests.cs (1)
1988Assert.True(type.IsAnonymousType);
Symbols\Source\DeclaringSyntaxNodeTests.cs (2)
266Assert.True(localA1Type.IsAnonymousType); 330Assert.True(localType.IsAnonymousType);
Symbols\TypeTests.cs (1)
1686Assert.True(anonymousType.IsAnonymousType);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
188if (symbol.Name == string.Empty || symbol.IsAnonymousType)
Microsoft.CodeAnalysis.Features (7)
CodeRefactorings\MoveType\AbstractMoveTypeService.State.cs (1)
60typeSymbol.IsAnonymousType ||
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
100fieldOrProperty.ContainingType.IsAnonymousType ||
InlineHints\AbstractInlineTypeHintsService.cs (1)
116if (part.Symbol is INamedTypeSymbol { IsAnonymousType: true } anonymousType)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
55public bool IsAnonymousType => _symbol.IsAnonymousType;
RQName\RQNodeBuilder.cs (2)
63if (type.IsAnonymousType) 260if (symbol.IsAnonymousType)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
40if (typeToGenerateIn.IsAnonymousType)
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1892n.Type.IsAnonymousType &&
Microsoft.CodeAnalysis.VisualBasic (8)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (6)
116If symbol.IsAnonymousType OrElse 175If symbol.IsAnonymousType OrElse 185If symbol.IsAnonymousType OrElse Format.DelegateStyle = SymbolDisplayDelegateStyle.NameAndSignature Then 200(symbol.IsAnonymousType OrElse Format.DelegateStyle <> SymbolDisplayDelegateStyle.NameOnly) AndAlso 209If symbol.IsAnonymousType Then 430If symbol.IsAnonymousType Then
SymbolDisplay\SymbolDisplayVisitor_Minimal.vb (1)
98If Not (symbol.IsAnonymousType OrElse symbol.IsTupleType) Then
Symbols\TypeSymbol.vb (1)
251Public Overridable ReadOnly Property IsAnonymousType As Boolean Implements ITypeSymbol.IsAnonymousType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
77If symbol.Name = String.Empty OrElse symbol.IsAnonymousType Then
Microsoft.CodeAnalysis.VisualBasic.Features (3)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (2)
190targetType.IsAnonymousType Then 357targetType.IsAnonymousType Then
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (1)
42If invokeMethod.ContainingType.IsAnonymousType Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Compilation\CompilationAPITests.vb (5)
1590Assert.True(type.IsAnonymousType) 1612Assert.True(type.IsAnonymousType) 1637Assert.True(type.IsAnonymousType) 1652Assert.True(type.IsAnonymousType) 1666Assert.True(type.IsAnonymousType)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
77If symbol.Name = String.Empty OrElse symbol.IsAnonymousType Then
Microsoft.CodeAnalysis.Workspaces (18)
Shared\Extensions\SemanticModelExtensions.cs (1)
24if (symbol.IsConstructor() && symbol.ContainingType.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
309=> symbol is INamedTypeSymbol { IsAnonymousType: true };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
97=> symbol?.IsAnonymousType == true; 326if (type.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
65if (symbol.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousTypeSymbolKey.cs (2)
20Debug.Assert(symbol.IsAnonymousType); 37contextualSymbol = contextualSymbol is { IsAnonymousType: true } ? contextualSymbol : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
423else if (namedTypeSymbol.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (1)
200if (x is { MethodKind: MethodKind.DelegateInvoke, ContainingType.IsAnonymousType: true })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (6)
360x.IsAnonymousType != y.IsAnonymousType || 406if (x.IsAnonymousType) 586if (x.ContainingType.IsAnonymousType && y.ContainingType.IsAnonymousType) 640if (x.TypeParameterKind == TypeParameterKind.Type && x.ContainingType.IsAnonymousType)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
175Hash.Combine(x.IsAnonymousType, 180if (x.IsAnonymousType) 275if (x.TypeParameterKind == TypeParameterKind.Type && x.ContainingType.IsAnonymousType)
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
498if (symbol is ITypeSymbol typeSymbol && typeSymbol.IsAnonymousType)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Help\VisualBasicHelpContextService.Visitor.vb (1)
820If local.Type.IsAnonymousType Then