2 implementations of Type
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.VisualBasic (1)
279 references to Type
ConfigurationSchemaGenerator (1)
Microsoft.AspNetCore.App.CodeFixes (2)
Microsoft.CodeAnalysis (11)
Operations\ControlFlowGraphBuilder.cs (10)
3798local.Type,
4019processResource(new LocalReferenceOperation(localSymbol, isDeclaration: false, semanticModel: null, declarator.Syntax, localSymbol.Type,
4369lockStatement.LockTakenSymbol.Type, constantValue: null, isImplicit: true);
4410lockStatement.LockTakenSymbol.Type, constantValue: null, isImplicit: true);
4661current = applyConversion(info?.ElementConversion, current, local.Type);
4668local.Type,
4785operation.LoopControlVariable.Syntax, loopObject.Type,
5432declarator.Syntax, local.Type, constantValue: null, isImplicit: true);
5859type: localSymbol.Type,
5876var localRef = new LocalReferenceOperation(localSymbol, isDeclaration: true, semanticModel: null, declarator.Syntax, localSymbol.Type, constantValue: null, isImplicit: true);
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (20)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (58)
Semantics\OutVarTests.cs (34)
987AssertInfoForDeclarationExpressionSyntax(model, decl, expectedSymbol: local, expectedType: local.Type);
994Assert.Equal(local.Type, model.GetTypeInfo(reference).Type);
1150AssertInfoForDeclarationExpressionSyntax(model, decl, local, local.Type);
5756Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
12875Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(yDecl))).Type.ToTestDisplayString());
18036Assert.Equal("Cls.var", ((ILocalSymbol)model.GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18436Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18500Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18549Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18594Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
20225Assert.True(x1.Type.IsErrorType());
20254Assert.Equal("System.Int32", x1.Type.ToTestDisplayString());
21313Assert.True(((ILocalSymbol)y1).Type.IsErrorType());
21373Assert.True(symbol.Type.IsErrorType());
33622Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
33708Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34764Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34845Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34897Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34951Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35009Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35060Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35113Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35152Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35186Assert.Equal("var", symbol.Type.ToTestDisplayString());
35225Assert.Equal("var", symbol.Type.ToTestDisplayString());
35269Assert.Equal("var", symbol.Type.ToTestDisplayString());
35300Assert.Equal("var", symbol.Type.ToTestDisplayString());
35339Assert.Equal("var", symbol.Type.ToTestDisplayString());
35372Assert.Equal("var", symbol.Type.ToTestDisplayString());
35408Assert.Equal("var", symbol.Type.ToTestDisplayString());
35447Assert.Equal("var", symbol.Type.ToTestDisplayString());
35477Assert.Equal("var", symbol.Type.ToTestDisplayString());
35514Assert.Equal("var", symbol.Type.ToTestDisplayString());
Semantics\PatternMatchingTests_ListPatterns.cs (11)
3332Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3339Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3647Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
3727Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
3742Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
4097Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4184Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4261Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4376Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4417Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
4568Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Features (15)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (54)
Semantics\NullableReferenceTypesTests.cs (19)
5174Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
5175Assert.Equal("T?", local.Type.ToTestDisplayString(includeNonNullable: true));
145378Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145380Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145419Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145421Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145459Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145461Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145497Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145499Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145535Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145537Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145639Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145641Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145678Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145680Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
154885symbol.Type.NullableAnnotation);
158819Assert.Equal("T?", local.Type.ToTestDisplayString());
158820Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
Semantics\UsingStatementTests.cs (9)
67Assert.Equal(SpecialType.System_IDisposable, declaredLocal.Type.SpecialType);
1348Assert.Equal(((ILocalSymbol)declaredSymbol).Type, typeInfo.Symbol);
1389Assert.Equal(((ILocalSymbol)model.GetDeclaredSymbol(usingStatement.Declaration.Variables.First())).Type, typeInfo.Symbol);
1525VerifySymbolInfoForUsingStatements(compilation, x.Type);
1556VerifySymbolInfoForUsingStatements(compilation, x.Type, 2);
1585VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1613VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1642VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1670VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (43)
Symbols\Source\NullablePublicAPITests.cs (22)
1006var result = localSymbol.Type.NullableAnnotation;
1178Assert.Equal(declaredSymbol.Type.NullableAnnotation, declaredSymbol.NullableAnnotation);
1950Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
1997Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2058Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2060Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2101Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2103Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2140Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2144Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2189Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2221Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2259Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2291Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2337Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2379Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2422Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2464Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2512Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2561Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
3923Assert.Equal(PublicNullableAnnotation.Annotated, o2Symbol.Type.NullableAnnotation);
3937Assert.Equal(PublicNullableAnnotation.Annotated, o4Symbol.Type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.Features (14)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
45=> symbol.Type.Accept(this);
Microsoft.CodeAnalysis.Test.Utilities (5)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (4)
108AssignTo(local, local.Type, localsSourceTypes, initializer.Value);
114AssignTo(local, local.Type, localsSourceTypes, initializer.Value);
126if (HasMoreSpecificSourceType(local, local.Type, localsSourceTypes, out var mostSpecificSourceType))
243AssignTo(targetLocal, targetLocal.Type, localsSourceTypes, sourceType);
Microsoft.CodeAnalysis.VisualBasic (3)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\VariableDeclaratorSyntaxExtensions.vb (1)
41Return localSymbol.Type
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\VariableDeclaratorSyntaxExtensions.vb (1)
41Return localSymbol.Type
Microsoft.CodeAnalysis.Workspaces (6)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)