53 references to Type
ILLink.RoslynAnalyzer (5)
COMAnalyzer.cs (2)
64 typedConstant.Type != null && typedConstant.Type.IsUnmanagedType) {
RequiresAssemblyFilesAnalyzer.cs (1)
127 attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
RequiresDynamicCodeAnalyzer.cs (1)
140 attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
RequiresUnreferencedCodeUtils.cs (1)
37 => attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
249if (SymbolEqualityComparer.Default.Equals(ctorArg.Type, param.Type))
Microsoft.AspNetCore.Mvc.Analyzers (1)
TopLevelParameterNameAnalyzer.cs (1)
165namedArgumentValue.Type.SpecialType == SpecialType.System_String &&
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
SymbolApiResponseMetadataProvider.cs (1)
195(namedArgumentValue.Type.SpecialType & SpecialType.System_Int32) == SpecialType.System_Int32 &&
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
711attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }])
Microsoft.CodeAnalysis.CSharp (4)
Symbols\TypedConstantExtensions.cs (4)
52SpecialType splType = ((INamedTypeSymbol)constant.Type!).EnumUnderlyingType!.SpecialType; 56string typeName = constant.Type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat); 82var members = constant.Type!.GetMembers(); 161var members = constant.Type!.GetMembers();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
32return GenerateExpression(generator, typedConstant.Type, typedConstant.Value, canUseFieldReference: true);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_Dynamic.cs (1)
551Assert.Equal("System.Boolean", actualTransformFlag.Type.ToTestDisplayString());
Attributes\AttributeTests_Tuples.cs (1)
647Assert.True(constant.Type.SpecialType == SpecialType.System_String);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\TypedConstantTests.cs (8)
50Assert.Equal<object>(common.Type, lang.Type); 54Assert.Equal(common.Type, common2.Type); 64Assert.Equal<object>(commonArray.Type, langArray.Type); 68Assert.Equal(commonArray.Type, commonArray2.Type);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
32return GenerateExpression(generator, typedConstant.Type, typedConstant.Value, canUseFieldReference: true);
Microsoft.CodeAnalysis.Features (2)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
321if (attribute is { ConstructorArguments: [{ Type.SpecialType: SpecialType.System_String, Value: string stringValue }] })
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
711attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }])
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\TypedConstant.vb (3)
57Dim typeName As String = constant.Type.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat) 78Dim members = constant.Type.GetMembers() 142Dim members = constant.Type.GetMembers()
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
21Return GenerateExpression(generator, typedConstant.Type, typedConstant.Value, canUseFieldReference:=True)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Attributes\AttributeTests_Tuples.vb (1)
443Assert.True(constant.Type.SpecialType = SpecialType.System_String)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (8)
SymbolsTests\TypedConstantTests.vb (8)
41AssertEx.Equal(Of Object)(common.Type, lang.Type) 45Assert.Equal(common.Type, common2.Type) 54AssertEx.Equal(Of Object)(commonArray.Type, langArray.Type) 58Assert.Equal(commonArray.Type, commonArray2.Type)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
21Return GenerateExpression(generator, typedConstant.Type, typedConstant.Value, canUseFieldReference:=True)
Microsoft.CodeAnalysis.Workspaces (2)
FindSymbols\FindReferences\DependentProjectsFinder.cs (2)
289if (typeNameConstant.Type == null || 290typeNameConstant.Type.SpecialType != SpecialType.System_String ||
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
154if (items[0].Type.SpecialType == SpecialType.System_String)
Microsoft.Extensions.Options.SourceGeneration (3)
Parser.cs (3)
516validationAttr.ConstructorArguments.Add(GetArgumentExpression(argument.Type!, argument.Value)); 529validationAttr.Properties.Add(namedArgument.Key, GetArgumentExpression(namedArgument.Value.Type!, namedArgument.Value.Value)); 788sb.Append(GetArgumentExpression(value[i].Type!, value[i].Value));
Microsoft.Gen.Logging (2)
Parsing\AttributeProcessors.cs (2)
43if (SymbolEqualityComparer.Default.Equals(a.Type, symbols.LogLevelSymbol)) 51else if (a.Type?.SpecialType == SpecialType.System_Int32)
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
60switch (ctorArg0.Type.ToDisplayString())
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
293Debug.Assert(attributeData.ConstructorArguments.Length == 1 & attributeData.ConstructorArguments[0].Type?.Name is nameof(JsonSerializerDefaults)); 1280namedArgs[0].Value.Type?.ToDisplayString() == JsonIgnoreConditionFullName)
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
96if (items[2].Type?.SpecialType == SpecialType.System_Int32)