9201 references to SpecialType
Aspire.Hosting.Analyzers (2)
AppHostAnalyzer.cs (1)
92SymbolEqualityComparer.Default.Equals(parameterData.Symbol.Type, wellKnownTypes.Get(SpecialType.System_String))
Infrastructure\WellKnownTypes.cs (1)
53public INamedTypeSymbol Get(SpecialType type)
Aspire.Hosting.Azure.Provisioning.Generators (24)
AspireProvisioningProxyGenerator.cs (24)
1896constructor.Parameters[0].Parameter.Type.SpecialType == SpecialType.System_String).ToList(); 1987!(parameter.Type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T }) 2351current.SpecialType is not SpecialType.System_Object and not SpecialType.System_ValueType; 2381current.SpecialType is not SpecialType.System_Object and not SpecialType.System_ValueType; 2419if (type.SpecialType == SpecialType.System_Void) 2429OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, 2510OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, 2660if (type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } nullableType) 2671SpecialType.System_String or 2672SpecialType.System_Char or 2673SpecialType.System_Boolean or 2674SpecialType.System_SByte or 2675SpecialType.System_Byte or 2676SpecialType.System_Int16 or 2677SpecialType.System_UInt16 or 2678SpecialType.System_Int32 or 2679SpecialType.System_UInt32 or 2680SpecialType.System_Int64 or 2681SpecialType.System_UInt64 or 2682SpecialType.System_Single or 2683SpecialType.System_Double or 2684SpecialType.System_Decimal)
Aspire.Hosting.Integration.Analyzers (22)
AspireExportAnalyzer.cs (21)
891if (paramType is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } nullable) 918if (contextNamedType.SpecialType != SpecialType.None || 974type.BaseType?.SpecialType == SpecialType.System_MulticastDelegate; 2134if (type.SpecialType == SpecialType.System_Void) 2225namedType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T && 2287SpecialType.System_Boolean => true, 2288SpecialType.System_Byte => true, 2289SpecialType.System_SByte => true, 2290SpecialType.System_Int16 => true, 2291SpecialType.System_UInt16 => true, 2292SpecialType.System_Int32 => true, 2293SpecialType.System_UInt32 => true, 2294SpecialType.System_Int64 => true, 2295SpecialType.System_UInt64 => true, 2296SpecialType.System_Single => true, 2297SpecialType.System_Double => true, 2298SpecialType.System_Decimal => true, 2299SpecialType.System_Char => true, 2300SpecialType.System_String => true, 2301SpecialType.System_DateTime => true, 2302SpecialType.System_Object => true, // Maps to 'any' in ATS
src\Aspire.Hosting.Analyzers\Infrastructure\WellKnownTypes.cs (1)
53public INamedTypeSymbol Get(SpecialType type)
ConfigurationSchemaGenerator (43)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (24)
67type.SpecialType is SpecialType.System_Object or SpecialType.System_Void || 223unboundGeneric.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 235if (type is IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte }) 253SpecialType specialType = namedType.SpecialType; 257case SpecialType.System_String: 258case SpecialType.System_Object: 263case SpecialType.System_Boolean: 264case SpecialType.System_Char: 269case SpecialType.System_Single: 270case SpecialType.System_Double: 271case SpecialType.System_Decimal: 276case SpecialType.System_Byte: 277case SpecialType.System_Int16: 278case SpecialType.System_Int32: 279case SpecialType.System_Int64: 280case SpecialType.System_SByte: 281case SpecialType.System_UInt16: 282case SpecialType.System_UInt32: 283case SpecialType.System_UInt64: 288case SpecialType.System_DateTime: 293case SpecialType.None: 542if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 962if (firstParam.Name == "argument" && firstParam.Type.SpecialType == SpecialType.System_Object
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (5)
58if (@params[1].Type.SpecialType is SpecialType.System_String) 82if (instanceArg.Parameter?.Type.SpecialType is not SpecialType.System_Object) 200if (paramCount > 3 || @params[1].Type.SpecialType is not SpecialType.System_String) 222if (@params[2].Type.SpecialType is not SpecialType.System_String) 234else if (paramCount is 4 && @params[3].Type.SpecialType is SpecialType.System_Object)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (9)
73String = compilation.GetSpecialType(SpecialType.System_String); 100IEnumerable = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 106GenericICollection = compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T); 117GenericIEnumerable_Unbound = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).ConstructUnboundGenericType(); 118GenericIList_Unbound = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IList_T).ConstructUnboundGenericType(); 126Enum = compilation.GetSpecialType(SpecialType.System_Enum); 132IntPtr = Compilation.GetSpecialType(SpecialType.System_IntPtr); 133UIntPtr = Compilation.GetSpecialType(SpecialType.System_UIntPtr); 134Delegate = Compilation.GetSpecialType(SpecialType.System_Delegate);
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (1)
79@params[1].Type.SpecialType is SpecialType.System_String &&
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (2)
44if (secondParamType.SpecialType is SpecialType.System_String && 60@params[1].Type.SpecialType is SpecialType.System_String &&
RuntimeSource\SourceGenerators\TypeRef.cs (2)
34public SpecialType SpecialType { get; } 36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;
GenerateDocumentationAndConfigFiles (429)
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 185Name: "Dispose", MethodKind: MethodKind.Ordinary, ReturnsVoid: true, Parameters: [{ Type.SpecialType: SpecialType.System_Boolean, RefKind: RefKind.None }] 230method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 397method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 411method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 490method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 530method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 249=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 257=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 263=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
14protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 77var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 137IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 171var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 187var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
21SpecialType specialType, 25public SpecialType SpecialType { get; protected set; } = specialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
58parameterType ??= compilation.GetSpecialType(SpecialType.System_Object); 66returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 436case SpecialType.System_Boolean: 437case SpecialType.System_Char: 438case SpecialType.System_SByte: 439case SpecialType.System_Byte: 440case SpecialType.System_Int16: 441case SpecialType.System_UInt16: 442case SpecialType.System_Int32: 443case SpecialType.System_UInt32: 444case SpecialType.System_Int64: 445case SpecialType.System_UInt64: 446case SpecialType.System_Decimal: 447case SpecialType.System_Single: 448case SpecialType.System_Double: 449case SpecialType.System_String: 450case SpecialType.System_DateTime: 468method.ReturnType.SpecialType == SpecialType.System_Boolean && 469method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 182else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 303SpecialType? patternValueType) 305if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 445if (containingType?.SpecialType == SpecialType.System_Array || 446containingType?.SpecialType == SpecialType.System_String) 456case SpecialType.System_Byte: 457case SpecialType.System_UInt16: 458case SpecialType.System_UInt32: 459case SpecialType.System_UInt64: 501SpecialType? patternValueType) 508if (patternValueType == SpecialType.System_Boolean)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
ILLink.RoslynAnalyzer (23)
ISymbolExtensions.cs (1)
222methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
ITypeSymbolExtensions.cs (5)
21if (type.SpecialType is SpecialType.System_String && !isByRef) 76SpecialType.System_String => WellKnownType.System_String, 77SpecialType.System_Nullable_T => WellKnownType.System_Nullable_T, 78SpecialType.System_Array => WellKnownType.System_Array, 79SpecialType.System_Object => WellKnownType.System_Object,
RequiresAnalyzerBase.cs (1)
370if (!propertySymbol.IsStatic || propertySymbol.Type.SpecialType != SpecialType.System_Boolean || propertySymbol.SetMethod != null)
RequiresAssemblyFilesAnalyzer.cs (1)
136attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [{ Type.SpecialType: SpecialType.System_String }, ..];
RequiresDynamicCodeAnalyzer.cs (1)
190attribute.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 }, ..];
TrimAnalysis\FeatureCheckReturnValuePattern.cs (1)
40if (!OwningSymbol.IsStatic || OwningSymbol.Type.SpecialType != SpecialType.System_Boolean || OwningSymbol.SetMethod != null)
TrimAnalysis\GenericParameterProxy.cs (1)
21if (constraintType.SpecialType == SpecialType.System_Enum)
TrimAnalysis\MethodProxy.cs (1)
56internal partial bool ReturnsVoid() => Method.ReturnType.SpecialType == SpecialType.System_Void;
TrimAnalysis\SingleValueExtensions.cs (1)
16if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
TrimAnalysis\TrimAnalysisVisitor.cs (9)
202(operation.Type?.TypeKind == TypeKind.Enum || operation.Type?.SpecialType == SpecialType.System_Int32)) 543case SpecialType.System_String when constantValue is string stringConstantValue: 546case SpecialType.System_Boolean when constantValue is bool boolConstantValue: 549case SpecialType.System_SByte when constantValue is sbyte sbyteConstantValue: 552case SpecialType.System_Byte when constantValue is byte byteConstantValue: 555case SpecialType.System_Int16 when constantValue is short int16ConstantValue: 558case SpecialType.System_UInt16 when constantValue is ushort uint16ConstantValue: 561case SpecialType.System_Int32 when constantValue is int int32ConstantValue: 564case SpecialType.System_UInt32 when constantValue is uint uint32ConstantValue:
Microsoft.Analyzers.Extra (5)
CallAnalysis\Arrays.cs (2)
109|| keyType.SpecialType == SpecialType.System_Byte 110|| keyType.SpecialType == SpecialType.System_SByte)
CallAnalysis\StartsEndsWith.cs (1)
19var stringType = reg.Compilation.GetSpecialType(SpecialType.System_String);
CoalesceAnalyzer.cs (2)
37&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T) 64&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T)
Microsoft.Analyzers.Local (9)
ApiLifecycle\AssemblyAnalysis.cs (3)
148if (type.EnumUnderlyingType.SpecialType != SpecialType.System_Int32) 155if (baseType != null && baseType.SpecialType != SpecialType.System_Object && baseType.SpecialType != SpecialType.System_ValueType)
CallAnalysis\ToInvariantString.cs (6)
16private static readonly SpecialType[] _intTypes = new[] 18SpecialType.System_Byte, 19SpecialType.System_Int16, 20SpecialType.System_Int32, 21SpecialType.System_Int64, 28foreach (var type in _intTypes)
Microsoft.AspNetCore.App.Analyzers (15)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
30property.Parameters[0].Type.SpecialType == SpecialType.System_String &&
RouteEmbeddedLanguage\Infrastructure\MvcDetector.cs (1)
30var disposable = wellKnownTypes.Get(SpecialType.System_IDisposable);
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (2)
277var delegateSymbol = semanticModel.Compilation.GetSpecialType(SpecialType.System_Delegate); 290var stringSymbol = semanticModel.Compilation.GetSpecialType(SpecialType.System_String);
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (1)
132if (parameterTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T &&
src\aspnetcore\src\Shared\Roslyn\MvcFacts.cs (2)
74if (declaringType == null || declaringType.SpecialType == SpecialType.System_Object) 137if (method.ExplicitInterfaceImplementations[i].ContainingType.SpecialType == SpecialType.System_IDisposable)
src\aspnetcore\src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
40if (typeSymbol.SpecialType == SpecialType.System_String) 98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 100methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 110methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (2)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T) 317if (typeSymbol.OriginalDefinition?.SpecialType == SpecialType.System_Nullable_T &&
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (1)
58public INamedTypeSymbol Get(SpecialType type)
Microsoft.AspNetCore.Components.AI.SourceGenerators (9)
ToolBlockParser.cs (9)
240|| type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 261if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T 270SpecialType.System_String => ParameterTypeKind.String, 271SpecialType.System_Int32 => ParameterTypeKind.Int32, 272SpecialType.System_Int64 => ParameterTypeKind.Int64, 273SpecialType.System_Double => ParameterTypeKind.Double, 274SpecialType.System_Single => ParameterTypeKind.Single, 275SpecialType.System_Decimal => ParameterTypeKind.Decimal, 276SpecialType.System_Boolean => ParameterTypeKind.Boolean,
Microsoft.AspNetCore.Components.Analyzers (5)
ComponentDisposableSanityAnalyzer.cs (2)
37var iDisposableType = context.Compilation.GetSpecialType(SpecialType.System_IDisposable); 77&& method.ReturnType.SpecialType == SpecialType.System_Void)
ComponentSymbols.cs (2)
40var @string = compilation.GetSpecialType(SpecialType.System_String); 41var @object = compilation.GetSpecialType(SpecialType.System_Object);
InvokeAsyncOfObjectAnalyzer.cs (1)
43var objectType = compilationContext.Compilation.GetSpecialType(SpecialType.System_Object);
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
ComponentSymbols.cs (2)
40var @string = compilation.GetSpecialType(SpecialType.System_String); 41var @object = compilation.GetSpecialType(SpecialType.System_Object);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (26)
src\aspnetcore\src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
40if (typeSymbol.SpecialType == SpecialType.System_String) 98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 100methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 110methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (2)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T) 317if (typeSymbol.OriginalDefinition?.SpecialType == SpecialType.System_Nullable_T &&
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (1)
58public INamedTypeSymbol Get(SpecialType type)
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
235var fallback = endpointParameter.Type.SpecialType == SpecialType.System_String ? endpointParameter.DefaultValue : "null";
StaticRouteHandlerModel\Endpoint.cs (1)
92parameter is { IsArray: true, ElementType.SpecialType: SpecialType.System_String, Source: EndpointParameterSource.Query });
StaticRouteHandlerModel\EndpointParameter.cs (6)
226else if (Type.SpecialType == SpecialType.System_String) 230else if (IsArray && ElementType.SpecialType == SpecialType.System_String) 262|| Type.SpecialType == SpecialType.System_String 263|| (IsArray && ElementType.SpecialType == SpecialType.System_String) 354if (parameterType.SpecialType == SpecialType.System_Char) 358else if (parameterType.SpecialType == SpecialType.System_DateTime)
StaticRouteHandlerModel\EndpointResponse.cs (3)
77ResponseType.SpecialType != SpecialType.System_String && 78ResponseType.SpecialType != SpecialType.System_Object; 99return ResponseType!.SpecialType is SpecialType.System_String ? "text/plain; charset=utf-8" : "application/json";
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (2)
44if (handlerParameterType is INamedTypeSymbol { IsGenericType: true, OriginalDefinition: { SpecialType: not SpecialType.System_Nullable_T } }) 58=> typeSymbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (5)
123&& (responseType.SpecialType == SpecialType.System_Object || responseType.SpecialType == SpecialType.System_String)) 148else if (endpointResponse.ResponseType?.SpecialType == SpecialType.System_String) 152else if (endpointResponse.ResponseType?.SpecialType == SpecialType.System_Object) 214if (response.ResponseType?.SpecialType == SpecialType.System_String)
Microsoft.AspNetCore.Mvc.Analyzers (4)
src\aspnetcore\src\Shared\Roslyn\MvcFacts.cs (2)
74if (declaringType == null || declaringType.SpecialType == SpecialType.System_Object) 137if (method.ExplicitInterfaceImplementations[i].ContainingType.SpecialType == SpecialType.System_IDisposable)
TopLevelParameterNameAnalyzer.cs (2)
165namedArgumentValue.Type.SpecialType == SpecialType.System_String && 277var disposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
Microsoft.Build.TaskAuthoring.Analyzer (45)
MultiThreadableTaskCodeFixProvider.cs (1)
130parameter.Type.SpecialType != SpecialType.System_String ||
PreferTypedParameterAnalyzer.cs (2)
346if (member.Type.SpecialType == SpecialType.System_String) 567arg.Parameter.Type.SpecialType != SpecialType.System_String ||
PreferTypedParameterCodeFixProvider.cs (3)
484semanticModel.GetSymbolInfo(expr, cancellationToken).Symbol?.ContainingType?.SpecialType == SpecialType.System_String; 656method.ContainingType?.SpecialType == SpecialType.System_String && 734return argumentOperation.Parameter?.Type.SpecialType == SpecialType.System_String;
SharedAnalyzerHelpers.cs (6)
180baseType is not null && baseType.SpecialType != SpecialType.System_Object; 251if (param is null || param.Type.SpecialType != SpecialType.System_String) 279invocation.TargetMethod.ReturnType.SpecialType != SpecialType.System_String || 293Property: { Name: "Value", IsStatic: false, Type.SpecialType: SpecialType.System_String } property 465namedType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T && 600current is not null && current.SpecialType != SpecialType.System_Object;
SupportedTaskItemTypes.cs (32)
14internal SupportedSpecialType(SpecialType specialType, string displayName) 20internal SpecialType SpecialType { get; } 26new SupportedSpecialType(SpecialType.System_Boolean, "bool"), 27new SupportedSpecialType(SpecialType.System_Char, "char"), 28new SupportedSpecialType(SpecialType.System_Byte, "byte"), 29new SupportedSpecialType(SpecialType.System_SByte, "sbyte"), 30new SupportedSpecialType(SpecialType.System_Int16, "short"), 31new SupportedSpecialType(SpecialType.System_UInt16, "ushort"), 32new SupportedSpecialType(SpecialType.System_Int32, "int"), 33new SupportedSpecialType(SpecialType.System_UInt32, "uint"), 34new SupportedSpecialType(SpecialType.System_Int64, "long"), 35new SupportedSpecialType(SpecialType.System_UInt64, "ulong"), 36new SupportedSpecialType(SpecialType.System_Single, "float"), 37new SupportedSpecialType(SpecialType.System_Double, "double"), 38new SupportedSpecialType(SpecialType.System_Decimal, "decimal"), 39new SupportedSpecialType(SpecialType.System_DateTime, "DateTime"), 40new SupportedSpecialType(SpecialType.System_String, "string")); 46internal static bool TryGetSpecialTypeDisplayName(SpecialType specialType, out string? displayName) 61internal static bool IsConvertChangeTypeTaskItemType(SpecialType specialType) 63SpecialType.System_Char or 64SpecialType.System_Byte or 65SpecialType.System_SByte or 66SpecialType.System_Int16 or 67SpecialType.System_UInt16 or 68SpecialType.System_Int32 or 69SpecialType.System_UInt32 or 70SpecialType.System_Int64 or 71SpecialType.System_UInt64 or 72SpecialType.System_Single or 73SpecialType.System_Double or 74SpecialType.System_Decimal or 75SpecialType.System_DateTime;
TransitiveCallChainAnalyzer.cs (1)
438currentType is not null && currentType.SpecialType != SpecialType.System_Object;
Microsoft.CodeAnalysis (1825)
CommandLine\SarifV2ErrorLogger.cs (1)
80string? justification = suppressionInfo?.Attribute?.DecodeNamedArgument<string>("Justification", SpecialType.System_String);
Compilation\Compilation.cs (4)
992public INamedTypeSymbol GetSpecialType(SpecialType specialType) 994if (specialType <= SpecialType.None || specialType > SpecialType.Count) 1012private protected abstract INamedTypeSymbolInternal CommonGetSpecialType(SpecialType specialType);
Compilation\Expression.cs (13)
13case SpecialType.System_Int32: 15case SpecialType.System_Int64: 17case SpecialType.System_UInt32: 19case SpecialType.System_UInt64: 21case SpecialType.System_UInt16: 23case SpecialType.System_Int16: 25case SpecialType.System_SByte: 27case SpecialType.System_Byte: 29case SpecialType.System_Char: 31case SpecialType.System_Boolean: 33case SpecialType.System_Single: 35case SpecialType.System_Double: 37case SpecialType.System_Object:
ConstantValue.cs (41)
43internal abstract SpecialType SpecialType { get; } 355public static ConstantValue Create(object value, SpecialType st) 362public static ConstantValue? CreateSizeOf(SpecialType st) 399public static ConstantValue Default(SpecialType st) 436internal static ConstantValueTypeDiscriminator GetDiscriminator(SpecialType st) 440case SpecialType.System_SByte: return ConstantValueTypeDiscriminator.SByte; 441case SpecialType.System_Byte: return ConstantValueTypeDiscriminator.Byte; 442case SpecialType.System_Int16: return ConstantValueTypeDiscriminator.Int16; 443case SpecialType.System_UInt16: return ConstantValueTypeDiscriminator.UInt16; 444case SpecialType.System_Int32: return ConstantValueTypeDiscriminator.Int32; 445case SpecialType.System_UInt32: return ConstantValueTypeDiscriminator.UInt32; 446case SpecialType.System_Int64: return ConstantValueTypeDiscriminator.Int64; 447case SpecialType.System_UInt64: return ConstantValueTypeDiscriminator.UInt64; 448case SpecialType.System_IntPtr: return ConstantValueTypeDiscriminator.NInt; 449case SpecialType.System_UIntPtr: return ConstantValueTypeDiscriminator.NUInt; 450case SpecialType.System_Char: return ConstantValueTypeDiscriminator.Char; 451case SpecialType.System_Boolean: return ConstantValueTypeDiscriminator.Boolean; 452case SpecialType.System_Single: return ConstantValueTypeDiscriminator.Single; 453case SpecialType.System_Double: return ConstantValueTypeDiscriminator.Double; 454case SpecialType.System_Decimal: return ConstantValueTypeDiscriminator.Decimal; 455case SpecialType.System_DateTime: return ConstantValueTypeDiscriminator.DateTime; 456case SpecialType.System_String: return ConstantValueTypeDiscriminator.String; 488private static SpecialType GetSpecialType(ConstantValueTypeDiscriminator discriminator) 492case ConstantValueTypeDiscriminator.SByte: return SpecialType.System_SByte; 493case ConstantValueTypeDiscriminator.Byte: return SpecialType.System_Byte; 494case ConstantValueTypeDiscriminator.Int16: return SpecialType.System_Int16; 495case ConstantValueTypeDiscriminator.UInt16: return SpecialType.System_UInt16; 496case ConstantValueTypeDiscriminator.Int32: return SpecialType.System_Int32; 497case ConstantValueTypeDiscriminator.UInt32: return SpecialType.System_UInt32; 498case ConstantValueTypeDiscriminator.Int64: return SpecialType.System_Int64; 499case ConstantValueTypeDiscriminator.UInt64: return SpecialType.System_UInt64; 500case ConstantValueTypeDiscriminator.NInt: return SpecialType.System_IntPtr; 501case ConstantValueTypeDiscriminator.NUInt: return SpecialType.System_UIntPtr; 502case ConstantValueTypeDiscriminator.Char: return SpecialType.System_Char; 503case ConstantValueTypeDiscriminator.Boolean: return SpecialType.System_Boolean; 504case ConstantValueTypeDiscriminator.Single: return SpecialType.System_Single; 505case ConstantValueTypeDiscriminator.Double: return SpecialType.System_Double; 506case ConstantValueTypeDiscriminator.Decimal: return SpecialType.System_Decimal; 507case ConstantValueTypeDiscriminator.DateTime: return SpecialType.System_DateTime; 508case ConstantValueTypeDiscriminator.String: return SpecialType.System_String; 509default: return SpecialType.None;
ConstantValueSpecialized.cs (11)
42internal override SpecialType SpecialType 44get { return SpecialType.None; } 83internal override SpecialType SpecialType 85get { return SpecialType.None; } 167internal override SpecialType SpecialType 169get { return SpecialType.System_String; } 246internal override SpecialType SpecialType 248get { return SpecialType.System_Decimal; } 287internal override SpecialType SpecialType 289get { return SpecialType.System_DateTime; } 330internal override SpecialType SpecialType
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (3)
425var scopeString = attribute.DecodeNamedArgument<string>("Scope", SpecialType.System_String); 432info.Target = attribute.DecodeNamedArgument<string>("Target", SpecialType.System_String); 433info.MessageId = attribute.DecodeNamedArgument<string>("MessageId", SpecialType.System_String);
Emit\CommonPEModuleBuilder.cs (8)
712internal abstract Cci.INamedTypeReference GetSpecialType(SpecialType specialType, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 1147this.GetSpecialType(SpecialType.System_Object, syntaxNodeOpt, diagnostics), 1148this.GetSpecialType(SpecialType.System_ValueType, syntaxNodeOpt, diagnostics), 1149this.GetSpecialType(SpecialType.System_Byte, syntaxNodeOpt, diagnostics), 1150this.GetSpecialType(SpecialType.System_Int16, syntaxNodeOpt, diagnostics), 1151this.GetSpecialType(SpecialType.System_Int32, syntaxNodeOpt, diagnostics), 1152this.GetSpecialType(SpecialType.System_Int64, syntaxNodeOpt, diagnostics), 1195return GetSpecialType((SpecialType)platformType, (TSyntaxNode)context.SyntaxNode, context.Diagnostics);
ExtendedSpecialType.cs (9)
11/// A structure meant to represent a union of <see cref="SpecialType"/> and <see cref="InternalSpecialType"/> values 25public static implicit operator ExtendedSpecialType(SpecialType value) => new ExtendedSpecialType((int)value); 26public static explicit operator SpecialType(ExtendedSpecialType value) => value._value < (int)InternalSpecialType.First ? (SpecialType)value._value : SpecialType.None; 44case SpecialType other: 65if (_value > (int)SpecialType.None && _value <= (int)SpecialType.Count) 67return ((SpecialType)_value).ToString();
InternalSpecialType.cs (3)
11/// Unlike ids in <see cref="SpecialType"/> enum, these ids are not meant for public consumption 17Unknown = SpecialType.None, 28System_ReadOnlySpan_T = SpecialType.Count + 1,
MetadataReader\MetadataDecoder.cs (4)
1010if (type.SpecialType == SpecialType.System_Decimal) 1014else if (type.SpecialType == SpecialType.System_DateTime) 1033var specialType = typeCode.ToSpecialType(); 1355type = GetSpecialType(SpecialType.System_Object);
MetadataReader\MetadataTypeCodeExtensions.cs (54)
14internal static SpecialType ToSpecialType(this SignatureTypeCode typeCode) 19return SpecialType.System_TypedReference; 22return SpecialType.System_Void; 25return SpecialType.System_Boolean; 28return SpecialType.System_SByte; 31return SpecialType.System_Byte; 34return SpecialType.System_Int16; 37return SpecialType.System_UInt16; 40return SpecialType.System_Int32; 43return SpecialType.System_UInt32; 46return SpecialType.System_Int64; 49return SpecialType.System_UInt64; 52return SpecialType.System_Single; 55return SpecialType.System_Double; 58return SpecialType.System_Char; 61return SpecialType.System_String; 64return SpecialType.System_IntPtr; 67return SpecialType.System_UIntPtr; 70return SpecialType.System_Object; 77internal static bool HasShortFormSignatureEncoding(this SpecialType type) 105case SpecialType.System_String: 106case SpecialType.System_Object: 107case SpecialType.System_Void: 108case SpecialType.System_Boolean: 109case SpecialType.System_Char: 110case SpecialType.System_Byte: 111case SpecialType.System_SByte: 112case SpecialType.System_Int16: 113case SpecialType.System_UInt16: 114case SpecialType.System_Int32: 115case SpecialType.System_UInt32: 116case SpecialType.System_Int64: 117case SpecialType.System_UInt64: 118case SpecialType.System_IntPtr: 119case SpecialType.System_UIntPtr: 120case SpecialType.System_TypedReference: 121case SpecialType.System_Single: 122case SpecialType.System_Double: 129internal static SerializationTypeCode ToSerializationType(this SpecialType specialType) 141internal static SerializationTypeCode ToSerializationTypeOrInvalid(this SpecialType specialType) 145case SpecialType.System_Boolean: 148case SpecialType.System_SByte: 151case SpecialType.System_Byte: 154case SpecialType.System_Int16: 157case SpecialType.System_Int32: 160case SpecialType.System_Int64: 163case SpecialType.System_UInt16: 166case SpecialType.System_UInt32: 169case SpecialType.System_UInt64: 172case SpecialType.System_Single: 175case SpecialType.System_Double: 178case SpecialType.System_Char: 181case SpecialType.System_String: 184case SpecialType.System_Object:
MetadataReader\SymbolFactory.cs (1)
44internal abstract TypeSymbol GetSpecialType(ModuleSymbol moduleSymbol, SpecialType specialType);
MetadataReader\TypeNameDecoder.cs (1)
85protected TypeSymbol GetSpecialType(SpecialType specialType)
Operations\ControlFlowGraphBuilder.cs (21)
2421INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2479INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2580INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 3139if (operation.Target?.Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T && 3319return MakeIsNullOperation(operand, _compilation.GetSpecialType(SpecialType.System_Boolean)); 3973: _compilation.GetSpecialType(SpecialType.System_IDisposable); 4206return new AwaitOperation(invocation, semanticModel: null, value.Syntax, _compilation.GetSpecialType(SpecialType.System_Void), isImplicit: true); 4223Debug.Assert(iDisposable.SpecialType == SpecialType.System_IDisposable || 4284ITypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 4550: _compilation.GetSpecialType(SpecialType.System_IDisposable); 4633return new AwaitOperation(moveNext, semanticModel: null, operation.Syntax, _compilation.GetSpecialType(SpecialType.System_Boolean), isImplicit: true); 4640return MakeInvalidOperation(_compilation.GetSpecialType(SpecialType.System_Boolean), enumeratorRef); 4753ITypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 5173_compilation.GetSpecialType(SpecialType.System_Boolean), 5254var shiftConst = new LiteralOperation(semanticModel: null, operand.Syntax, _compilation.GetSpecialType(SpecialType.System_Int32), 5356_compilation.GetSpecialType(SpecialType.System_Boolean), 5477INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 5843ITypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 6858Debug.Assert(outParameterArgument is { Parameter: { RefKind: RefKind.Out, Type.SpecialType: SpecialType.System_Boolean } }); 7782INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 7837? MakeInvalidOperation(operation.Syntax, type: _compilation.GetSpecialType(SpecialType.System_Object), ImmutableArray<IOperation>.Empty)
PEWriter\Types.cs (6)
18SystemObject = CodeAnalysis.SpecialType.System_Object, 19SystemDecimal = CodeAnalysis.SpecialType.System_Decimal, 20SystemTypedReference = CodeAnalysis.SpecialType.System_TypedReference, 22SystemInt32 = CodeAnalysis.SpecialType.System_Int32, 23SystemVoid = CodeAnalysis.SpecialType.System_Void, 24SystemString = CodeAnalysis.SpecialType.System_String,
SpecialMembers.cs (479)
21(byte)SpecialType.System_String, // DeclaringTypeId 24(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 25(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 29(byte)SpecialType.System_String, // DeclaringTypeId 32(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 33(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 34(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 38(byte)SpecialType.System_String, // DeclaringTypeId 41(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 42(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 43(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 44(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 48(byte)SpecialType.System_String, // DeclaringTypeId 51(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 52(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 53(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 54(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 55(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 59(byte)SpecialType.System_String, // DeclaringTypeId 62(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 63(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 67(byte)SpecialType.System_String, // DeclaringTypeId 70(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 71(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 75(byte)SpecialType.System_String, // DeclaringTypeId 78(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 79(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 80(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 84(byte)SpecialType.System_String, // DeclaringTypeId 87(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 88(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 89(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 90(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 94(byte)SpecialType.System_String, // DeclaringTypeId 97(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 98(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 102(byte)SpecialType.System_String, // DeclaringTypeId 105(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 108(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 111(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 115(byte)SpecialType.System_String, // DeclaringTypeId 118(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 121(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 127(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 131(byte)SpecialType.System_String, // DeclaringTypeId 134(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 137(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 140(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 143(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 150(byte)SpecialType.System_String, // DeclaringTypeId 153(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 154(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 155(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 159(byte)SpecialType.System_String, // DeclaringTypeId 162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 163(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 168(byte)SpecialType.System_String, // DeclaringTypeId 171(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 175(byte)SpecialType.System_String, // DeclaringTypeId 178(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 179(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 183(byte)SpecialType.System_String, // DeclaringTypeId 186(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 187(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 188(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 192(byte)SpecialType.System_String, // DeclaringTypeId 195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 197(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 198(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 202(byte)SpecialType.System_String, // DeclaringTypeId 205(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 206(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 207(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 211(byte)SpecialType.System_String, // DeclaringTypeId 214(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 215(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 219(byte)SpecialType.System_String, // DeclaringTypeId 224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 225(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 229(byte)SpecialType.System_Double, // DeclaringTypeId 232(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 233(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 237(byte)SpecialType.System_Single, // DeclaringTypeId 240(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 241(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 245(byte)SpecialType.System_Delegate, // DeclaringTypeId 248(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 249(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 250(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 254(byte)SpecialType.System_Delegate, // DeclaringTypeId 257(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 258(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 259(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 263(byte)SpecialType.System_Delegate, // DeclaringTypeId 266(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 267(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 268(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 272(byte)SpecialType.System_Delegate, // DeclaringTypeId 275(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 276(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 277(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 281(byte)SpecialType.System_Delegate, // DeclaringTypeId 284(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, // Return Type 286(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 291(byte)SpecialType.System_Delegate, // DeclaringTypeId 294(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, // Return Type 296(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 298(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 302(byte)SpecialType.System_Decimal, // DeclaringTypeId 304(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Field Signature 308(byte)SpecialType.System_Decimal, // DeclaringTypeId 310(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Field Signature 314(byte)SpecialType.System_Decimal, // DeclaringTypeId 316(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Field Signature 320(byte)SpecialType.System_Decimal, // DeclaringTypeId 323(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 324(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 328(byte)SpecialType.System_Decimal, // DeclaringTypeId 331(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 332(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 336(byte)SpecialType.System_Decimal, // DeclaringTypeId 339(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 340(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 344(byte)SpecialType.System_Decimal, // DeclaringTypeId 347(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 348(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 352(byte)SpecialType.System_Decimal, // DeclaringTypeId 355(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 356(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 360(byte)SpecialType.System_Decimal, // DeclaringTypeId 363(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 364(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 368(byte)SpecialType.System_Decimal, // DeclaringTypeId 371(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 372(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 373(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 374(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 375(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 376(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 380(byte)SpecialType.System_Decimal, // DeclaringTypeId 383(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 384(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 385(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 389(byte)SpecialType.System_Decimal, // DeclaringTypeId 392(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 393(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 394(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 398(byte)SpecialType.System_Decimal, // DeclaringTypeId 401(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 402(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 403(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 407(byte)SpecialType.System_Decimal, // DeclaringTypeId 410(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 412(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 416(byte)SpecialType.System_Decimal, // DeclaringTypeId 419(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 420(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 421(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 425(byte)SpecialType.System_Decimal, // DeclaringTypeId 428(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 429(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 433(byte)SpecialType.System_Decimal, // DeclaringTypeId 436(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 437(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 441(byte)SpecialType.System_Decimal, // DeclaringTypeId 444(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 445(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 449(byte)SpecialType.System_Decimal, // DeclaringTypeId 452(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 453(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 457(byte)SpecialType.System_Decimal, // DeclaringTypeId 460(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 461(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 462(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 466(byte)SpecialType.System_Decimal, // DeclaringTypeId 469(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 470(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 471(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 475(byte)SpecialType.System_Decimal, // DeclaringTypeId 478(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 479(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 480(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 484(byte)SpecialType.System_Decimal, // DeclaringTypeId 487(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 488(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 489(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 493(byte)SpecialType.System_Decimal, // DeclaringTypeId 496(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 497(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 498(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 502(byte)SpecialType.System_Decimal, // DeclaringTypeId 505(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 506(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 507(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 511(byte)SpecialType.System_Decimal, // DeclaringTypeId 514(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 515(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 516(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 520(byte)SpecialType.System_Decimal, // DeclaringTypeId 523(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 524(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 529(byte)SpecialType.System_Decimal, // DeclaringTypeId 532(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 533(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 534(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 538(byte)SpecialType.System_Decimal, // DeclaringTypeId 541(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 542(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 543(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 547(byte)SpecialType.System_Decimal, // DeclaringTypeId 550(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 551(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 552(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 556(byte)SpecialType.System_Decimal, // DeclaringTypeId 559(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 560(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 561(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 565(byte)SpecialType.System_Decimal, // DeclaringTypeId 568(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 569(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 570(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 574(byte)SpecialType.System_Decimal, // DeclaringTypeId 577(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 578(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 582(byte)SpecialType.System_Decimal, // DeclaringTypeId 585(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 586(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 590(byte)SpecialType.System_Decimal, // DeclaringTypeId 593(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 594(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 598(byte)SpecialType.System_Decimal, // DeclaringTypeId 601(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 602(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 606(byte)SpecialType.System_Decimal, // DeclaringTypeId 609(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 610(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 614(byte)SpecialType.System_Decimal, // DeclaringTypeId 617(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 618(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, 622(byte)SpecialType.System_Decimal, // DeclaringTypeId 625(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 626(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, 630(byte)SpecialType.System_Decimal, // DeclaringTypeId 633(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 634(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 638(byte)SpecialType.System_Decimal, // DeclaringTypeId 641(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 642(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 646(byte)SpecialType.System_Decimal, // DeclaringTypeId 649(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 650(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 654(byte)SpecialType.System_Decimal, // DeclaringTypeId 657(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, 658(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 662(byte)SpecialType.System_Decimal, // DeclaringTypeId 665(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, 666(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 670(byte)SpecialType.System_Decimal, // DeclaringTypeId 673(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 674(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 678(byte)SpecialType.System_Decimal, // DeclaringTypeId 681(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 682(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 686(byte)SpecialType.System_Decimal, // DeclaringTypeId 689(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 690(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 694(byte)SpecialType.System_Decimal, // DeclaringTypeId 697(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 698(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 702(byte)SpecialType.System_Decimal, // DeclaringTypeId 705(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 706(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 710(byte)SpecialType.System_Decimal, // DeclaringTypeId 713(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 714(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 718(byte)SpecialType.System_Decimal, // DeclaringTypeId 721(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 722(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 726(byte)SpecialType.System_Decimal, // DeclaringTypeId 729(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 730(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 734(byte)SpecialType.System_Decimal, // DeclaringTypeId 737(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 738(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 742(byte)SpecialType.System_Decimal, // DeclaringTypeId 745(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 746(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 750(byte)SpecialType.System_DateTime, // DeclaringTypeId 752(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, // Field Signature 756(byte)SpecialType.System_DateTime, // DeclaringTypeId 759(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 760(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 764(byte)SpecialType.System_DateTime, // DeclaringTypeId 767(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 768(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 769(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 773(byte)SpecialType.System_DateTime, // DeclaringTypeId 776(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 777(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 778(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 782(byte)SpecialType.System_DateTime, // DeclaringTypeId 785(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 786(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 787(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 791(byte)SpecialType.System_DateTime, // DeclaringTypeId 794(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 795(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 796(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 800(byte)SpecialType.System_DateTime, // DeclaringTypeId 803(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 804(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 805(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 809(byte)SpecialType.System_DateTime, // DeclaringTypeId 812(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 814(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 818(byte)SpecialType.System_DateTime, // DeclaringTypeId 821(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 822(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 823(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 827(byte)SpecialType.System_Collections_IEnumerable, // DeclaringTypeId 830(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_IEnumerator, 834(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 837(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 841(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 844(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 848(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 851(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 855(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 858(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 862(byte)SpecialType.System_Collections_Generic_IEnumerable_T, // DeclaringTypeId 866(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerator_T, 872(byte)SpecialType.System_Collections_Generic_IEnumerator_T, // DeclaringTypeId 879(byte)SpecialType.System_Collections_Generic_IEnumerator_T, // DeclaringTypeId 886(byte)SpecialType.System_IDisposable, // DeclaringTypeId 889(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 893(byte)SpecialType.System_Array, // DeclaringTypeId 896(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 900(byte)SpecialType.System_Array, // DeclaringTypeId 903(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 907(byte)SpecialType.System_Array, // DeclaringTypeId 910(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 911(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 915(byte)SpecialType.System_Array, // DeclaringTypeId 918(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 919(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 923(byte)SpecialType.System_Object, // DeclaringTypeId 926(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 930(byte)SpecialType.System_Object, // DeclaringTypeId 933(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 934(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 938(byte)SpecialType.System_Object, // DeclaringTypeId 941(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 943(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 947(byte)SpecialType.System_Object, // DeclaringTypeId 950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 954(byte)SpecialType.System_Object, // DeclaringTypeId 957(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 958(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 959(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 963(byte)SpecialType.System_IntPtr, // DeclaringTypeId 966(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 967(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 971(byte)SpecialType.System_IntPtr, // DeclaringTypeId 974(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 975(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 979(byte)SpecialType.System_IntPtr, // DeclaringTypeId 982(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 983(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 987(byte)SpecialType.System_IntPtr, // DeclaringTypeId 990(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 991(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 995(byte)SpecialType.System_IntPtr, // DeclaringTypeId 998(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 999(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1003(byte)SpecialType.System_IntPtr, // DeclaringTypeId 1006(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 1007(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 1011(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1014(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 1015(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1019(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1022(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 1023(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1027(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 1031(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1035(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1038(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1039(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 1043(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1046(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 1051(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1054(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1055(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 1059(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1066(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1074(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1081(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1084(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1088(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 1096(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1099(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Nullable_T, 1104(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1108(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Nullable_T, 1112(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1114(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1118(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1120(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1124(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1126(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1130(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1132(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1136(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1138(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1142(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1148(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1150(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1154(byte)SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute, // DeclaringTypeId 1157(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1161(byte)SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute, // DeclaringTypeId 1164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1165(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1172(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1177(byte)SpecialType.System_Collections_Generic_IReadOnlyCollection_T, // DeclaringTypeId 1180(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1184(byte)SpecialType.System_Collections_Generic_IReadOnlyList_T, // DeclaringTypeId 1188(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1192(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1199(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1202(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1206(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1209(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1214(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1217(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1221(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1229(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1232(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1234(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1238(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1241(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1246(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1250(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1254(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1257(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1262(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1265(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1266(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1271(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1274(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1275(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1283(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 1291(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 1292(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 1296(byte)SpecialType.System_Array, // DeclaringTypeId 1299(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1303(byte)SpecialType.System_Array, // DeclaringTypeId 1310(byte)SpecialType.System_Array, // DeclaringTypeId 1313(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1314(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1315(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1323(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 1330(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1338(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1346(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1354(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1358(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1365(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type
SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
SpecialTypes.cs (38)
91private static readonly SpecialType[] s_typeCodeToTypeIdMap; 107s_typeIdToTypeCodeMap = new Microsoft.Cci.PrimitiveTypeCode[(int)SpecialType.Count + 1]; 114s_typeIdToTypeCodeMap[(int)SpecialType.System_Boolean] = Microsoft.Cci.PrimitiveTypeCode.Boolean; 115s_typeIdToTypeCodeMap[(int)SpecialType.System_Char] = Microsoft.Cci.PrimitiveTypeCode.Char; 116s_typeIdToTypeCodeMap[(int)SpecialType.System_Void] = Microsoft.Cci.PrimitiveTypeCode.Void; 117s_typeIdToTypeCodeMap[(int)SpecialType.System_String] = Microsoft.Cci.PrimitiveTypeCode.String; 118s_typeIdToTypeCodeMap[(int)SpecialType.System_Int64] = Microsoft.Cci.PrimitiveTypeCode.Int64; 119s_typeIdToTypeCodeMap[(int)SpecialType.System_Int32] = Microsoft.Cci.PrimitiveTypeCode.Int32; 120s_typeIdToTypeCodeMap[(int)SpecialType.System_Int16] = Microsoft.Cci.PrimitiveTypeCode.Int16; 121s_typeIdToTypeCodeMap[(int)SpecialType.System_SByte] = Microsoft.Cci.PrimitiveTypeCode.Int8; 122s_typeIdToTypeCodeMap[(int)SpecialType.System_UInt64] = Microsoft.Cci.PrimitiveTypeCode.UInt64; 123s_typeIdToTypeCodeMap[(int)SpecialType.System_UInt32] = Microsoft.Cci.PrimitiveTypeCode.UInt32; 124s_typeIdToTypeCodeMap[(int)SpecialType.System_UInt16] = Microsoft.Cci.PrimitiveTypeCode.UInt16; 125s_typeIdToTypeCodeMap[(int)SpecialType.System_Byte] = Microsoft.Cci.PrimitiveTypeCode.UInt8; 126s_typeIdToTypeCodeMap[(int)SpecialType.System_Single] = Microsoft.Cci.PrimitiveTypeCode.Float32; 127s_typeIdToTypeCodeMap[(int)SpecialType.System_Double] = Microsoft.Cci.PrimitiveTypeCode.Float64; 128s_typeIdToTypeCodeMap[(int)SpecialType.System_IntPtr] = Microsoft.Cci.PrimitiveTypeCode.IntPtr; 129s_typeIdToTypeCodeMap[(int)SpecialType.System_UIntPtr] = Microsoft.Cci.PrimitiveTypeCode.UIntPtr; 131s_typeCodeToTypeIdMap = new SpecialType[(int)Microsoft.Cci.PrimitiveTypeCode.Invalid + 1]; 135s_typeCodeToTypeIdMap[i] = SpecialType.None; 138s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Boolean] = SpecialType.System_Boolean; 139s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Char] = SpecialType.System_Char; 140s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Void] = SpecialType.System_Void; 141s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.String] = SpecialType.System_String; 142s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int64] = SpecialType.System_Int64; 143s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int32] = SpecialType.System_Int32; 144s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int16] = SpecialType.System_Int16; 145s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int8] = SpecialType.System_SByte; 146s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt64] = SpecialType.System_UInt64; 147s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt32] = SpecialType.System_UInt32; 148s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt16] = SpecialType.System_UInt16; 149s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt8] = SpecialType.System_Byte; 150s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Float32] = SpecialType.System_Single; 151s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Float64] = SpecialType.System_Double; 152s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.IntPtr] = SpecialType.System_IntPtr; 153s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UIntPtr] = SpecialType.System_UIntPtr; 176public static SpecialType GetTypeFromMetadataName(Microsoft.Cci.PrimitiveTypeCode typeCode) 181public static Microsoft.Cci.PrimitiveTypeCode GetTypeCode(SpecialType typeId)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (5)
124protected abstract void AddLiteralValue(SpecialType type, object value); 125protected abstract void AddExplicitlyCastedLiteralValue(INamedTypeSymbol namedType, SpecialType type, object value); 237var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 316var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 336var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
Symbols\Attributes\CommonAttributeData.cs (31)
146internal T? GetConstructorArgument<T>(int i, SpecialType specialType) 164internal T? DecodeNamedArgument<T>(string name, SpecialType specialType, T? defaultValue = default) 169private static T? DecodeNamedArgument<T>(ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, string name, SpecialType specialType, T? defaultValue = default) 207Debug.Assert(parameters[0].Type.SpecialType == SpecialType.System_Byte); 208Debug.Assert(parameters[1].Type.SpecialType == SpecialType.System_Byte); 212byte scale = args[0].DecodeValue<byte>(SpecialType.System_Byte); 213bool isNegative = args[1].DecodeValue<byte>(SpecialType.System_Byte) != 0; 215if (parameters[2].Type.SpecialType == SpecialType.System_Int32) 217Debug.Assert(parameters[2].Type.SpecialType == SpecialType.System_Int32); 218Debug.Assert(parameters[3].Type.SpecialType == SpecialType.System_Int32); 219Debug.Assert(parameters[4].Type.SpecialType == SpecialType.System_Int32); 221high = args[2].DecodeValue<int>(SpecialType.System_Int32); 222mid = args[3].DecodeValue<int>(SpecialType.System_Int32); 223low = args[4].DecodeValue<int>(SpecialType.System_Int32); 227Debug.Assert(parameters[2].Type.SpecialType == SpecialType.System_UInt32); 228Debug.Assert(parameters[3].Type.SpecialType == SpecialType.System_UInt32); 229Debug.Assert(parameters[4].Type.SpecialType == SpecialType.System_UInt32); 231high = unchecked((int)args[2].DecodeValue<uint>(SpecialType.System_UInt32)); 232mid = unchecked((int)args[3].DecodeValue<uint>(SpecialType.System_UInt32)); 233low = unchecked((int)args[4].DecodeValue<uint>(SpecialType.System_UInt32)); 241long value = this.CommonConstructorArguments[0].DecodeValue<long>(SpecialType.System_Int64); 413if (attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_Int16) 415options = (MethodImplOptions)attribute.CommonConstructorArguments[0].DecodeValue<short>(SpecialType.System_Int16); 419options = attribute.CommonConstructorArguments[0].DecodeValue<MethodImplOptions>(SpecialType.System_Enum); 452var value = (MethodImplAttributes)namedArg.Value.DecodeValue<int>(SpecialType.System_Enum); 489LayoutKind kind = attribute.CommonConstructorArguments[0].DecodeValue<LayoutKind>(SpecialType.System_Enum); 509charSet = namedArg.Value.DecodeValue<CharSet>(SpecialType.System_Enum); 530alignment = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 542size = namedArg.Value.DecodeValue<int>(Microsoft.CodeAnalysis.SpecialType.System_Int32); 592bool allowMultiple = DecodeNamedArgument(namedArgs, "AllowMultiple", SpecialType.System_Boolean, false); 593bool inherited = DecodeNamedArgument(namedArgs, "Inherited", SpecialType.System_Boolean, true);
Symbols\Attributes\MarshalAsAttributeDecoder.cs (13)
102if (attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_Int16) 104unmanagedType = (UnmanagedType)attribute.CommonConstructorArguments[0].DecodeValue<short>(SpecialType.System_Int16); 108unmanagedType = attribute.CommonConstructorArguments[0].DecodeValue<UnmanagedType>(SpecialType.System_Enum); 131typeName = namedArg.Value.DecodeValue<string>(SpecialType.System_String); 142typeSymbol = namedArg.Value.DecodeValue<ITypeSymbolInternal>(SpecialType.None); 147cookie = namedArg.Value.DecodeValue<string>(SpecialType.System_String); 187parameterIndex = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 223elementType = namedArg.Value.DecodeValue<UnmanagedType>(SpecialType.System_Enum); 237elementCount = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 252parameterIndex = namedArg.Value.DecodeValue<short>(SpecialType.System_Int16); 311elementTypeVariant = namedArg.Value.DecodeValue<Cci.VarEnum>(SpecialType.System_Enum); 321elementTypeSymbol = namedArg.Value.DecodeValue<ITypeSymbolInternal>(SpecialType.None); 379elementCount = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32);
Symbols\INamedTypeSymbolInternal.cs (20)
45case SpecialType.System_Void: 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_SByte: 49case SpecialType.System_Byte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Decimal: 57case SpecialType.System_Single: 58case SpecialType.System_Double: 59case SpecialType.System_IntPtr: 60case SpecialType.System_UIntPtr: 61case SpecialType.System_ArgIterator: 62case SpecialType.System_RuntimeArgumentHandle: 64case SpecialType.System_TypedReference: 66case SpecialType.None:
Symbols\ITypeSymbol.cs (5)
102/// Returns <see cref="Microsoft.CodeAnalysis.SpecialType.None"/> if the type is not special. 104SpecialType SpecialType { get; } 241return typeOpt?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 257return type?.SpecialType == SpecialType.System_Boolean; 262return type?.SpecialType == SpecialType.System_Object;
Symbols\ITypeSymbolInternal.cs (2)
18/// Returns <see cref="Microsoft.CodeAnalysis.SpecialType.None"/> if the type is not special. 20SpecialType SpecialType { get; }
Symbols\TypedConstant.cs (17)
129internal T? DecodeValue<T>(SpecialType specialType) 135internal bool TryDecodeValue<T>(SpecialType specialType, [MaybeNullWhen(false)] out T value) 143if (_type!.SpecialType == specialType || (_type.TypeKind == TypeKind.Enum && specialType == SpecialType.System_Enum)) 164case SpecialType.System_Boolean: 165case SpecialType.System_SByte: 166case SpecialType.System_Int16: 167case SpecialType.System_Int32: 168case SpecialType.System_Int64: 169case SpecialType.System_Byte: 170case SpecialType.System_UInt16: 171case SpecialType.System_UInt32: 172case SpecialType.System_UInt64: 173case SpecialType.System_Single: 174case SpecialType.System_Double: 175case SpecialType.System_Char: 176case SpecialType.System_String: 177case SpecialType.System_Object:
WellKnownMembers.cs (880)
25(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 26(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 33(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 34(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 35(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 42(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 43(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 50(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 51(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 58(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 59(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 66(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 67(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 74(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 75(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 82(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 83(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 90(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 91(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 98(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 99(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 106(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 107(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 114(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 115(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 122(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 123(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 130(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 131(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 138(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 139(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 147(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 154(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 155(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 163(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 170(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 171(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 178(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 179(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 186(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 187(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 194(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 202(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 203(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 210(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 211(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 218(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 219(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 226(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 227(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 234(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 235(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 242(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 243(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 250(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 251(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 258(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 259(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 266(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 267(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 274(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 275(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 282(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 283(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return Type 291(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 298(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 299(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 307(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 314(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 321(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 322(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 338(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 344(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Field Signature 351(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 360(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 361(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 368(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 369(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 377(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 385(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 386(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 393(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, // Return Type 395(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 403(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 412(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 425(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 433(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 442(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 451(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 466(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 481(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 488(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 495(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 502(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 503(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 510(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 517(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 518(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 532(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 539(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 546(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 554(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 561(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 593(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 594(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 601(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 602(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 609(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 617(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 625(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 627(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 634(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 635(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 636(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 643(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 644(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 645(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 652(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 661(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 662(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 669(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 670(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 677(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 678(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 685(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 686(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 693(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 701(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 702(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 717(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 724(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 725(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 726(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 733(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 741(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 742(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 749(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 750(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 757(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 770(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 782(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 818(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 826(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 854(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 866(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 867(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 874(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 875(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 876(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 877(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 878(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 879(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 886(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 887(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 888(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 889(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 890(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 891(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 898(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 905(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 912(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 913(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 920(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 921(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 928(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 935(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 949(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 951(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 958(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 965(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 966(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 994(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 1001(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1002(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1009(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1010(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 1011(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 1018(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1034(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1043(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1074(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1081(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1094(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1102(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1109(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1125(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1126(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1127(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1145(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1152(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1153(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1154(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1161(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1176(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1188(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1211(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1222(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1225(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1238(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1251(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1262(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1264(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1269(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1280(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1292(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1303(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1320(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1331(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1338(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Return Type 1339(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1346(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1347(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1354(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 1355(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1362(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 1363(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1370(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 1371(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1378(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 1379(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1386(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1387(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1394(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 1395(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1402(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 1403(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1410(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 1411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1418(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return Type 1419(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1426(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 1427(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1434(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Return Type 1435(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1442(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, // Return Type 1443(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1450(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, // Return Type 1451(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1458(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 1459(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1466(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1467(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1475(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1482(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1483(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 1490(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1491(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 1498(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1499(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 1506(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1507(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 1514(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1515(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 1522(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1523(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 1530(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1531(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 1538(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1539(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 1546(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1547(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 1554(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1555(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1562(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1563(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1570(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 1571(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1578(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 1579(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1586(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 1587(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1594(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 1595(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1602(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1603(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1610(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 1611(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1618(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 1619(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1626(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 1627(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1634(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return Type 1635(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1642(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 1643(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1650(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Return Type 1651(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1658(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, // Return Type 1659(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1666(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, // Return Type 1667(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1674(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 1675(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1683(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1690(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1691(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1699(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1700(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1707(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1708(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1715(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1716(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1723(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1724(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1725(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1732(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1733(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1741(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1742(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1743(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1750(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1751(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1752(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1759(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1760(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1761(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1768(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1769(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1770(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1777(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1778(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1779(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1786(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1787(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1788(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1795(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1796(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1797(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1804(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1805(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1806(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1814(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1815(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1822(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1823(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1824(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1831(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1832(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1833(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1840(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1841(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1842(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1850(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1851(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1852(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1853(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1860(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1861(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1862(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1863(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1870(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1871(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1872(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1873(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1880(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1881(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1882(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1883(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1890(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1891(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1892(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1893(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1900(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1901(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1902(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1903(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1910(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1911(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1912(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1913(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1920(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1921(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1922(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1923(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1930(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1931(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1932(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1933(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1940(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1941(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1943(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1951(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1952(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1953(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1960(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1961(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1962(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1963(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1970(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1971(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1972(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1973(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1980(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1981(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1983(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1984(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1985(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1987(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1988(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1995(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1996(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1998(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1999(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2000(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2002(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2009(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2010(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2012(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2013(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2014(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2022(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2023(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2025(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2026(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2027(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2029(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2037(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2038(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2039(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2040(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2048(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2049(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2050(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2057(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2058(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2059(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2060(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2061(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2062(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2069(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2076(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2082(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Field Signature 2089(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2090(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2092(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2093(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2100(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2107(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2114(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, // Return Type 2115(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 2116(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 2123(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2125(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2133(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2134(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2135(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2151(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2159(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2161(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2168(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2175(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2182(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2183(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2184(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2185(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2186(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2187(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2188(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2196(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2197(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2198(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2205(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2206(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2213(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2214(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2215(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2217(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2225(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2232(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2233(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2240(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2241(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2248(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2249(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2256(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2257(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2264(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2265(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2272(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2273(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2280(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2281(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2288(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2289(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2292(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2299(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2321(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2329(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2336(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2338(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2345(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2347(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2354(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2362(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2377(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2385(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2392(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2394(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2401(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2403(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2410(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2418(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2440(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2448(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2456(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2458(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2465(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2467(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2482(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2500(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2508(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2516(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2517(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 2524(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2532(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2533(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 2540(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2541(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2548(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 2549(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2556(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, // Return Type 2557(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2564(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2566(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2573(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2575(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2583(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2590(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2598(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2605(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2835(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2852(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2862(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2873(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2885(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2898(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2912(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2928(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2929(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2936(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2938(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2939(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2940(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2941(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2948(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2951(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2952(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2953(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2961(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2969(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2970(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Lambda id 2978(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2979(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // State machine instance id 2987(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2988(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Lambda id 2989(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // State machine instance id 2996(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3003(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 3010(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3011(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Value 3012(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3019(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3020(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Value 3021(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3028(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3029(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Value 3030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3037(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3038(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Value 3039(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3046(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Value 3048(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3055(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3056(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Value 3057(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3064(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3065(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Value 3066(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3073(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3074(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Value 3075(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3082(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3083(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Value 3084(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3092(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Value 3093(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3100(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3101(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value 3102(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3109(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3110(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value address 3111(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Size 3112(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3119(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3120(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Source parameter index 3121(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Target local index 3128(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3129(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean,// Value 3130(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3137(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3138(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Value 3139(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3147(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Value 3148(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3155(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3156(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Value 3157(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3165(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Value 3166(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3173(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3174(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Value 3175(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3182(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3183(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Value 3184(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3191(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3192(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Value 3193(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3200(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3201(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Value 3202(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3209(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3210(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Value 3211(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3218(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3219(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value 3220(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3227(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3228(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value address 3229(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Size 3230(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3237(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3238(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Source parameter index 3239(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Target parameter index 3246(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3247(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Source local index 3248(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Target local index 3255(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3256(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 3263(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3264(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 3271(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3272(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 3280(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3281(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3288(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3295(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3302(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3309(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3316(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3317(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 3318(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3325(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3326(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3327(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3334(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3342(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3351(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3358(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 3369(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3370(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3391(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3392(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3393(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3400(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3408(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3410(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3418(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3427(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3434(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 3445(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3446(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3453(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3460(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return type 3461(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Number As System.Single 3468(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return type 3469(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Number As System.Double 3476(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return type 3477(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Number As System.Single 3484(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return type 3485(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Number As System.Double 3492(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 3493(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 3500(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 3501(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 3508(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 3509(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 3516(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3517(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3518(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3526(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3533(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3579(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3609(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3624(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3632(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3639(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3643(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3644(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Argument 3645(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3653(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3660(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3668(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3676(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 3684(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3692(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3699(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3703(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3704(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Argument 3705(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3713(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3714(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3722(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3729(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3733(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Argument 3735(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3743(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3748(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3755(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3763(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3765(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3779(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3786(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3788(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 3795(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3797(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 3804(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3812(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 3813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3820(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 3827(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3828(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 3835(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3842(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3849(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3850(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3857(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 3865(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3888(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type, 3895(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3896(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Argument 3903(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3910(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3911(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3919(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 3927(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 3935(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3949(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 3956(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3963(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3970(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3977(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3978(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3985(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3986(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3993(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4000(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4014(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 4029(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 4047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 4048(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4055(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4056(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4063(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4070(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 4077(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 4084(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4085(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4086(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4093(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4101(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4108(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4115(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4122(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 4129(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4130(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 4131(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4138(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 4139(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4153(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4160(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4161(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4168(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4175(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4176(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4183(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4184(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4191(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4192(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4193(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4200(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4201(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4208(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4209(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4216(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 4223(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4231(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4239(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4246(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4254(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4256(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4264(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4271(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4300(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4305(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4337(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4348(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4378(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4380(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4389(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4396(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4397(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4409(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4420(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4448(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4527(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4548(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4671(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 5122(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5142(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5182(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5202(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5222(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5255(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 5256(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Argument: byte* 5257(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Argument: int 5268(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5279(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5291(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5302(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5313(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5314(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5325(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 5332(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type
WellKnownTypes.cs (1)
18Unknown = SpecialType.None,
Microsoft.CodeAnalysis.Analyzers (462)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (3)
135&& containingType.SpecialType != SpecialType.System_Object) 298operation.Type.SpecialType != SpecialType.System_Object) 323return conversion.Type?.SpecialType == SpecialType.System_Object;
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (1)
203if (argument is { Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String })
MetaAnalyzers\DiagnosticAnalyzerAttributeAnalyzer.cs (1)
151argument.Type.SpecialType == SpecialType.System_String)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (2)
155argument.Value.Type.SpecialType == SpecialType.System_String && 162fieldReference.Field.Type.SpecialType == SpecialType.System_String)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (5)
550method.Parameters[0].Type.SpecialType == SpecialType.System_String; 572firstParamArgument.Parameter?.Type.SpecialType == SpecialType.System_String && 600invocation.Arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String && 628if (titleArgument.Parameter?.Type.SpecialType == SpecialType.System_String) 1207argument.Value.Type.SpecialType == SpecialType.System_String &&
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
274generator.TypeExpression(semanticModel.Compilation.GetSpecialType(SpecialType.System_Object)),
MetaAnalyzers\PreferIsKindAnalyzer.cs (1)
82if (conditionalAccess.Operation.Type!.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
339(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 373SpecialType.System_Boolean 374or SpecialType.System_Byte 375or SpecialType.System_Char 376or SpecialType.System_Double 377or SpecialType.System_Int16 378or SpecialType.System_Int32 379or SpecialType.System_Int64 380or SpecialType.System_UInt16 381or SpecialType.System_UInt32 382or SpecialType.System_UInt64 383or SpecialType.System_IntPtr 384or SpecialType.System_UIntPtr 385or SpecialType.System_SByte 386or SpecialType.System_Single 387or SpecialType.System_String 388or SpecialType.System_Object 389or SpecialType.System_ValueType 390or SpecialType.System_Void => true,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 185Name: "Dispose", MethodKind: MethodKind.Ordinary, ReturnsVoid: true, Parameters: [{ Type.SpecialType: SpecialType.System_Boolean, RefKind: RefKind.None }] 230method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 397method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 411method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 490method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 530method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 249=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 257=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 263=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
14protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 77var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 137IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 171var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 187var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
21SpecialType specialType, 25public SpecialType SpecialType { get; protected set; } = specialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
58parameterType ??= compilation.GetSpecialType(SpecialType.System_Object); 66returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 436case SpecialType.System_Boolean: 437case SpecialType.System_Char: 438case SpecialType.System_SByte: 439case SpecialType.System_Byte: 440case SpecialType.System_Int16: 441case SpecialType.System_UInt16: 442case SpecialType.System_Int32: 443case SpecialType.System_UInt32: 444case SpecialType.System_Int64: 445case SpecialType.System_UInt64: 446case SpecialType.System_Decimal: 447case SpecialType.System_Single: 448case SpecialType.System_Double: 449case SpecialType.System_String: 450case SpecialType.System_DateTime: 468method.ReturnType.SpecialType == SpecialType.System_Boolean && 469method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 182else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 303SpecialType? patternValueType) 305if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 445if (containingType?.SpecialType == SpecialType.System_Array || 446containingType?.SpecialType == SpecialType.System_String) 456case SpecialType.System_Byte: 457case SpecialType.System_UInt16: 458case SpecialType.System_UInt32: 459case SpecialType.System_UInt64: 501SpecialType? patternValueType) 508if (patternValueType == SpecialType.System_Boolean)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.AnalyzerUtilities (437)
src\1e7e9f16bf7f1945\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (2)
244var incrementValueType = WellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Int32); 262operation.Field.ContainingType.SpecialType == SpecialType.System_String)
src\2e2796bccd1466f6\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
697&& taintedArgument.Parameter.Type.SpecialType == SpecialType.System_String)
src\66dd3055a1c91c38\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (2)
1000method.ContainingType.SpecialType != SpecialType.None || 1021(symbol.ContainingType.SpecialType != SpecialType.None ||
src\a172c07bebba4cd8\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (2)
194invocation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Boolean && 343invocation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Boolean)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
339(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 373SpecialType.System_Boolean 374or SpecialType.System_Byte 375or SpecialType.System_Char 376or SpecialType.System_Double 377or SpecialType.System_Int16 378or SpecialType.System_Int32 379or SpecialType.System_Int64 380or SpecialType.System_UInt16 381or SpecialType.System_UInt32 382or SpecialType.System_UInt64 383or SpecialType.System_IntPtr 384or SpecialType.System_UIntPtr 385or SpecialType.System_SByte 386or SpecialType.System_Single 387or SpecialType.System_String 388or SpecialType.System_Object 389or SpecialType.System_ValueType 390or SpecialType.System_Void => true,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 185Name: "Dispose", MethodKind: MethodKind.Ordinary, ReturnsVoid: true, Parameters: [{ Type.SpecialType: SpecialType.System_Boolean, RefKind: RefKind.None }] 230method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 397method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 411method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 490method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 530method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 249=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 257=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 263=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\HardcodedBytesSources.cs (4)
50arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 63arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 79arrayTypeSymbol.ElementType.SpecialType == SpecialType.System_Char, 88arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\HardcodedSymmetricAlgorithmKeysSources.cs (4)
59arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 72arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 89arrayTypeSymbol.ElementType.SpecialType == SpecialType.System_Char, 96arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\StringTransferSources.cs (7)
38(firstParameter.Type.SpecialType == SpecialType.System_String || 39firstParameter.Type.SpecialType == SpecialType.System_Char || 42arrayType.ElementType.SpecialType == SpecialType.System_Char) || 44pointerType.PointedAtType.SpecialType == SpecialType.System_Char)), 87(secondParameter.Type.SpecialType == SpecialType.System_String || 88secondParameter.Type.SpecialType == SpecialType.System_Char || 91arrayType.ElementType.SpecialType == SpecialType.System_Char)),
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAbstractValue.cs (42)
47case SpecialType.System_Byte: 48case SpecialType.System_Double: 49case SpecialType.System_Int16: 50case SpecialType.System_Int32: 51case SpecialType.System_Int64: 52case SpecialType.System_UInt16: 53case SpecialType.System_UInt32: 54case SpecialType.System_UInt64: 55case SpecialType.System_SByte: 56case SpecialType.System_Single: 65case SpecialType.System_String: 73case SpecialType.System_Boolean: 302case SpecialType.System_String: 303return type2.SpecialType == SpecialType.System_String && 306case SpecialType.System_Char: 307return type2.SpecialType == SpecialType.System_Char && 310case SpecialType.System_Boolean: 311return type2.SpecialType == SpecialType.System_Boolean && 314case SpecialType.System_Byte: 315case SpecialType.System_Int16: 316case SpecialType.System_Int32: 317case SpecialType.System_Int64: 318case SpecialType.System_UInt16: 319case SpecialType.System_UInt32: 320case SpecialType.System_SByte: 321case SpecialType.System_UInt64: 328case SpecialType.System_SByte: 332case SpecialType.System_Int16: 336case SpecialType.System_Int32: 340case SpecialType.System_Int64: 344case SpecialType.System_Byte: 348case SpecialType.System_UInt16: 352case SpecialType.System_UInt32: 356case SpecialType.System_UInt64: 360case SpecialType.System_Boolean: 368case SpecialType.System_Double: 369case SpecialType.System_Single: 372case SpecialType.System_Single: 373case SpecialType.System_Double: 378case SpecialType.System_Single: 382case SpecialType.System_Double: 386case SpecialType.System_Boolean:
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntity.cs (2)
295=> Type.SpecialType == SpecialType.System_Boolean || 297Type.Language == LanguageNames.VisualBasic && Type.SpecialType == SpecialType.System_Object;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (1)
416type ??= _wellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (7)
350method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 747if (branch.BranchValue.Type?.SpecialType == SpecialType.System_Boolean && 993var validationMethods = requiresMethods.Concat(assumeMethods).Concat(assertMethods).OfType<IMethodSymbol>().Where(m => m.IsStatic && m.ReturnsVoid && !m.Parameters.IsEmpty && (m.Parameters[0].Type.SpecialType == SpecialType.System_Boolean)); 1697if (invocation.Type?.SpecialType != SpecialType.System_Boolean) 1861operation.Type?.SpecialType == SpecialType.System_Boolean && 2405argument.Parameter?.Type.SpecialType == SpecialType.System_Object) 3231operation.Type?.SpecialType == SpecialType.System_Boolean &&
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (1)
55nestedRegion.ExceptionType.SpecialType == SpecialType.System_Object ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.CodeStyle (334)
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
177value.Type.SpecialType == SpecialType.System_Void)
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (3)
233method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 273if (method is { MetadataName: "GetInstance", IsStatic: true, Parameters: [{ Type.SpecialType: SpecialType.System_String }] } && 295if (parameter.Type.SpecialType != SpecialType.System_Int32)
src\roslyn\src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (7)
98if (collectionElementType.SpecialType == SpecialType.System_Object) 100var ienumerableOfT = collectionType.AllInterfaces.FirstOrDefault(i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 141var isFixable = collectionType.SpecialType == SpecialType.System_Collections_IEnumerable || collectionType.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 157=> collectionElementType.SpecialType != SpecialType.System_Object || 158collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T || 159collectionType.AllInterfaces.Any(static i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
30var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
97if (typeWithoutNullable.SpecialType == SpecialType.System_Boolean) 105if (type.RemoveNullableIfPresent() is not { SpecialType: SpecialType.System_Boolean })
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
158if (member is not IFieldSymbol fieldSymbol || fieldSymbol.Type.SpecialType != SpecialType.None)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
88if (leftType?.SpecialType != SpecialType.System_Boolean || 89rightType?.SpecialType != SpecialType.System_Boolean)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
849attribute.AttributeConstructor?.Parameters is [_, { Name: "checkId", Type.SpecialType: SpecialType.System_String }, ..] && 858attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (3)
902if (attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }]) 913Value: { Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string namedValue }, 1078(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
154typeInfo.Type?.SpecialType == SpecialType.System_Boolean && 155typeInfo.ConvertedType?.SpecialType == SpecialType.System_Boolean;
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
39var readOnlySpanOfCharType = compilation.ReadOnlySpanOfTType()?.Construct(compilation.GetSpecialType(SpecialType.System_Char));
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
35var dateTimeType = compilation.GetSpecialType(SpecialType.System_DateTime); 200return method.ContainingType.SpecialType == SpecialType.System_Object
src\roslyn\src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
34var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
144var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch, cancellationToken).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (5)
26ContainingType.OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, 85var objectType = compilation.GetSpecialType(SpecialType.System_Object); 214if (type is not INamedTypeSymbol namedType || namedType.ConstructedFrom.SpecialType != SpecialType.System_Nullable_T) 255var whenPartIsNullable = whenPartType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 435if (typeSymbol?.SpecialType == SpecialType.System_Object)
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
303if (containingType.SpecialType != SpecialType.System_String)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.CodeStyle.Fixes (99)
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (9)
380case SpecialType.System_Boolean: 381case SpecialType.System_Byte: 382case SpecialType.System_Char: 383case SpecialType.System_Int16: 384case SpecialType.System_Int32: 385case SpecialType.System_Int64: 386case SpecialType.System_Double: 387case SpecialType.System_Single: 388case SpecialType.System_String:
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
75returnType: semanticModel.Compilation.GetSpecialType(SpecialType.System_Void),
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
64if (typeParameters.Length == 0 && returnType.SpecialType != SpecialType.System_Void)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
450inferredType = inferredType.SpecialType == SpecialType.System_Void
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
248var idisposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
175compilation.GetSpecialType(SpecialType.System_Boolean), 238var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
273var condition3 = typeParameter.HasReferenceTypeConstraint && typeParameter.ConstraintTypes.Any(static ts => ts.IsReferenceType && ts.SpecialType != SpecialType.System_Object);
src\roslyn\src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
57var readOnlySpanOfCharType = compilation.ReadOnlySpanOfTType()?.Construct(compilation.GetSpecialType(SpecialType.System_Char));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
14protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 77var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 137IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 171var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 187var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
21SpecialType specialType, 25public SpecialType SpecialType { get; protected set; } = specialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
58parameterType ??= compilation.GetSpecialType(SpecialType.System_Object); 66returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 436case SpecialType.System_Boolean: 437case SpecialType.System_Char: 438case SpecialType.System_SByte: 439case SpecialType.System_Byte: 440case SpecialType.System_Int16: 441case SpecialType.System_UInt16: 442case SpecialType.System_Int32: 443case SpecialType.System_UInt32: 444case SpecialType.System_Int64: 445case SpecialType.System_UInt64: 446case SpecialType.System_Decimal: 447case SpecialType.System_Single: 448case SpecialType.System_Double: 449case SpecialType.System_String: 450case SpecialType.System_DateTime: 468method.ReturnType.SpecialType == SpecialType.System_Boolean && 469method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 182else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 303SpecialType? patternValueType) 305if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 445if (containingType?.SpecialType == SpecialType.System_Array || 446containingType?.SpecialType == SpecialType.System_String) 456case SpecialType.System_Byte: 457case SpecialType.System_UInt16: 458case SpecialType.System_UInt32: 459case SpecialType.System_UInt64: 501SpecialType? patternValueType) 508if (patternValueType == SpecialType.System_Boolean)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.CSharp (2092)
Binder\Binder_Attributes.cs (2)
931if (type.SpecialType == SpecialType.System_Object || 933((ArrayTypeSymbol)type).ElementType.SpecialType == SpecialType.System_Object)
Binder\Binder_Await.cs (1)
671if (isCompletedProperty.Type.SpecialType != SpecialType.System_Boolean)
Binder\Binder_Constraints.cs (11)
270GetSpecialType(SpecialType.System_ValueType, diagnostics, typeSyntax); 522case SpecialType.System_Enum: 523case SpecialType.System_Delegate: 524case SpecialType.System_MulticastDelegate: 533else if (type.SpecialType != SpecialType.System_Enum) 566case SpecialType.System_Enum: 570case SpecialType.System_Delegate: 571case SpecialType.System_MulticastDelegate: 575case SpecialType.System_Object: 576case SpecialType.System_ValueType: 577case SpecialType.System_Array:
Binder\Binder_Conversions.cs (221)
234Debug.Assert(destination.SpecialType != SpecialType.System_String); 733Debug.Assert(((NamedTypeSymbol)readOnlySpanType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType is SpecialType.System_Char); 746Parameters: [{ Type.SpecialType: SpecialType.System_String }] 2862destination.SpecialType == SpecialType.System_Object; 3029SpecialType.System_Decimal => WellKnownMember.System_Runtime_CompilerServices_DecimalConstantAttribute__ctor, 3030SpecialType.System_DateTime => WellKnownMember.System_Runtime_CompilerServices_DateTimeConstantAttribute__ctor, 3864case SpecialType.System_Single: 3866case SpecialType.System_Double: 3910SpecialType destinationType; 3915Debug.Assert(underlyingType.SpecialType != SpecialType.None); 3937else if (destinationType == SpecialType.System_Decimal) 3962else if (destinationType == SpecialType.System_IntPtr || destinationType == SpecialType.System_UIntPtr) 3974private static object DoUncheckedConversion(SpecialType destinationType, ConstantValue value) 4009case SpecialType.System_Byte: return (byte)byteValue; 4010case SpecialType.System_Char: return (char)byteValue; 4011case SpecialType.System_UInt16: return (ushort)byteValue; 4012case SpecialType.System_UInt32: return (uint)byteValue; 4013case SpecialType.System_UInt64: return (ulong)byteValue; 4014case SpecialType.System_SByte: return (sbyte)byteValue; 4015case SpecialType.System_Int16: return (short)byteValue; 4016case SpecialType.System_Int32: return (int)byteValue; 4017case SpecialType.System_Int64: return (long)byteValue; 4018case SpecialType.System_IntPtr: return (int)byteValue; 4019case SpecialType.System_UIntPtr: return (uint)byteValue; 4020case SpecialType.System_Single: 4021case SpecialType.System_Double: return (double)byteValue; 4022case SpecialType.System_Decimal: return (decimal)byteValue; 4029case SpecialType.System_Byte: return (byte)charValue; 4030case SpecialType.System_Char: return (char)charValue; 4031case SpecialType.System_UInt16: return (ushort)charValue; 4032case SpecialType.System_UInt32: return (uint)charValue; 4033case SpecialType.System_UInt64: return (ulong)charValue; 4034case SpecialType.System_SByte: return (sbyte)charValue; 4035case SpecialType.System_Int16: return (short)charValue; 4036case SpecialType.System_Int32: return (int)charValue; 4037case SpecialType.System_Int64: return (long)charValue; 4038case SpecialType.System_IntPtr: return (int)charValue; 4039case SpecialType.System_UIntPtr: return (uint)charValue; 4040case SpecialType.System_Single: 4041case SpecialType.System_Double: return (double)charValue; 4042case SpecialType.System_Decimal: return (decimal)charValue; 4049case SpecialType.System_Byte: return (byte)uint16Value; 4050case SpecialType.System_Char: return (char)uint16Value; 4051case SpecialType.System_UInt16: return (ushort)uint16Value; 4052case SpecialType.System_UInt32: return (uint)uint16Value; 4053case SpecialType.System_UInt64: return (ulong)uint16Value; 4054case SpecialType.System_SByte: return (sbyte)uint16Value; 4055case SpecialType.System_Int16: return (short)uint16Value; 4056case SpecialType.System_Int32: return (int)uint16Value; 4057case SpecialType.System_Int64: return (long)uint16Value; 4058case SpecialType.System_IntPtr: return (int)uint16Value; 4059case SpecialType.System_UIntPtr: return (uint)uint16Value; 4060case SpecialType.System_Single: 4061case SpecialType.System_Double: return (double)uint16Value; 4062case SpecialType.System_Decimal: return (decimal)uint16Value; 4069case SpecialType.System_Byte: return (byte)uint32Value; 4070case SpecialType.System_Char: return (char)uint32Value; 4071case SpecialType.System_UInt16: return (ushort)uint32Value; 4072case SpecialType.System_UInt32: return (uint)uint32Value; 4073case SpecialType.System_UInt64: return (ulong)uint32Value; 4074case SpecialType.System_SByte: return (sbyte)uint32Value; 4075case SpecialType.System_Int16: return (short)uint32Value; 4076case SpecialType.System_Int32: return (int)uint32Value; 4077case SpecialType.System_Int64: return (long)uint32Value; 4078case SpecialType.System_IntPtr: return (int)uint32Value; 4079case SpecialType.System_UIntPtr: return (uint)uint32Value; 4080case SpecialType.System_Single: return (double)(float)uint32Value; 4081case SpecialType.System_Double: return (double)uint32Value; 4082case SpecialType.System_Decimal: return (decimal)uint32Value; 4089case SpecialType.System_Byte: return (byte)uint64Value; 4090case SpecialType.System_Char: return (char)uint64Value; 4091case SpecialType.System_UInt16: return (ushort)uint64Value; 4092case SpecialType.System_UInt32: return (uint)uint64Value; 4093case SpecialType.System_UInt64: return (ulong)uint64Value; 4094case SpecialType.System_SByte: return (sbyte)uint64Value; 4095case SpecialType.System_Int16: return (short)uint64Value; 4096case SpecialType.System_Int32: return (int)uint64Value; 4097case SpecialType.System_Int64: return (long)uint64Value; 4098case SpecialType.System_IntPtr: return (int)uint64Value; 4099case SpecialType.System_UIntPtr: return (uint)uint64Value; 4100case SpecialType.System_Single: return (double)(float)uint64Value; 4101case SpecialType.System_Double: return (double)uint64Value; 4102case SpecialType.System_Decimal: return (decimal)uint64Value; 4109case SpecialType.System_Byte: return (byte)nuintValue; 4110case SpecialType.System_Char: return (char)nuintValue; 4111case SpecialType.System_UInt16: return (ushort)nuintValue; 4112case SpecialType.System_UInt32: return (uint)nuintValue; 4113case SpecialType.System_UInt64: return (ulong)nuintValue; 4114case SpecialType.System_SByte: return (sbyte)nuintValue; 4115case SpecialType.System_Int16: return (short)nuintValue; 4116case SpecialType.System_Int32: return (int)nuintValue; 4117case SpecialType.System_Int64: return (long)nuintValue; 4118case SpecialType.System_IntPtr: return (int)nuintValue; 4119case SpecialType.System_Single: return (double)(float)nuintValue; 4120case SpecialType.System_Double: return (double)nuintValue; 4121case SpecialType.System_Decimal: return (decimal)nuintValue; 4128case SpecialType.System_Byte: return (byte)sbyteValue; 4129case SpecialType.System_Char: return (char)sbyteValue; 4130case SpecialType.System_UInt16: return (ushort)sbyteValue; 4131case SpecialType.System_UInt32: return (uint)sbyteValue; 4132case SpecialType.System_UInt64: return (ulong)sbyteValue; 4133case SpecialType.System_SByte: return (sbyte)sbyteValue; 4134case SpecialType.System_Int16: return (short)sbyteValue; 4135case SpecialType.System_Int32: return (int)sbyteValue; 4136case SpecialType.System_Int64: return (long)sbyteValue; 4137case SpecialType.System_IntPtr: return (int)sbyteValue; 4138case SpecialType.System_UIntPtr: return (uint)sbyteValue; 4139case SpecialType.System_Single: 4140case SpecialType.System_Double: return (double)sbyteValue; 4141case SpecialType.System_Decimal: return (decimal)sbyteValue; 4148case SpecialType.System_Byte: return (byte)int16Value; 4149case SpecialType.System_Char: return (char)int16Value; 4150case SpecialType.System_UInt16: return (ushort)int16Value; 4151case SpecialType.System_UInt32: return (uint)int16Value; 4152case SpecialType.System_UInt64: return (ulong)int16Value; 4153case SpecialType.System_SByte: return (sbyte)int16Value; 4154case SpecialType.System_Int16: return (short)int16Value; 4155case SpecialType.System_Int32: return (int)int16Value; 4156case SpecialType.System_Int64: return (long)int16Value; 4157case SpecialType.System_IntPtr: return (int)int16Value; 4158case SpecialType.System_UIntPtr: return (uint)int16Value; 4159case SpecialType.System_Single: 4160case SpecialType.System_Double: return (double)int16Value; 4161case SpecialType.System_Decimal: return (decimal)int16Value; 4168case SpecialType.System_Byte: return (byte)int32Value; 4169case SpecialType.System_Char: return (char)int32Value; 4170case SpecialType.System_UInt16: return (ushort)int32Value; 4171case SpecialType.System_UInt32: return (uint)int32Value; 4172case SpecialType.System_UInt64: return (ulong)int32Value; 4173case SpecialType.System_SByte: return (sbyte)int32Value; 4174case SpecialType.System_Int16: return (short)int32Value; 4175case SpecialType.System_Int32: return (int)int32Value; 4176case SpecialType.System_Int64: return (long)int32Value; 4177case SpecialType.System_IntPtr: return (int)int32Value; 4178case SpecialType.System_UIntPtr: return (uint)int32Value; 4179case SpecialType.System_Single: return (double)(float)int32Value; 4180case SpecialType.System_Double: return (double)int32Value; 4181case SpecialType.System_Decimal: return (decimal)int32Value; 4188case SpecialType.System_Byte: return (byte)int64Value; 4189case SpecialType.System_Char: return (char)int64Value; 4190case SpecialType.System_UInt16: return (ushort)int64Value; 4191case SpecialType.System_UInt32: return (uint)int64Value; 4192case SpecialType.System_UInt64: return (ulong)int64Value; 4193case SpecialType.System_SByte: return (sbyte)int64Value; 4194case SpecialType.System_Int16: return (short)int64Value; 4195case SpecialType.System_Int32: return (int)int64Value; 4196case SpecialType.System_Int64: return (long)int64Value; 4197case SpecialType.System_IntPtr: return (int)int64Value; 4198case SpecialType.System_UIntPtr: return (uint)int64Value; 4199case SpecialType.System_Single: return (double)(float)int64Value; 4200case SpecialType.System_Double: return (double)int64Value; 4201case SpecialType.System_Decimal: return (decimal)int64Value; 4208case SpecialType.System_Byte: return (byte)nintValue; 4209case SpecialType.System_Char: return (char)nintValue; 4210case SpecialType.System_UInt16: return (ushort)nintValue; 4211case SpecialType.System_UInt32: return (uint)nintValue; 4212case SpecialType.System_UInt64: return (ulong)nintValue; 4213case SpecialType.System_SByte: return (sbyte)nintValue; 4214case SpecialType.System_Int16: return (short)nintValue; 4215case SpecialType.System_Int32: return (int)nintValue; 4216case SpecialType.System_Int64: return (long)nintValue; 4217case SpecialType.System_IntPtr: return (int)nintValue; 4218case SpecialType.System_UIntPtr: return (uint)nintValue; 4219case SpecialType.System_Single: return (double)(float)nintValue; 4220case SpecialType.System_Double: return (double)nintValue; 4221case SpecialType.System_Decimal: return (decimal)nintValue; 4232case SpecialType.System_Byte: return (byte)doubleValue; 4233case SpecialType.System_Char: return (char)doubleValue; 4234case SpecialType.System_UInt16: return (ushort)doubleValue; 4235case SpecialType.System_UInt32: return (uint)doubleValue; 4236case SpecialType.System_UInt64: return (ulong)doubleValue; 4237case SpecialType.System_SByte: return (sbyte)doubleValue; 4238case SpecialType.System_Int16: return (short)doubleValue; 4239case SpecialType.System_Int32: return (int)doubleValue; 4240case SpecialType.System_Int64: return (long)doubleValue; 4241case SpecialType.System_IntPtr: return (int)doubleValue; 4242case SpecialType.System_UIntPtr: return (uint)doubleValue; 4243case SpecialType.System_Single: return (double)(float)doubleValue; 4244case SpecialType.System_Double: return (double)doubleValue; 4245case SpecialType.System_Decimal: return (value.Discriminator == ConstantValueTypeDiscriminator.Single) ? (decimal)(float)doubleValue : (decimal)doubleValue; 4252case SpecialType.System_Byte: return (byte)decimalValue; 4253case SpecialType.System_Char: return (char)decimalValue; 4254case SpecialType.System_UInt16: return (ushort)decimalValue; 4255case SpecialType.System_UInt32: return (uint)decimalValue; 4256case SpecialType.System_UInt64: return (ulong)decimalValue; 4257case SpecialType.System_SByte: return (sbyte)decimalValue; 4258case SpecialType.System_Int16: return (short)decimalValue; 4259case SpecialType.System_Int32: return (int)decimalValue; 4260case SpecialType.System_Int64: return (long)decimalValue; 4261case SpecialType.System_IntPtr: return (int)decimalValue; 4262case SpecialType.System_UIntPtr: return (uint)decimalValue; 4263case SpecialType.System_Single: return (double)(float)decimalValue; 4264case SpecialType.System_Double: return (double)decimalValue; 4265case SpecialType.System_Decimal: return (decimal)decimalValue; 4277public static bool CheckConstantBounds(SpecialType destinationType, ConstantValue value, out bool maySucceedAtRuntime) 4295private static bool CheckConstantBounds(SpecialType destinationType, double value, out bool maySucceedAtRuntime) 4303case SpecialType.System_Byte: return (byte.MinValue - 1D) < value && value < (byte.MaxValue + 1D); 4304case SpecialType.System_Char: return (char.MinValue - 1D) < value && value < (char.MaxValue + 1D); 4305case SpecialType.System_UInt16: return (ushort.MinValue - 1D) < value && value < (ushort.MaxValue + 1D); 4306case SpecialType.System_UInt32: return (uint.MinValue - 1D) < value && value < (uint.MaxValue + 1D); 4307case SpecialType.System_UInt64: return (ulong.MinValue - 1D) < value && value < (ulong.MaxValue + 1D); 4308case SpecialType.System_SByte: return (sbyte.MinValue - 1D) < value && value < (sbyte.MaxValue + 1D); 4309case SpecialType.System_Int16: return (short.MinValue - 1D) < value && value < (short.MaxValue + 1D); 4310case SpecialType.System_Int32: return (int.MinValue - 1D) < value && value < (int.MaxValue + 1D); 4312case SpecialType.System_Int64: return (long.MinValue - 1D) <= value && value < (long.MaxValue + 1D); 4313case SpecialType.System_Decimal: return ((double)decimal.MinValue - 1D) < value && value < ((double)decimal.MaxValue + 1D); 4314case SpecialType.System_IntPtr: 4317case SpecialType.System_UIntPtr: 4325private static bool CheckConstantBounds(SpecialType destinationType, decimal value, out bool maySucceedAtRuntime) 4333case SpecialType.System_Byte: return (byte.MinValue - 1M) < value && value < (byte.MaxValue + 1M); 4334case SpecialType.System_Char: return (char.MinValue - 1M) < value && value < (char.MaxValue + 1M); 4335case SpecialType.System_UInt16: return (ushort.MinValue - 1M) < value && value < (ushort.MaxValue + 1M); 4336case SpecialType.System_UInt32: return (uint.MinValue - 1M) < value && value < (uint.MaxValue + 1M); 4337case SpecialType.System_UInt64: return (ulong.MinValue - 1M) < value && value < (ulong.MaxValue + 1M); 4338case SpecialType.System_SByte: return (sbyte.MinValue - 1M) < value && value < (sbyte.MaxValue + 1M); 4339case SpecialType.System_Int16: return (short.MinValue - 1M) < value && value < (short.MaxValue + 1M); 4340case SpecialType.System_Int32: return (int.MinValue - 1M) < value && value < (int.MaxValue + 1M); 4341case SpecialType.System_Int64: return (long.MinValue - 1M) < value && value < (long.MaxValue + 1M); 4342case SpecialType.System_IntPtr: 4345case SpecialType.System_UIntPtr:
Binder\Binder_Crefs.cs (2)
578builder.Add(this.GetSpecialType(memberName == "nint" ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, diagnostics, syntax).AsNativeInteger());
Binder\Binder_Deconstruct.cs (2)
126var voidType = GetSpecialType(SpecialType.System_Void, diagnostics, node); 696if (deconstructMethod.ReturnType.GetSpecialTypeSafe() != SpecialType.System_Void)
Binder\Binder_Expressions.cs (77)
1079if (boundArgument.Type?.SpecialType == SpecialType.System_Void) 1262TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1286TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1310TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1352TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1477this.GetSpecialType(SpecialType.System_Int32, diagnostics, node), hasErrors); 2686GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2689TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2696NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node); 2774GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2776NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node); 2803NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, operand); 4464this.Compilation.CreateArrayTypeSymbol(GetSpecialType(SpecialType.System_Object, diagnostics, node)), 4565GetSpecialType(SpecialType.System_Int32, diagnostics, nonNullSyntax)) 4646count = GenerateConversionForAssignment(GetSpecialType(SpecialType.System_Int32, diagnostics, node), count, diagnostics); 4802GetSpecialType(SpecialType.System_Int32, diagnostics, node)) 4823if (constantValue == null || constantValue.IsBad || expression.Type.SpecialType != SpecialType.System_Int32) 4846var type = expression.Type.SpecialType; 4847if (type == SpecialType.System_Int32) 4852if (type == SpecialType.System_Int64) 4859Debug.Assert(type == SpecialType.System_UInt32 || type == SpecialType.System_UInt64); 4963containingType.SpecialType == SpecialType.System_Object || 4966if ((object)initializerType == null || containingType.SpecialType == SpecialType.System_Object) //e.g. when defining System.Object in source 5217if (baseType.SpecialType == SpecialType.System_Object) 5219if (resultMember is null || resultMember.ContainingType.SpecialType != SpecialType.System_Object) 5438lengthOrCount = new BoundLiteral(expression.Syntax, ConstantValue.Create(length), @this.GetSpecialType(SpecialType.System_Int32, diagnostics, expression.Syntax)) { WasCompilerGenerated = true }; 5485type: @this.Compilation.GetSpecialType(SpecialType.System_Object)); 6466NamedTypeSymbol collectionsIEnumerableType = this.GetSpecialType(SpecialType.System_Collections_IEnumerable, diagnostics, node); 6647type: GetSpecialType(SpecialType.System_Void, diagnostics, elementInitializer), 7511var specialType = type.SpecialType; 7520case SpecialType.System_SByte: 7521case SpecialType.System_Int16: 7522case SpecialType.System_Int32: 7523case SpecialType.System_Int64: 7524case SpecialType.System_Byte: 7525case SpecialType.System_UInt16: 7526case SpecialType.System_UInt32: 7527case SpecialType.System_UInt64: 7528case SpecialType.System_Single: 7529case SpecialType.System_Double: 7530case SpecialType.System_Decimal: 7531case SpecialType.System_Boolean: 7532case SpecialType.System_Char: 7573var specialType = SpecialTypeExtensions.FromRuntimeTypeOfLiteralValue(value); 7577specialType != SpecialType.None && 7578specialType != SpecialType.System_Byte && 7579specialType != SpecialType.System_SByte && 7580specialType != SpecialType.System_Int16 && 7581specialType != SpecialType.System_UInt16); 7608var type = GetWellKnownType(WellKnownType.System_ReadOnlySpan_T, diagnostics, node).Construct(GetSpecialType(SpecialType.System_Byte, diagnostics, node)); 9196Debug.Assert(left.Type.SpecialType != SpecialType.System_String); 9293Debug.Assert(left.Type.SpecialType != SpecialType.System_String); 9619var intPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax, binder.GetSpecialType(SpecialType.System_Int32, diagnostics, syntax)) { WasCompilerGenerated = true }; 9652if (receiver.Type.SpecialType == SpecialType.System_String && !scope.HasValue) 10400BoundExpression convertedIndex = TryImplicitConversionToArrayIndex(index, SpecialType.System_Int32, node, diagnostics); 10488if (convertedIndex.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex }) 10569if (hatExpression.Operand.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex }) 10575else if (convertedIndex is BoundConversion { Operand: { ConstantValueOpt: { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex } } operand }) 10582arguments[0] is { ConstantValueOpt: { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex1 } } index && 10583arguments[1] is { ConstantValueOpt: { SpecialType: SpecialType.System_Boolean, BooleanValue: bool isFromEnd } }) 10704var int32 = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 10739TryImplicitConversionToArrayIndex(index, SpecialType.System_Int32, node, diagnostics) ?? 10740TryImplicitConversionToArrayIndex(index, SpecialType.System_UInt32, node, diagnostics) ?? 10741TryImplicitConversionToArrayIndex(index, SpecialType.System_Int64, node, diagnostics) ?? 10742TryImplicitConversionToArrayIndex(index, SpecialType.System_UInt64, node, diagnostics); 10776NamedTypeSymbol int32 = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 10810private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, SpecialType specialType, SyntaxNode node, BindingDiagnosticBag diagnostics) 10956else if (expr.Type.SpecialType != SpecialType.System_String) 11409var startArgumentPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax, GetSpecialType(SpecialType.System_Int32, diagnostics, syntax)) { WasCompilerGenerated = true }; 11410var lengthArgumentPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax, GetSpecialType(SpecialType.System_Int32, diagnostics, syntax)) { WasCompilerGenerated = true }; 11461original.Parameters[parameterOffset] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None } && 11462original.Parameters[parameterOffset + 1] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }; 11473getMethod.ReturnType.SpecialType == SpecialType.System_Int32 && 11485original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }; 12388accessType = GetSpecialType(SpecialType.System_Void, diagnostics, node); 12399accessType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node).Construct(accessType);
Binder\Binder_InterpolatedString.cs (18)
41var stringType = GetSpecialType(SpecialType.System_String, diagnostics, node); 55var intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 167var constantValue = ConstantValue.Create(text, SpecialType.System_String); 219Debug.Assert(unconvertedInterpolatedString.Type?.SpecialType == SpecialType.System_String); 245Debug.Assert(unconvertedInterpolatedString.Parts.All(static part => part.Type is null or { SpecialType: SpecialType.System_String })); 304fillin.Value.Type?.SpecialType != SpecialType.System_String || 414expressions[0] = new BoundLiteral(syntax, ConstantValue.Create(formatString.ToStringAndFree()), GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_String, diagnostics, syntax)) { WasCompilerGenerated = true }; 436=> parts.All(p => p is BoundLiteral or BoundStringInsert { Value.Type.SpecialType: SpecialType.System_String, Alignment: null, Format: null }); 517var @string = GetSpecialType(SpecialType.System_String, diagnostics, rootSyntax); 674TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax); 711var intType = GetSpecialType(SpecialType.System_Int32, diagnostics, syntax); 722var boolType = GetSpecialType(SpecialType.System_Boolean, diagnostics, syntax); 853var objectType = GetSpecialType(SpecialType.System_Object, diagnostics, unconvertedInterpolatedString.Syntax); 887Debug.Assert(part is BoundLiteral { Type: { SpecialType: SpecialType.System_String }, ConstantValueOpt.IsString: true }); 985bool methodReturnsBool = returnType.SpecialType == SpecialType.System_Boolean; 986if (!methodReturnsBool && returnType.SpecialType != SpecialType.System_Void) 998var expected = builderPatternExpectsBool == true ? Compilation.GetSpecialType(SpecialType.System_Boolean) : Compilation.GetSpecialType(SpecialType.System_Void);
Binder\Binder_Invocation.cs (13)
276TypeSymbol objType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 1468Debug.Assert(parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object); 1733defaultValue = new BoundLiteral(syntax, ConstantValue.Create(line), Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true }; 1738defaultValue = new BoundLiteral(syntax, ConstantValue.Create(path), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true }; 1743defaultValue = new BoundLiteral(syntax, ConstantValue.Create(memberName), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true }; 1748&& Conversions.ClassifyBuiltInConversion(Compilation.GetSpecialType(SpecialType.System_String), parameterType, isChecked: false, ref discardedUseSiteInfo).Exists 1751defaultValue = new BoundLiteral(syntax, ConstantValue.Create(argument.Syntax.ToString()), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true }; 1756if (parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object) 1776if (InAttributeArgument && parameterType.SpecialType == SpecialType.System_Object) 1787if (!conversion.IsValid && defaultConstantValue is { SpecialType: SpecialType.System_Decimal or SpecialType.System_DateTime }) 1880TypeSymbol int32Type = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2471return new BoundNameOfOperator(node, boundArgument, ConstantValue.Create(name), Compilation.GetSpecialType(SpecialType.System_String));
Binder\Binder_Lookup.cs (10)
1072var iFaceSpecial = iFaceOriginal.SpecialType; 1075return iFaceSpecial == SpecialType.System_Collections_Generic_IEnumerable_T || 1076iFaceSpecial == SpecialType.System_Collections_Generic_IList_T || 1077iFaceSpecial == SpecialType.System_Collections_Generic_ICollection_T || 1079iFaceSpecial == SpecialType.System_Collections_Generic_IReadOnlyList_T || 1080iFaceSpecial == SpecialType.System_Collections_Generic_IReadOnlyCollection_T || 1082iFaceSpecial == SpecialType.System_Collections_IEnumerable || 1263this.LookupMembersInClass(tmp, this.Compilation.GetSpecialType(SpecialType.System_Object), name, arity, basesBeingResolved, options, originalBinder, type, diagnose, ref useSiteInfo); 1356hiddenContainer.SpecialType != SpecialType.System_Object) 2135this.AddMemberLookupSymbolsInfoInClass(result, Compilation.GetSpecialType(SpecialType.System_Object), options, originalBinder, accessThroughType);
Binder\Binder_Operators.cs (45)
563return ResultIsUsed(node) ? leftType : GetSpecialType(SpecialType.System_Void, diagnostics, node); 721type = this.GetSpecialType(SpecialType.System_Void, diagnostics, node); //we know the return type would have been void 755type = this.GetSpecialType(SpecialType.System_Void, diagnostics, node); 973return new BoundLiteral(node, ConstantValue.Create(kind == BinaryOperatorKind.Equal), GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 988Debug.Assert(right.Type.SpecialType == SpecialType.System_String); 1202GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 1381namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type.SpecialType is SpecialType.System_Byte; 1441if ((object)left.Type != null && left.Type.SpecialType == SpecialType.System_Boolean && 1442(object)right.Type != null && right.Type.SpecialType == SpecialType.System_Boolean) 1505bool bothBool = signature.LeftType.SpecialType == SpecialType.System_Boolean && 1506signature.RightType.SpecialType == SpecialType.System_Boolean; 1603var booleanType = Compilation.GetSpecialType(SpecialType.System_Boolean); 2022return GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2362(operand.Type.SpecialType == SpecialType.System_UInt64 || isNuint(operand.Type))) 2391return type.SpecialType == SpecialType.System_UIntPtr 2656internal static SpecialType GetEnumPromotedType(SpecialType underlyingType) 2660case SpecialType.System_Byte: 2661case SpecialType.System_SByte: 2662case SpecialType.System_Int16: 2663case SpecialType.System_UInt16: 2664return SpecialType.System_Int32; 2666case SpecialType.System_Int32: 2667case SpecialType.System_UInt32: 2668case SpecialType.System_Int64: 2669case SpecialType.System_UInt64: 2706SpecialType operandSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 2732Debug.Assert(resultTypeSymbol.SpecialType == SpecialType.System_Boolean); 2741if (resultTypeSymbol.SpecialType != SpecialType.System_Boolean && constantValue != null && !constantValue.IsBad) 2801SpecialType resultType = resultTypeSymbol.SpecialType; 3671return mode == InstanceUserDefinedIncrementUsageMode.ResultIsUsed ? operandType : GetSpecialType(SpecialType.System_Void, diagnostics, node); 4447var upconvertSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 4496SpecialType resultType = resultTypeSymbol.SpecialType; 4708return new BoundLiteral(node, ConstantValue.Create((int)-2147483648), GetSpecialType(SpecialType.System_Int32, diagnostics, node)); 4723return new BoundLiteral(node, ConstantValue.Create(-9223372036854775808), GetSpecialType(SpecialType.System_Int64, diagnostics, node)); 4847var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 4923GetSpecialType(SpecialType.System_Object, diagnostics, node).Name // a pretty way of getting the string "Object" 4931inputType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 5016boolType: GetSpecialType(SpecialType.System_Boolean, diagnostics, node), 5186if (operandType.IsValueType && targetType.IsClassType() && targetType.SpecialType != SpecialType.System_Enum || 5187targetType.IsValueType && operandType.IsClassType() && operandType.SpecialType != SpecialType.System_Enum) 5471type: GetSpecialType(SpecialType.System_Object, diagnostics, node)); 5489operandType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 5496targetType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 5726var objectType = GetSpecialType(SpecialType.System_Object, diagnostics, node);
Binder\Binder_Patterns.cs (28)
38inputType = unionTypeOverride.UnionValueProperty(ref useSiteInfo)?.Type ?? Compilation.GetSpecialType(SpecialType.System_Object); 85node, expression, pattern, hasUnionMatching, GetSpecialType(SpecialType.System_Boolean, diagnostics, node), 515if (convertedType.SpecialType == SpecialType.System_String && inputType.IsSpanOrReadOnlySpanChar()) 654strippedInputType.SpecialType is not SpecialType.System_Object and not SpecialType.System_ValueType) 745if (expression.Type?.SpecialType == SpecialType.System_String && inputType.IsSpanOrReadOnlySpanChar()) 1010expressionType = conversions.CorLibrary.GetSpecialType(SpecialType.System_Object); 1343var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1477if (declType != (object)Compilation.GetSpecialType(SpecialType.System_Object) && 1696var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1747if (memberType.SpecialType == SpecialType.System_Int32 && 1953bool isExplicitNotNullTest = patternType.Type.SpecialType == SpecialType.System_Object; 2052SpecialType.System_Single => BinaryOperatorKind.Float, 2053SpecialType.System_Double => BinaryOperatorKind.Double, 2054SpecialType.System_Char => BinaryOperatorKind.Char, 2055SpecialType.System_SByte => BinaryOperatorKind.Int, // operands are converted to int 2056SpecialType.System_Byte => BinaryOperatorKind.Int, // operands are converted to int 2057SpecialType.System_UInt16 => BinaryOperatorKind.Int, // operands are converted to int 2058SpecialType.System_Int16 => BinaryOperatorKind.Int, // operands are converted to int 2059SpecialType.System_Int32 => BinaryOperatorKind.Int, 2060SpecialType.System_UInt32 => BinaryOperatorKind.UInt, 2061SpecialType.System_Int64 => BinaryOperatorKind.Long, 2062SpecialType.System_UInt64 => BinaryOperatorKind.ULong, 2063SpecialType.System_Decimal => BinaryOperatorKind.Decimal, 2064SpecialType.System_String => BinaryOperatorKind.String, 2065SpecialType.System_Boolean => BinaryOperatorKind.Bool, 2066SpecialType.System_IntPtr when type.IsNativeIntegerType => BinaryOperatorKind.NInt, 2067SpecialType.System_UIntPtr when type.IsNativeIntegerType => BinaryOperatorKind.NUInt,
Binder\Binder_QueryErrors.cs (2)
89var ienumerable_t = Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 127var ienumerable = Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable);
Binder\Binder_Statements.cs (11)
1283if (initializerType.SpecialType == SpecialType.System_String && 1284((object)fixedPatternMethod == null || fixedPatternMethod.ContainingType.SpecialType != SpecialType.System_String)) 1287elementType = this.GetSpecialType(SpecialType.System_Char, diagnostics, initializerSyntax); 1535type = this.GetSpecialType(SpecialType.System_Void, diagnostics, node); 2291if (sourceType.SpecialType == SpecialType.System_Double && syntax.Kind() == SyntaxKind.NumericLiteralExpression && 2292(targetType.SpecialType == SpecialType.System_Single || targetType.SpecialType == SpecialType.System_Decimal)) 2294Error(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType); 2687var boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 3607else if (expression.Type?.SpecialType == SpecialType.System_Void) 3932if (baseType.SpecialType == SpecialType.System_Object)
Binder\Binder_Symbols.cs (6)
1005var specialType = 1006node.IsNint ? SpecialType.System_IntPtr : 1007node.IsNuint ? SpecialType.System_UIntPtr : SpecialType.None; 1009if (specialType == SpecialType.None) 1072this.GetSpecialType(SpecialType.System_Boolean, diagnostics, node);
Binder\Binder_TupleOperators.cs (3)
33TypeSymbol resultType = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 132TypeSymbol boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 426NamedTypeSymbol nullableT = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, syntax);
Binder\Binder.ValueChecks.cs (3)
966if ((expr.ConstantValueOpt != null) || (expr.Type.GetSpecialTypeSafe() == SpecialType.System_Void)) 3704if (expr.Type?.GetSpecialTypeSafe() == SpecialType.System_Void) 3993if (expr.Type?.GetSpecialTypeSafe() == SpecialType.System_Void)
Binder\DecisionDagBuilder.cs (59)
376(pattern.InputType.SpecialType == SpecialType.System_Object)); 462Type.SpecialType: SpecialType.System_Object 485Property: { Name: WellKnownMemberNames.ValuePropertyName, Type.SpecialType: SpecialType.System_Object } property, 508RoslynDebug.Assert(getLengthProperty.Type.SpecialType == SpecialType.System_Int32); 733Type.SpecialType: SpecialType.System_Boolean, 849if (input.Type.IsDynamic() ? type.SpecialType == SpecialType.System_Object : conversion.IsImplicit) 1174bin.NarrowedType.SpecialType == SpecialType.System_Object)); 2729case (SpecialType.System_SByte, SpecialType.System_Byte): 2730case (SpecialType.System_Byte, SpecialType.System_SByte): 2731case (SpecialType.System_Int16, SpecialType.System_UInt16): 2732case (SpecialType.System_UInt16, SpecialType.System_Int16): 2733case (SpecialType.System_Int32, SpecialType.System_UInt32): 2734case (SpecialType.System_UInt32, SpecialType.System_Int32): 2735case (SpecialType.System_Int64, SpecialType.System_UInt64): 2736case (SpecialType.System_UInt64, SpecialType.System_Int64): 2737case (SpecialType.System_IntPtr, SpecialType.System_UIntPtr): 2738case (SpecialType.System_UIntPtr, SpecialType.System_IntPtr): 2743case (SpecialType.System_Int32, SpecialType.System_IntPtr): 2744case (SpecialType.System_Int32, SpecialType.System_UIntPtr): 2745case (SpecialType.System_UInt32, SpecialType.System_IntPtr): 2746case (SpecialType.System_UInt32, SpecialType.System_UIntPtr): 2747case (SpecialType.System_IntPtr, SpecialType.System_Int32): 2748case (SpecialType.System_IntPtr, SpecialType.System_UInt32): 2749case (SpecialType.System_UIntPtr, SpecialType.System_Int32): 2750case (SpecialType.System_UIntPtr, SpecialType.System_UInt32): 2755case (SpecialType.System_Int64, SpecialType.System_IntPtr): 2756case (SpecialType.System_Int64, SpecialType.System_UIntPtr): 2757case (SpecialType.System_UInt64, SpecialType.System_IntPtr): 2758case (SpecialType.System_UInt64, SpecialType.System_UIntPtr): 2759case (SpecialType.System_IntPtr, SpecialType.System_Int64): 2760case (SpecialType.System_IntPtr, SpecialType.System_UInt64): 2761case (SpecialType.System_UIntPtr, SpecialType.System_Int64): 2762case (SpecialType.System_UIntPtr, SpecialType.System_UInt64):
Binder\ForEachLoopBinder.cs (22)
266if (!hasErrors && (moveNextAwaitableInfo.GetResult ?? moveNextAwaitableInfo.RuntimeAsyncAwaitCall?.Method)?.ReturnType.SpecialType != SpecialType.System_Boolean) 595(collectionConversionClassification.Kind == ConversionKind.ExplicitReference && collectionExpr.Type.SpecialType == SpecialType.System_String)); 705else if (collectionExpr.Type.SpecialType == SpecialType.System_String && builder.CollectionType.SpecialType == SpecialType.System_Collections_IEnumerable) 711inferredType = TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, collectionExpr.Syntax)); 1021if (!isAsync && collectionExprType.SpecialType == SpecialType.System_String) 1089this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)); 1127Debug.Assert(collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 1186Debug.Assert(collectionType.SpecialType == SpecialType.System_Collections_IEnumerable); 1191builder.ElementTypeWithAnnotations = builder.CurrentPropertyGetter?.ReturnTypeWithAnnotations ?? TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Object, diagnostics, errorLocationSyntax)); 1194builder.GetEnumeratorInfo.Method.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator); 1283NamedTypeSymbol targetInterface = isAsync ? this.Compilation.GetWellKnownType(WellKnownType.System_IAsyncDisposable) : this.Compilation.GetSpecialType(SpecialType.System_IDisposable); 1306builder.CollectionType = GetSpecialType(SpecialType.System_Collections_IEnumerable, diagnostics, syntax); 1313GetSpecialType(SpecialType.System_Object, diagnostics, syntax)); 1317builder.ElementTypeWithAnnotations = collectionExprType.SpecialType == SpecialType.System_String ? 1318TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, syntax)) : 1330TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1761return moveNextMethodCandidate.OriginalDefinition.ReturnType.SpecialType != SpecialType.System_Boolean; 1779case SpecialType.System_Collections_IEnumerable: 1780case SpecialType.System_Collections_Generic_IEnumerable_T: 1821var implementedNonGeneric = this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 1901return type.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T;
Binder\InContainerBinder.cs (1)
91return TypeWithAnnotations.Create(this.Compilation.GetSpecialType(SpecialType.System_Object));
Binder\InMethodBinder.cs (5)
144case SpecialType.System_Collections_IEnumerable: 145case SpecialType.System_Collections_IEnumerator: 146var objectType = compilation.GetSpecialType(SpecialType.System_Object); 153case SpecialType.System_Collections_Generic_IEnumerable_T: 154case SpecialType.System_Collections_Generic_IEnumerator_T:
Binder\PatternExplainer.cs (28)
838if (underlyingType.SpecialType == SpecialType.System_IntPtr) 846else if (underlyingType.SpecialType == SpecialType.System_UIntPtr) 864SpecialType.System_Int32 => true, 865SpecialType.System_Int64 => true, 866SpecialType.System_UInt32 => true, 867SpecialType.System_UInt64 => true, 868SpecialType.System_String => true, 869SpecialType.System_Decimal => true, 870SpecialType.System_Single => true, 871SpecialType.System_Double => true, 872SpecialType.System_Boolean => true, 873SpecialType.System_Char => true, 885case SpecialType.System_Boolean: 886case SpecialType.System_Byte: 887case SpecialType.System_SByte: 888case SpecialType.System_UInt16: 889case SpecialType.System_Int16: 890case SpecialType.System_Int32: 891case SpecialType.System_UInt32: 892case SpecialType.System_UInt64: 893case SpecialType.System_Int64: 894case SpecialType.System_IntPtr when type.IsNativeIntegerType: 895case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 896case SpecialType.System_Decimal: 897case SpecialType.System_Char: 898case SpecialType.System_String: 901case SpecialType.System_Single: 910case SpecialType.System_Double:
Binder\RefSafetyAnalysis.cs (2)
923Debug.Assert(placeholder.Type.SpecialType == SpecialType.System_Boolean); 1144Debug.Assert(node.ArgumentPlaceholders.All(p => p is BoundImplicitIndexerValuePlaceholder { Type.SpecialType: SpecialType.System_Int32 }));
Binder\Semantics\Conversions\Conversions.cs (3)
80SpecialType.System_Decimal => WellKnownMember.System_Runtime_CompilerServices_DecimalConstantAttribute__ctor, 81SpecialType.System_DateTime => WellKnownMember.System_Runtime_CompilerServices_DateTimeConstantAttribute__ctor, 450TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers,
Binder\Semantics\Conversions\ConversionsBase.cs (85)
250var sourceIsVoid = source?.SpecialType == SpecialType.System_Void; 251var destIsVoid = destination.SpecialType == SpecialType.System_Void; 1378var specialSource = source.Type.GetSpecialTypeSafe(); 1380if (specialSource == SpecialType.System_Int32) 1386case SpecialType.System_Byte: 1388case SpecialType.System_SByte: 1390case SpecialType.System_Int16: 1392case SpecialType.System_IntPtr when destination.IsNativeIntegerType: 1394case SpecialType.System_UInt32: 1395case SpecialType.System_UIntPtr when destination.IsNativeIntegerType: 1397case SpecialType.System_UInt64: 1399case SpecialType.System_UInt16: 1405else if (specialSource == SpecialType.System_Int64 && destination.GetSpecialTypeSafe() == SpecialType.System_UInt64 && (constantValue.IsBad || 0 <= constantValue.Int64Value)) 1634var multicastDelegateType = corLibrary.GetSpecialType(SpecialType.System_MulticastDelegate); 1694else if (implementsSpecialInterface(compilation, destination, SpecialType.System_Collections_IEnumerable)) 1713static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface) 1771TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1798TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 2117case SpecialType.System_Char: 2118case SpecialType.System_SByte: 2119case SpecialType.System_Byte: 2120case SpecialType.System_Int16: 2121case SpecialType.System_UInt16: 2122case SpecialType.System_Int32: 2123case SpecialType.System_UInt32: 2124case SpecialType.System_Int64: 2125case SpecialType.System_UInt64: 2126case SpecialType.System_Single: 2127case SpecialType.System_Double: 2128case SpecialType.System_Decimal: 2129case SpecialType.System_IntPtr when type.IsNativeIntegerType: 2130case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 2202case SpecialType.System_SByte: 2203case SpecialType.System_Byte: 2204case SpecialType.System_Int16: 2205case SpecialType.System_UInt16: 2206case SpecialType.System_Char: 2207case SpecialType.System_Int32: 2208case SpecialType.System_UInt32: 2209case SpecialType.System_Int64: 2210case SpecialType.System_UInt64: 2211case SpecialType.System_Double: 2212case SpecialType.System_Single: 2213case SpecialType.System_Decimal: 2220(type.SpecialType == SpecialType.System_IntPtr || type.SpecialType == SpecialType.System_UIntPtr) && !type.IsNativeIntegerType; 2595if (destination.SpecialType == SpecialType.System_Collections_IEnumerable) 2665if (destination.SpecialType == SpecialType.System_Object || destination.Kind == SymbolKind.DynamicType) 2759if (destination.GetSpecialTypeSafe() == SpecialType.System_Array) 2764if (IsBaseInterface(destination, this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Array), ref useSiteInfo)) 2797var specialDestination = destination.GetSpecialTypeSafe(); 2799if (specialDestination == SpecialType.System_MulticastDelegate || 2800specialDestination == SpecialType.System_Delegate || 2801IsBaseInterface(destination, this.corLibrary.GetDeclaredSpecialType(SpecialType.System_MulticastDelegate), ref useSiteInfo)) 2830if (destination.SpecialType == SpecialType.System_MulticastDelegate) 2840var derivedType = this.corLibrary.GetDeclaredSpecialType(SpecialType.System_MulticastDelegate); 3393return source.IsPointerOrFunctionPointer() && destination is PointerTypeSymbol { PointedAtType: { SpecialType: SpecialType.System_Void } }; 3484if (source.SpecialType == SpecialType.System_Object) 3662if (source.SpecialType == SpecialType.System_Delegate || source.SpecialType == SpecialType.System_MulticastDelegate) 3667if (HasImplicitConversionToInterface(this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Delegate), source, ref useSiteInfo)) 3769if (source.SpecialType == SpecialType.System_Array) 3774foreach (var iface in this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Array).AllInterfacesWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 3803var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3805if (specialDefinition == SpecialType.System_Collections_Generic_IList_T || 3806specialDefinition == SpecialType.System_Collections_Generic_ICollection_T || 3807specialDefinition == SpecialType.System_Collections_Generic_IEnumerable_T || 3808specialDefinition == SpecialType.System_Collections_Generic_IReadOnlyList_T || 3809specialDefinition == SpecialType.System_Collections_Generic_IReadOnlyCollection_T) 3852var specialTypeSource = source.SpecialType; 3854if (specialTypeSource == SpecialType.System_Object || specialTypeSource == SpecialType.System_ValueType) 3873if (source.SpecialType == SpecialType.System_Enum && destination.IsEnumType()) 3946case SpecialType.System_SByte: 3947case SpecialType.System_Byte: 3948case SpecialType.System_Int16: 3949case SpecialType.System_UInt16: 3950case SpecialType.System_Int32: 3951case SpecialType.System_UInt32: 3952case SpecialType.System_Int64: 3953case SpecialType.System_UInt64: 3955case SpecialType.System_IntPtr: 3956case SpecialType.System_UIntPtr: 4014return spanElementType.SpecialType is SpecialType.System_Char;
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
889var nullable = this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Nullable_T);
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (3)
354if (left.Type.SpecialType == SpecialType.System_Int32 || 355left.Type.SpecialType == SpecialType.System_Boolean || 356left.Type.SpecialType == SpecialType.System_String)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (26)
325operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 393TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate); 489Debug.Assert(underlying.SpecialType != SpecialType.None); 540var boolean = Compilation.GetSpecialType(SpecialType.System_Boolean); 564operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType)); 565operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndUIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType)); 566operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndLongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType)); 567operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndULongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType)); 568operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.IntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType, pointerType)); 569operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.UIntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType, pointerType)); 570operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType, pointerType)); 571operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.ULongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType, pointerType)); 574operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType)); 575operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndUIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType)); 576operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndLongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType)); 577operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndULongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType)); 578operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerSubtraction, pointerType, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64))); 595var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void))); 596operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Pointer, voidPointerType, voidPointerType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 781((object)left.Type == null || (!left.Type.IsDelegateType() && left.Type.SpecialType != SpecialType.System_String && left.Type.SpecialType != SpecialType.System_Delegate)) && 782((object)right.Type == null || (!right.Type.IsDelegateType() && right.Type.SpecialType != SpecialType.System_String && right.Type.SpecialType != SpecialType.System_Delegate)); 798var @object = Compilation.GetSpecialType(SpecialType.System_Object); 799operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Object, @object, @object, Compilation.GetSpecialType(SpecialType.System_Boolean))); 1090return result.SpecialType == SpecialType.System_Boolean ?
Binder\Semantics\Operators\OperatorFacts.cs (23)
34case SpecialType.System_Array: 35case SpecialType.System_Boolean: 36case SpecialType.System_Byte: 37case SpecialType.System_Char: 38case SpecialType.System_Decimal: 39case SpecialType.System_Delegate: 40case SpecialType.System_Double: 41case SpecialType.System_Enum: 42case SpecialType.System_Int16: 43case SpecialType.System_Int32: 44case SpecialType.System_Int64: 45case SpecialType.System_IntPtr when type.IsNativeIntegerType: 46case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 47case SpecialType.System_MulticastDelegate: 48case SpecialType.System_Object: 49case SpecialType.System_SByte: 50case SpecialType.System_Single: 51case SpecialType.System_String: 52case SpecialType.System_UInt16: 53case SpecialType.System_UInt32: 54case SpecialType.System_UInt64: 55case SpecialType.System_ValueType: 56case SpecialType.System_Void:
Binder\Semantics\Operators\OperatorKindExtensions.cs (10)
147public static BinaryOperatorKind WithType(this BinaryOperatorKind kind, SpecialType type) 152case SpecialType.System_Int32: 154case SpecialType.System_UInt32: 156case SpecialType.System_Int64: 158case SpecialType.System_UInt64: 165public static UnaryOperatorKind WithType(this UnaryOperatorKind kind, SpecialType type) 170case SpecialType.System_Int32: 172case SpecialType.System_UInt32: 174case SpecialType.System_Int64: 176case SpecialType.System_UInt64:
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
21return Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
1421if (!returnType.HasType || returnType.SpecialType == SpecialType.System_Void) 1476if (!sourceReturnType.HasType || sourceReturnType.SpecialType == SpecialType.System_Void)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (16)
204members.All(static m => m.ContainingSymbol is NamedTypeSymbol { BaseTypeNoUseSiteDiagnostics.SpecialType: SpecialType.System_Object })); 1653if (type.SpecialType == SpecialType.System_Object && currentType.SpecialType != SpecialType.System_Object) 1715if (type.IsClassType() && type.GetSpecialTypeSafe() != SpecialType.System_Object) 2835t1.IsDynamic() && t2.SpecialType == SpecialType.System_Object || 2836t2.IsDynamic() && t1.SpecialType == SpecialType.System_Object); 3819case SpecialType.System_SByte: 3820case SpecialType.System_Int16: 3821case SpecialType.System_Int32: 3822case SpecialType.System_Int64: 3823case SpecialType.System_IntPtr when type.IsNativeIntegerType: 3840case SpecialType.System_Byte: 3841case SpecialType.System_UInt16: 3842case SpecialType.System_UInt32: 3843case SpecialType.System_UInt64: 3844case SpecialType.System_UIntPtr when type.IsNativeIntegerType:
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1410=> argument is BoundLiteral { Type.SpecialType: SpecialType.System_String } &&
Binder\SwitchBinder.cs (1)
423if (switchGoverningType.SpecialType == SpecialType.System_Boolean)
Binder\UnionMatchingRewriter.cs (1)
53private NamedTypeSymbol ObjectType => _compilation.GetSpecialType(SpecialType.System_Object);
Binder\UsingStatementBinder.cs (1)
314: originalBinder.Compilation.GetSpecialType(SpecialType.System_IDisposable);
BoundTree\UnboundLambda.cs (3)
805returnType = TypeWithAnnotations.Create(Binder.Compilation.GetSpecialType(SpecialType.System_Void)); 1023? TypeWithAnnotations.Create(this.Binder.Compilation.GetSpecialType(SpecialType.System_Void)) 1279? this.Binder.Compilation.GetSpecialType(SpecialType.System_Void)
CodeGen\EmitArrayInitializer.cs (16)
442SpecialType specialElementType = SpecialType.None; 684if (elementType.IsReferenceType && elementType.SpecialType != SpecialType.System_String) 790internal static bool IsTypeAllowedInBlobWrapper(SpecialType type) => type is 794SpecialType.System_SByte or SpecialType.System_Byte or SpecialType.System_Boolean or 800SpecialType.System_Int16 or SpecialType.System_UInt16 or SpecialType.System_Char or 803SpecialType.System_Int32 or SpecialType.System_UInt32 or SpecialType.System_Single or 806SpecialType.System_Int64 or SpecialType.System_UInt64 or SpecialType.System_Double;
CodeGen\EmitConversion.cs (4)
416if (parameters[0].Type.SpecialType != SpecialType.System_Object) continue; 417var p1t = parameters[1].Type.SpecialType; 418if (p1t == SpecialType.System_IntPtr || p1t == SpecialType.System_UIntPtr)
CodeGen\EmitExpression.cs (34)
53(expression.Type.SpecialType != SpecialType.System_Decimal && 1144Debug.Assert(!field.IsConst || field.ContainingType.SpecialType == SpecialType.System_Decimal, 1341case SpecialType.System_Byte: 1343case SpecialType.System_Int16: 1345case SpecialType.System_Int32: 1347case SpecialType.System_Int64: 1349case SpecialType.System_Char: 1351case SpecialType.System_Boolean: 1353case SpecialType.System_SByte: 1355case SpecialType.System_UInt16: 1357case SpecialType.System_UInt32: 1359case SpecialType.System_UInt64: 1361case SpecialType.System_IntPtr: 1363case SpecialType.System_UIntPtr: 1365case SpecialType.System_Single: 1367case SpecialType.System_Double: 1369case SpecialType.System_RuntimeTypeHandle: 1371case SpecialType.System_RuntimeFieldHandle: 1373case SpecialType.System_RuntimeMethodHandle: 1375case SpecialType.System_RuntimeArgumentHandle: 1427(!used && parameter.Type.SpecialType == SpecialType.System_Byte && 2393Debug.Assert(expression.Type.SpecialType == SpecialType.System_Int32 || 2394expression.Type.SpecialType == SpecialType.System_Int64 || 2395expression.Type.SpecialType == SpecialType.System_UIntPtr); 2654if (rightType.IsReferenceType || (right.ConstantValueOpt != null && rightType.SpecialType != SpecialType.System_Decimal)) 3504if (!type.IsTypeParameter() && type.SpecialType != SpecialType.System_Decimal) 3514if (type.IsPointerOrFunctionPointer() || type.SpecialType == SpecialType.System_UIntPtr) 3520else if (type.SpecialType == SpecialType.System_IntPtr) 3534Debug.Assert(expression.Type.SpecialType == SpecialType.System_Decimal || 3601Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3618Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3632Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3655Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3734Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
CodeGen\EmitOperators.cs (23)
305Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 306Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 314Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 315Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 331Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 332Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 337Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 338Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 343Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 344Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 375if (comparand is BoundConversion { Type.SpecialType: SpecialType.System_Object, ConversionKind: ConversionKind.Boxing, Operand.Type: TypeParameterSymbol { AllowsRefLikeType: true } } && 496Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean); 531Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean); 678SpecialType type = enumType.GetEnumUnderlyingType().SpecialType; 681case SpecialType.System_Byte: 684case SpecialType.System_SByte: 687case SpecialType.System_Int16: 690case SpecialType.System_UInt16: 763private static bool IsUnsigned(SpecialType type) 767case SpecialType.System_Byte: 768case SpecialType.System_UInt16: 769case SpecialType.System_UInt32: 770case SpecialType.System_UInt64:
CodeGen\EmitStatement.cs (8)
1072_module.GetSpecialType(SpecialType.System_Object, catchBlock.Syntax, _diagnostics.DiagnosticBag); 1335expression.Type.SpecialType == SpecialType.System_String || expression.Type.IsSpanOrReadOnlySpanChar()); 1338if (expression.Type.SpecialType == SpecialType.System_String || expression.Type.IsSpanOrReadOnlySpanChar()) 1420var int32Type = Binder.GetSpecialType(_module.Compilation, SpecialType.System_Int32, syntaxNode, _diagnostics); 1448var charType = Binder.GetSpecialType(_module.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics); 1551var UInt32Type = Binder.GetSpecialType(_module.Compilation, SpecialType.System_UInt32, syntaxNode, _diagnostics); 1572var sequenceEqualsCharMethod = sequenceEqualsTMethod.Construct(Binder.GetSpecialType(_module.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics)); 1833? _module.GetSpecialType(SpecialType.System_IntPtr, syntaxNode, _diagnostics.DiagnosticBag)
Compilation\BuiltInOperators.cs (54)
264case UnaryOperatorKind.SByte: opType = _compilation.GetSpecialType(SpecialType.System_SByte); break; 265case UnaryOperatorKind.Byte: opType = _compilation.GetSpecialType(SpecialType.System_Byte); break; 266case UnaryOperatorKind.Short: opType = _compilation.GetSpecialType(SpecialType.System_Int16); break; 267case UnaryOperatorKind.UShort: opType = _compilation.GetSpecialType(SpecialType.System_UInt16); break; 268case UnaryOperatorKind.Int: opType = _compilation.GetSpecialType(SpecialType.System_Int32); break; 269case UnaryOperatorKind.UInt: opType = _compilation.GetSpecialType(SpecialType.System_UInt32); break; 270case UnaryOperatorKind.Long: opType = _compilation.GetSpecialType(SpecialType.System_Int64); break; 271case UnaryOperatorKind.ULong: opType = _compilation.GetSpecialType(SpecialType.System_UInt64); break; 274case UnaryOperatorKind.Char: opType = _compilation.GetSpecialType(SpecialType.System_Char); break; 275case UnaryOperatorKind.Float: opType = _compilation.GetSpecialType(SpecialType.System_Single); break; 276case UnaryOperatorKind.Double: opType = _compilation.GetSpecialType(SpecialType.System_Double); break; 277case UnaryOperatorKind.Decimal: opType = _compilation.GetSpecialType(SpecialType.System_Decimal); break; 278case UnaryOperatorKind.Bool: opType = _compilation.GetSpecialType(SpecialType.System_Boolean); break; 693Debug.Assert(((NamedTypeSymbol)readonlySpanOfByte).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type.SpecialType is SpecialType.System_Byte); 720TypeSymbol rightType = _compilation.GetSpecialType(SpecialType.System_Int32); 733return new BinaryOperatorSignature(kind, left, left, _compilation.GetSpecialType(SpecialType.System_Boolean)); 748case BinaryOperatorKind.Int: return _compilation.GetSpecialType(SpecialType.System_Int32); 749case BinaryOperatorKind.UInt: return _compilation.GetSpecialType(SpecialType.System_UInt32); 750case BinaryOperatorKind.Long: return _compilation.GetSpecialType(SpecialType.System_Int64); 751case BinaryOperatorKind.ULong: return _compilation.GetSpecialType(SpecialType.System_UInt64); 754case BinaryOperatorKind.Float: return _compilation.GetSpecialType(SpecialType.System_Single); 755case BinaryOperatorKind.Double: return _compilation.GetSpecialType(SpecialType.System_Double); 756case BinaryOperatorKind.Decimal: return _compilation.GetSpecialType(SpecialType.System_Decimal); 757case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 760return _compilation.GetSpecialType(SpecialType.System_Object); 763return _compilation.GetSpecialType(SpecialType.System_String); 780case BinaryOperatorKind.Int: return _compilation.GetSpecialType(SpecialType.System_Int32); 781case BinaryOperatorKind.UInt: return _compilation.GetSpecialType(SpecialType.System_UInt32); 782case BinaryOperatorKind.Long: return _compilation.GetSpecialType(SpecialType.System_Int64); 783case BinaryOperatorKind.ULong: return _compilation.GetSpecialType(SpecialType.System_UInt64); 786case BinaryOperatorKind.Float: return _compilation.GetSpecialType(SpecialType.System_Single); 787case BinaryOperatorKind.Double: return _compilation.GetSpecialType(SpecialType.System_Double); 788case BinaryOperatorKind.Decimal: return _compilation.GetSpecialType(SpecialType.System_Decimal); 789case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 792return _compilation.GetSpecialType(SpecialType.System_String); 795return _compilation.GetSpecialType(SpecialType.System_Object); 812case BinaryOperatorKind.Int: return _compilation.GetSpecialType(SpecialType.System_Int32); 813case BinaryOperatorKind.UInt: return _compilation.GetSpecialType(SpecialType.System_UInt32); 814case BinaryOperatorKind.Long: return _compilation.GetSpecialType(SpecialType.System_Int64); 815case BinaryOperatorKind.ULong: return _compilation.GetSpecialType(SpecialType.System_UInt64); 818case BinaryOperatorKind.Float: return _compilation.GetSpecialType(SpecialType.System_Single); 819case BinaryOperatorKind.Double: return _compilation.GetSpecialType(SpecialType.System_Double); 820case BinaryOperatorKind.Decimal: return _compilation.GetSpecialType(SpecialType.System_Decimal); 821case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 822case BinaryOperatorKind.Object: return _compilation.GetSpecialType(SpecialType.System_Object); 826return _compilation.GetSpecialType(SpecialType.System_String); 839BinaryOperatorKind.Int => _compilation.GetSpecialType(SpecialType.System_Int32), 840BinaryOperatorKind.UInt => _compilation.GetSpecialType(SpecialType.System_UInt32), 841BinaryOperatorKind.Long => _compilation.GetSpecialType(SpecialType.System_Int64), 842BinaryOperatorKind.ULong => _compilation.GetSpecialType(SpecialType.System_UInt64), 845BinaryOperatorKind.Float => _compilation.GetSpecialType(SpecialType.System_Single), 846BinaryOperatorKind.Double => _compilation.GetSpecialType(SpecialType.System_Double), 847BinaryOperatorKind.Decimal => _compilation.GetSpecialType(SpecialType.System_Decimal), 848BinaryOperatorKind.Bool => _compilation.GetSpecialType(SpecialType.System_Boolean),
Compilation\CSharpCompilation.cs (34)
888return info.ConvertedType?.SpecialType != SpecialType.System_Void; 1746if ((int)specialType <= (int)SpecialType.None || (int)specialType >= (int)InternalSpecialType.NextAvailable) 1791constructedNullableInstance = this.GetSpecialType(SpecialType.System_Nullable_T).Construct(typeArgument); 1884SpecialType.None, 2270if (method.ReturnType.IsVoidType() || method.ReturnType.SpecialType == SpecialType.System_Int32) 2300return returnType.IsVoidType() || returnType.SpecialType == SpecialType.System_Int32; 2319if (returnType.SpecialType != SpecialType.System_Int32 && !returnType.IsVoidType()) 2356return (array.IsSZArray && array.ElementType.SpecialType == SpecialType.System_String, returnsTaskOrTaskOfInt); 4221private protected override INamedTypeSymbolInternal CommonGetSpecialType(SpecialType specialType) 4345return GetSpecialType(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr).AsNativeInteger(); 4477if (csharpReturnType.SpecialType != SpecialType.None && 4478csharpLeftType.SpecialType != SpecialType.None && 4479csharpRightType.SpecialType != SpecialType.None) 4500csharpReturnType.SpecialType is SpecialType.System_Boolean) 4503(SpecialType.System_Object, SpecialType.System_Object) or 4504(SpecialType.System_Delegate, SpecialType.System_Delegate)) 4517csharpReturnType.SpecialType == SpecialType.System_Boolean) 4545csharpReturnType.SpecialType is SpecialType.System_Boolean && 4600csharpReturnType.SpecialType is SpecialType.System_Boolean && 4601csharpLeftType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void } && 4602csharpRightType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void }) 4637csharpReturnType.SpecialType is SpecialType.System_Int64 && 4656=> type.SpecialType is SpecialType.System_Int32 or SpecialType.System_UInt32 or SpecialType.System_Int64 or SpecialType.System_UInt64; 4659=> IsReadOnlySpanType(type) && ((NamedTypeSymbol)type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType == SpecialType.System_Byte; 4702if (csharpReturnType.SpecialType != SpecialType.None && csharpOperandType.SpecialType != SpecialType.None) 4893internal bool CanEmitBoolean() => CanEmitSpecialType(SpecialType.System_Boolean); 4895internal bool CanEmitSpecialType(SpecialType type)
Compilation\CSharpSemanticModel.cs (2)
3886binaryOperator.Type.SpecialType == SpecialType.System_Boolean) 3889var objectType = binaryOperator.Type.ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
38Debug.Assert(ContainingType.BaseTypeNoUseSiteDiagnostics.SpecialType == SpecialType.System_Object);
Compiler\ClsComplianceChecker.cs (7)
532System.Diagnostics.Debug.Assert((object)baseType != null || symbol.SpecialType == SpecialType.System_Object || symbol.IsExtension, "Only object or extension has no base."); 1019case SpecialType.System_TypedReference: 1020case SpecialType.System_UIntPtr: 1024case SpecialType.System_SByte: // sic 1025case SpecialType.System_UInt16: 1026case SpecialType.System_UInt32: 1027case SpecialType.System_UInt64:
Compiler\MethodBodySynthesizer.cs (5)
37Debug.Assert((object)constructor.ContainingType.BaseTypeNoUseSiteDiagnostics == null || constructor.ContainingType.BaseTypeNoUseSiteDiagnostics.SpecialType == SpecialType.System_Object); 38var objectType = constructor.ContainingAssembly.GetSpecialType(SpecialType.System_Object); 94var intType = compilation.GetSpecialType(SpecialType.System_Int32); 95var objectType = compilation.GetSpecialType(SpecialType.System_Object); 354TypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
Compiler\MethodBodySynthesizer.Lowered.cs (9)
55LocalSymbol i = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32)); 56LocalSymbol hashCode = F.SynthesizedLocal(F.SpecialType(SpecialType.System_UInt32)); 85F.Binary(BinaryOperatorKind.ObjectNotEqual, F.SpecialType(SpecialType.System_Boolean), 112F.Binary(BinaryOperatorKind.LessThan, F.SpecialType(SpecialType.System_Boolean), 151.Construct(F.SpecialType(SpecialType.System_Char)); 153LocalSymbol i = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32)); 154LocalSymbol hashCode = F.SynthesizedLocal(F.SpecialType(SpecialType.System_UInt32)); 201F.Binary(BinaryOperatorKind.LessThan, F.SpecialType(SpecialType.System_Boolean), 361Debug.Assert(system_Int32.SpecialType == SpecialType.System_Int32);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
39new DeepTranslator(otherAssembly.GetSpecialType(SpecialType.System_Object))); 288return _otherAssembly.GetSpecialType(SpecialType.System_Object);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (3)
73_deepTranslator = new CSharpSymbolMatcher.DeepTranslator(sourceAssembly.GetSpecialType(SpecialType.System_Object)); 311var stringType = Compilation.GetSpecialType(SpecialType.System_String); 312var intType = Compilation.GetSpecialType(SpecialType.System_Int32);
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
297baseType = AdaptedNamedTypeSymbol.ContainingAssembly.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 361else if (method.MethodKind == MethodKind.Destructor && AdaptedNamedTypeSymbol.SpecialType != SpecialType.System_Object) 368TypeSymbol objectType = AdaptedNamedTypeSymbol.DeclaringCompilation.GetSpecialType(CodeAnalysis.SpecialType.System_Object);
Emitter\Model\ParameterSymbolAdapter.cs (3)
86if (constant.SpecialType != SpecialType.None) 244this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_Decimal && 245this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_DateTime;
Emitter\Model\PEAssemblyBuilder.cs (9)
381[new TypedConstant(Compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, markerName)], 606GetSpecialType(SpecialType.System_Byte, diagnostics)); 614GetSpecialType(SpecialType.System_Byte, diagnostics)); 622GetSpecialType(SpecialType.System_Boolean, diagnostics)); 630GetSpecialType(SpecialType.System_Boolean, diagnostics)); 645GetSpecialType(SpecialType.System_Int32, diagnostics)); 653int32Type: GetSpecialType(SpecialType.System_Int32, diagnostics)); 661GetSpecialType(SpecialType.System_String, diagnostics)); 741private NamedTypeSymbol GetSpecialType(SpecialType type, BindingDiagnosticBag diagnostics)
Emitter\Model\PEModuleBuilder.cs (19)
966private NamedTypeSymbol GetUntranslatedSpecialType(SpecialType specialType, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 983internal sealed override Cci.INamedTypeReference GetSpecialType(SpecialType specialType, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 1006return namedType.SpecialType == (SpecialType)platformType; 1236if ((object)declaredBase != null && declaredBase.SpecialType == SpecialType.System_ValueType) 1594return GetSpecialType(SpecialType.System_Object, syntaxNodeOpt, diagnostics); 1639return new SynthesizedPrivateImplementationDetailsStaticConstructor(GetPrivateImplClass(syntaxOpt, diagnostics), GetUntranslatedSpecialType(SpecialType.System_Void, syntaxOpt, diagnostics)).GetCciAdapter(); 1741NamedTypeSymbol byteType = Compilation.GetSpecialType(SpecialType.System_Byte); 1762NamedTypeSymbol byteType = Compilation.GetSpecialType(SpecialType.System_Byte); 1785ImmutableArray.Create(new TypedConstant(Compilation.GetSpecialType(SpecialType.System_Byte), TypedConstantKind.Primitive, value))); 1825NamedTypeSymbol booleanType = Compilation.GetSpecialType(SpecialType.System_Boolean); 1927[new TypedConstant(Compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, markerName)]); 2018TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 2019TypeSymbol unmatchedValueType = factory.SpecialType(SpecialType.System_Object); 2065TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 2085TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 2099Debug.Assert(intType.SpecialType == SpecialType.System_Int32); 2170Debug.Assert(intType.SpecialType == SpecialType.System_Int32); 2187Debug.Assert(intType.SpecialType == SpecialType.System_Int32); 2203Debug.Assert(intType.SpecialType == SpecialType.System_Int32);
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (1)
55factory.Array(payloadArrayType.ElementType, factory.Binary(BinaryOperatorKind.Addition, factory.SpecialType(SpecialType.System_Int32), factory.MaximumMethodDefIndex(), factory.Literal(1))));
Emitter\Model\TypeParameterSymbolAdapter.cs (4)
243SpecialType.System_ValueType, 261case SpecialType.System_Object: 264case SpecialType.System_ValueType: 281var typeRef = moduleBeingBuilt.GetSpecialType(SpecialType.System_ValueType,
Emitter\NoPia\EmbeddedTypesManager.cs (3)
66var typeSymbol = ModuleBeingBuilt.Compilation.GetSpecialType(SpecialType.System_String); 189ImmutableArray.Create(new TypedConstant(ctor.Parameters[0].Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))), 311if (namedType.SpecialType != SpecialType.None || namedType.IsErrorType() || !namedType.ContainingAssembly.IsLinked)
FlowAnalysis\AbstractFlowPass.cs (16)
644else if ((object)node.Type == null || node.Type.SpecialType != SpecialType.System_Boolean) 1461case SpecialType.System_Boolean: 1462case SpecialType.System_Char: 1463case SpecialType.System_SByte: 1464case SpecialType.System_Byte: 1465case SpecialType.System_Int16: 1466case SpecialType.System_UInt16: 1467case SpecialType.System_Int32: 1468case SpecialType.System_UInt32: 1469case SpecialType.System_Int64: 1470case SpecialType.System_UInt64: 1471case SpecialType.System_Decimal: 1472case SpecialType.System_Single: 1473case SpecialType.System_Double: 1474case SpecialType.System_DateTime: 1675&& node.Type.SpecialType == SpecialType.System_Boolean)
FlowAnalysis\DefiniteAssignment.cs (4)
857type.SpecialType != SpecialType.System_String && 858type is not ArrayTypeSymbol { IsSZArray: true, ElementType.SpecialType: SpecialType.System_Byte }) 1548(elementAccess.Argument.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: 0 } || 2367if (target.LocalSymbol.Type.SpecialType == SpecialType.System_Boolean)
FlowAnalysis\NullableWalker.cs (17)
3166returnType.Type.SpecialType == SpecialType.System_Boolean) 3926&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 5090if (property.Type.SpecialType != SpecialType.System_Void) 5653Debug.Assert(binary.Type.SpecialType == SpecialType.System_Boolean); 5743Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean); 7184|| method.ReturnType.SpecialType != SpecialType.System_Boolean 7474&& GetTypeOrReturnType(parameter.ContainingSymbol).SpecialType != SpecialType.System_Boolean) 8074if (method.ReturnType.SpecialType == SpecialType.System_Boolean) 9560Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T); 10896return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(underlying)); 12453if ((object)getMethod != null && getMethod.ContainingType.SpecialType == SpecialType.System_Nullable_T) 12573(conversion.Kind == ConversionKind.ExplicitReference && resultType.SpecialType == SpecialType.System_String)) 12581if (collectionExpression.Type!.SpecialType == SpecialType.System_Collections_IEnumerable) 12640else if (resultType.SpecialType == SpecialType.System_String) 13279Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean); 13282if (typeExpr.Type?.SpecialType == SpecialType.System_Object) 13331Debug.Assert(node.Type.SpecialType == SpecialType.System_RuntimeArgumentHandle);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (7)
165_F.Throw(_F.Null(_F.SpecialType(SpecialType.System_Object))) 223var exceptionType = _F.SpecialType(SpecialType.System_Object); 226var pendingBranchVar = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(_F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingBranch, tryStatementSyntax); 454LocalSymbol obj = _F.SynthesizedLocal(_F.SpecialType(SpecialType.System_Object)); 614var catchType = node.ExceptionTypeOpt ?? _F.SpecialType(SpecialType.System_Object); 1131this.pendingCaughtException = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Object)), SynthesizedLocalKind.TryAwaitPendingCaughtException, tryStatementSyntax); 1132this.pendingCatch = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingCatch, tryStatementSyntax);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (4)
136resultType: F.SpecialType(SpecialType.System_Void), 169resultType: F.SpecialType(SpecialType.System_Void), 241resultType: F.SpecialType(SpecialType.System_Void), 259resultType = F.SpecialType(SpecialType.System_Object);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
461resultType: F.SpecialType(SpecialType.System_Boolean)).ToExpression(); 473? F.SpecialType(SpecialType.System_Object)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (5)
126NamedTypeSymbol boolType = F.SpecialType(SpecialType.System_Boolean); 337var versionSymbol = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int16)); 498.Construct(F.SpecialType(SpecialType.System_Boolean)); 523.Construct(F.SpecialType(SpecialType.System_Boolean)); 549.Construct(F.SpecialType(SpecialType.System_Boolean));
Lowering\AsyncRewriter\AsyncRewriter.cs (2)
141stateField = F.StateMachineField(F.SpecialType(SpecialType.System_Int32), GeneratedNames.MakeStateMachineStateFieldName(), isPublic: true); 147instanceIdField = F.StateMachineField(F.SpecialType(SpecialType.System_UInt64), GeneratedNames.MakeStateMachineStateIdFieldName(), isPublic: true);
Lowering\AsyncRewriter\AsyncStateMachine.cs (1)
49interfaces.Add(compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_Sources_IValueTaskSource_T).Construct(compilation.GetSpecialType(SpecialType.System_Boolean)));
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (1)
258resultType: _factory.SpecialType(SpecialType.System_Boolean)).ToExpression();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (7)
104_int32Type = _bound.SpecialType(SpecialType.System_Int32); 105_objectType = _bound.SpecialType(SpecialType.System_Object); 106_nullableType = _bound.SpecialType(SpecialType.System_Nullable_T); 107_IEnumerableType = _bound.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 376var operand = _bound.Null(_bound.SpecialType(SpecialType.System_Object)); 588if (underlying.SpecialType == SpecialType.System_Boolean) 593var possiblePromote = Binder.GetEnumPromotedType(underlying.SpecialType);
Lowering\DiagnosticsPass_Warnings.cs (4)
329if (node.Left.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Left) && !(node.Left.ConstantValueOpt != null && node.Left.ConstantValueOpt.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Right, out t)) 334else if (node.Right.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Right) && !(node.Right.ConstantValueOpt != null && node.Right.ConstantValueOpt.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Left, out t)) 629SpecialType fromSpecialType = from.SpecialType; 630SpecialType toSpecialType = to.SpecialType;
Lowering\Extensions.cs (1)
132if (expr.Type.IsNullableType() && expr.Type.GetNullableUnderlyingType().SpecialType != SpecialType.System_Boolean)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (3)
116TypeSymbol payloadElementType = methodBodyFactory.SpecialType(SpecialType.System_Boolean); 219methodBodyFactory.SpecialType(SpecialType.System_Int32), fileIndices.ToImmutable()); 292_methodBodyFactory.SpecialType(SpecialType.System_Boolean),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (17)
215SpecialType.System_Boolean 217SpecialType.System_SByte or SpecialType.System_Byte 219SpecialType.System_Int16 or SpecialType.System_UInt16 or SpecialType.System_Char 221SpecialType.System_Int32 or SpecialType.System_UInt32 223SpecialType.System_Int64 or SpecialType.System_UInt64 225SpecialType.System_Single 227SpecialType.System_Double 229SpecialType.System_Decimal 231SpecialType.System_String 469if (parameter.Type.SpecialType == SpecialType.System_String && targetType.SpecialType != SpecialType.System_String) 587if (invocation.Type.SpecialType != SpecialType.System_Void)
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
26var intType = container.DeclaringCompilation.GetSpecialType(SpecialType.System_Int32);
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
147get { return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void)); }
Lowering\IteratorRewriter\IteratorRewriter.cs (15)
70case SpecialType.System_Collections_IEnumerable: 71case SpecialType.System_Collections_Generic_IEnumerable_T: 75case SpecialType.System_Collections_IEnumerator: 76case SpecialType.System_Collections_Generic_IEnumerator_T: 102EnsureSpecialType(SpecialType.System_Int32, bag); 103EnsureSpecialType(SpecialType.System_IDisposable, bag); 107EnsureSpecialType(SpecialType.System_Collections_IEnumerator, bag); 113EnsureSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T, bag); 119EnsureSpecialType(SpecialType.System_Collections_IEnumerable, bag); 121EnsureSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T, bag); 146private void EnsureSpecialType(SpecialType type, BindingDiagnosticBag bag) 177stateField = F.StateMachineField(F.SpecialType(SpecialType.System_Int32), GeneratedNames.MakeStateMachineStateFieldName()); 182instanceIdField = F.StateMachineField(F.SpecialType(SpecialType.System_UInt64), GeneratedNames.MakeStateMachineStateIdFieldName()); 218var IEnumeratorOfElementType = F.SpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(ImmutableArray.Create(_elementType)); 258var IEnumerableOfElementType = F.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_elementType.Type);
Lowering\IteratorRewriter\IteratorStateMachine.cs (6)
34interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(ElementType.Type)); 35interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_IEnumerable)); 38interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(ElementType.Type)); 39interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_IDisposable)); 40interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_IEnumerator)); 61internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (44)
118Debug.Assert(node.Type.SpecialType == SpecialType.System_String, "Non-string binary addition should have been handled by VisitConversion or VisitArguments"); 600return arrLength.Update(arrLength.Expression, _factory.SpecialType(SpecialType.System_UIntPtr)); 654var boolean = _compilation.GetSpecialType(SpecialType.System_Boolean); 831TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 927return MakeLiteral(syntax, ConstantValue.Create(value), _compilation.GetSpecialType(SpecialType.System_Boolean)); 1016TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1243TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1476TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1661TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1853TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1961Debug.Assert(returnType.SpecialType == SpecialType.System_Boolean); 2051BoundExpression result = method.ReturnType.SpecialType == SpecialType.System_Delegate ? 2059Debug.Assert(loweredLeft.Type is { SpecialType: SpecialType.System_Decimal }); 2060Debug.Assert(loweredRight.Type is { SpecialType: SpecialType.System_Decimal }); 2102TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2116TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 2158Debug.Assert(rightType.SpecialType == SpecialType.System_Int32); 2225Debug.Assert(leftType.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr); 2230Debug.Assert(rightType.SpecialType == SpecialType.System_Int32); 2324Debug.Assert(sizeOfExpression.Type is { SpecialType: SpecialType.System_Int32 }); 2335var numericSpecialType = numericOperand.Type.SpecialType; 2348SpecialType destinationType = numericSpecialType; 2351case SpecialType.System_Int32: 2362destinationType = SpecialType.System_IntPtr; 2366case SpecialType.System_UInt32: 2373destinationType = SpecialType.System_UIntPtr; 2377case SpecialType.System_Int64: 2378destinationType = SpecialType.System_IntPtr; 2380case SpecialType.System_UInt64: 2381destinationType = SpecialType.System_UIntPtr; 2398case SpecialType.System_Int32: 2400TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2412case SpecialType.System_UInt32: 2414TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2415TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2425case SpecialType.System_Int64: 2427TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2428TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2437case SpecialType.System_UInt64: 2439TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64); 2440TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr); 2473Debug.Assert(returnType.SpecialType == SpecialType.System_Int64); 2485_factory.SpecialType(SpecialType.System_IntPtr),
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
1610_compilation.GetSpecialType(SpecialType.System_Int32))),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (7)
202Debug.Assert(targetEnumerableType.OriginalDefinition == (object)_compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)); 212var iCollectionOfTType = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T); 619SpecialType.System_Collections_Generic_IEnumerable_T or 620SpecialType.System_Collections_Generic_IReadOnlyCollection_T or 621SpecialType.System_Collections_Generic_IReadOnlyList_T); 721var intType = _factory.SpecialType(SpecialType.System_Int32); 910_compilation.GetSpecialType(SpecialType.System_Int32))),
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
207Debug.Assert(node.Operator.ReturnType is { SpecialType: SpecialType.System_String });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (116)
97Debug.Assert(byteType.SpecialType == SpecialType.System_Byte); 143Debug.Assert(byteArray.ElementType.SpecialType == SpecialType.System_Byte); 226if (type.SpecialType != SpecialType.System_Double && type.SpecialType != SpecialType.System_Single) 439if (rewrittenType.SpecialType == SpecialType.System_Decimal || rewrittenOperand.Type.SpecialType == SpecialType.System_Decimal) 502if (rewrittenType.SpecialType == SpecialType.System_Decimal) 509else if (rewrittenOperand.Type.SpecialType == SpecialType.System_Decimal) 609createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32), _diagnostics.DiagnosticBag); 614createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32), _diagnostics.DiagnosticBag); 777SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 780bool IsInRange(SpecialType type, SpecialType low, SpecialType high) => 783SpecialType sourceST = GetUnderlyingSpecialType(source); 784SpecialType targetST = GetUnderlyingSpecialType(target); 789IsInRange(sourceST, SpecialType.System_Char, SpecialType.System_Double) && 790IsInRange(targetST, SpecialType.System_Char, SpecialType.System_UInt64); 840rewrittenOperand.Type.SpecialType != SpecialType.System_Decimal && 841rewrittenOperand.Type.SpecialType != SpecialType.System_DateTime) 1174if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1657SpecialType t0Type = t0.IsEnumType() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType; 1658SpecialType s0Type = s0.IsEnumType() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType; 1660if (t0Type == SpecialType.System_IntPtr) 1669case SpecialType.System_Byte: 1670case SpecialType.System_SByte: 1671case SpecialType.System_Int16: 1672case SpecialType.System_UInt16: 1673case SpecialType.System_Char: 1674case SpecialType.System_Int32: 1676case SpecialType.System_UInt32: 1677case SpecialType.System_UInt64: 1678case SpecialType.System_Int64: 1679case SpecialType.System_Single: 1680case SpecialType.System_Double: 1681case SpecialType.System_Decimal: 1685else if (t0Type == SpecialType.System_UIntPtr) 1694case SpecialType.System_Byte: 1695case SpecialType.System_UInt16: 1696case SpecialType.System_Char: 1697case SpecialType.System_UInt32: 1699case SpecialType.System_SByte: 1700case SpecialType.System_Int16: 1701case SpecialType.System_Int32: 1702case SpecialType.System_UInt64: 1703case SpecialType.System_Int64: 1704case SpecialType.System_Single: 1705case SpecialType.System_Double: 1706case SpecialType.System_Decimal: 1710else if (s0Type == SpecialType.System_IntPtr) 1719case SpecialType.System_Byte: 1720case SpecialType.System_SByte: 1721case SpecialType.System_Int16: 1722case SpecialType.System_UInt16: 1723case SpecialType.System_Char: 1724case SpecialType.System_UInt32: 1725case SpecialType.System_Int32: 1727case SpecialType.System_UInt64: 1728case SpecialType.System_Int64: 1729case SpecialType.System_Single: 1730case SpecialType.System_Double: 1731case SpecialType.System_Decimal: 1735else if (s0Type == SpecialType.System_UIntPtr) 1744case SpecialType.System_SByte: 1745case SpecialType.System_Int16: 1746case SpecialType.System_Int32: 1747case SpecialType.System_Byte: 1748case SpecialType.System_UInt16: 1749case SpecialType.System_Char: 1750case SpecialType.System_UInt32: 1752case SpecialType.System_UInt64: 1753case SpecialType.System_Int64: 1754case SpecialType.System_Single: 1755case SpecialType.System_Double: 1756case SpecialType.System_Decimal: 1767if (typeFrom.SpecialType == SpecialType.System_Decimal) 1772case SpecialType.System_Char: return SpecialMember.System_Decimal__op_Explicit_ToChar; 1773case SpecialType.System_SByte: return SpecialMember.System_Decimal__op_Explicit_ToSByte; 1774case SpecialType.System_Byte: return SpecialMember.System_Decimal__op_Explicit_ToByte; 1775case SpecialType.System_Int16: return SpecialMember.System_Decimal__op_Explicit_ToInt16; 1776case SpecialType.System_UInt16: return SpecialMember.System_Decimal__op_Explicit_ToUInt16; 1777case SpecialType.System_Int32: return SpecialMember.System_Decimal__op_Explicit_ToInt32; 1778case SpecialType.System_UInt32: return SpecialMember.System_Decimal__op_Explicit_ToUInt32; 1779case SpecialType.System_Int64: return SpecialMember.System_Decimal__op_Explicit_ToInt64; 1780case SpecialType.System_UInt64: return SpecialMember.System_Decimal__op_Explicit_ToUInt64; 1781case SpecialType.System_Single: return SpecialMember.System_Decimal__op_Explicit_ToSingle; 1782case SpecialType.System_Double: return SpecialMember.System_Decimal__op_Explicit_ToDouble; 1792case SpecialType.System_Char: return SpecialMember.System_Decimal__op_Implicit_FromChar; 1793case SpecialType.System_SByte: return SpecialMember.System_Decimal__op_Implicit_FromSByte; 1794case SpecialType.System_Byte: return SpecialMember.System_Decimal__op_Implicit_FromByte; 1795case SpecialType.System_Int16: return SpecialMember.System_Decimal__op_Implicit_FromInt16; 1796case SpecialType.System_UInt16: return SpecialMember.System_Decimal__op_Implicit_FromUInt16; 1797case SpecialType.System_Int32: return SpecialMember.System_Decimal__op_Implicit_FromInt32; 1798case SpecialType.System_UInt32: return SpecialMember.System_Decimal__op_Implicit_FromUInt32; 1799case SpecialType.System_Int64: return SpecialMember.System_Decimal__op_Implicit_FromInt64; 1800case SpecialType.System_UInt64: return SpecialMember.System_Decimal__op_Implicit_FromUInt64; 1801case SpecialType.System_Single: return SpecialMember.System_Decimal__op_Explicit_FromSingle; 1802case SpecialType.System_Double: return SpecialMember.System_Decimal__op_Explicit_FromDouble; 1811Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal); 1813if (fromType.SpecialType == SpecialType.System_Decimal) 1817case SpecialType.System_IntPtr: 1818case SpecialType.System_UIntPtr: 1819operand = RewriteDecimalConversionCore(syntax, operand, fromType, get64BitType(_compilation, signed: toType.SpecialType == SpecialType.System_IntPtr), isImplicit, constantValueOpt); 1827case SpecialType.System_IntPtr: 1828case SpecialType.System_UIntPtr: 1829operand = MakeConversionNode(operand, get64BitType(_compilation, signed: fromType.SpecialType == SpecialType.System_IntPtr), @checked); 1837static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 1927if (fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal) 1942if (fromType.SpecialType == SpecialType.System_Decimal) 1955else if (toType.SpecialType == SpecialType.System_Decimal)
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
317Debug.Assert(parameters1Type.SpecialType == SpecialType.System_Delegate);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (3)
209else if (fixedCollectionInitializer.Expression.Type is { SpecialType: SpecialType.System_String }) 551BoundExpression lengthCheck = factory.Binary(BinaryOperatorKind.IntNotEqual, factory.SpecialType(SpecialType.System_Boolean), lengthCall, factory.Literal(0)); 554BoundExpression condition = factory.Binary(BinaryOperatorKind.LogicalBoolAnd, factory.SpecialType(SpecialType.System_Boolean), notNullCheck, lengthCheck);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (13)
81if (origDefinition.SpecialType == SpecialType.System_String) 403Debug.Assert(enumeratorType.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T); 412var objectType = _factory.SpecialType(SpecialType.System_Object); 469type: _compilation.GetSpecialType(SpecialType.System_Boolean)), 611TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 612TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 645MakeLiteral(forEachSyntax, ConstantValue.Default(SpecialType.System_Int32), intType)); 772NamedTypeSymbol intType = rewriter._factory.SpecialType(SpecialType.System_Int32); 912TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 913TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 934MakeLiteral(forEachSyntax, ConstantValue.Default(SpecialType.System_Int32), intType)); 1062TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 1063TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_Index.cs (1)
17NamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (13)
262if (node.Argument.Type.SpecialType == SpecialType.System_Int32) 338rangeSizeExpr.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: >= 0 and int rangeSizeConst } && 366return expr.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: 0 }; 406Debug.Assert(index.Type?.SpecialType == SpecialType.System_Int32); 410if (index.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex }) 666Debug.Assert(integerArgument.Type!.SpecialType == SpecialType.System_Int32); 762Debug.Assert(loweredExpr.Type!.SpecialType == SpecialType.System_Int32); 773Debug.Assert(loweredExpr.Type!.SpecialType == SpecialType.System_Int32); 818Debug.Assert(hatExpression.Operand is { Type: { SpecialType: SpecialType.System_Int32 } }); 822else if (unloweredExpr is BoundConversion { Operand: { Type: { SpecialType: SpecialType.System_Int32 } } operand }) 831arguments[0] is { Type.SpecialType: SpecialType.System_Int32, ConstantValueOpt.Value: int _ and >= 0 } index && 832arguments[1] is { Type.SpecialType: SpecialType.System_Boolean, ConstantValueOpt.Value: bool fromEnd }) 1180if (method is { Name: nameof(string.Substring), ContainingType.SpecialType: SpecialType.System_String }
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (2)
161Debug.Assert(node.Type is { SpecialType: SpecialType.System_Boolean }); 220Debug.Assert(test.Type.SpecialType == SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_Literal.cs (15)
30Debug.Assert(type is { SpecialType: SpecialType.System_Decimal }); 38Debug.Assert(type is { SpecialType: SpecialType.System_DateTime }); 73curMethod.ContainingType.SpecialType != SpecialType.System_Decimal) && 100arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((int)value), _compilation.GetSpecialType(SpecialType.System_Int32))); 106arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((uint)value), _compilation.GetSpecialType(SpecialType.System_UInt32))); 112arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((long)value), _compilation.GetSpecialType(SpecialType.System_Int64))); 118arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((ulong)value), _compilation.GetSpecialType(SpecialType.System_UInt64))); 124arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(low), _compilation.GetSpecialType(SpecialType.System_Int32))); 125arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(mid), _compilation.GetSpecialType(SpecialType.System_Int32))); 126arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(high), _compilation.GetSpecialType(SpecialType.System_Int32))); 127arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(isNegative), _compilation.GetSpecialType(SpecialType.System_Boolean))); 128arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(scale), _compilation.GetSpecialType(SpecialType.System_Byte))); 133Debug.Assert(ctor.ContainingType.SpecialType == SpecialType.System_Decimal); 148arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(constantValue.DateTimeValue.Ticks), _compilation.GetSpecialType(SpecialType.System_Int64))); 152Debug.Assert(ctor.ContainingType.SpecialType == SpecialType.System_DateTime);
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (3)
36argumentType = _compilation.GetSpecialType(SpecialType.System_Object); 88argumentType = _compilation.GetSpecialType(SpecialType.System_Object); 141TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
115if (whenNullOpt.IsDefaultValue() && whenNullOpt.Type.SpecialType != SpecialType.System_Decimal) 201if (method.IsStatic && method.ContainingType.SpecialType == SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_PointerElementAccess.cs (4)
50case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 56case SpecialType.System_Int64: 59case SpecialType.System_UInt64:
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
143TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (2)
109TypeSymbol uintType = _factory.SpecialType(SpecialType.System_UInt32); 110TypeSymbol uintPtrType = _factory.SpecialType(SpecialType.System_UIntPtr);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (16)
75Debug.Assert(visitedArguments.All(arg => arg.Type!.SpecialType is SpecialType.System_String or SpecialType.System_Char or SpecialType.System_Object)); 112case SpecialType.System_String: 115case SpecialType.System_Char: 153bool needsImplicitConversionFromStringToSpan = visitedArguments.Any(arg => arg.Type is { SpecialType: SpecialType.System_String }); 154var charType = _compilation.GetSpecialType(SpecialType.System_Char); 190var array = _factory.ArrayOrEmpty(_factory.SpecialType(SpecialType.System_String), finalArguments); 289if (argument is BoundConversion { ConversionKind: ConversionKind.Boxing, Type.SpecialType: SpecialType.System_Object, Operand: { Type.SpecialType: SpecialType.System_Char } operand }) 305else if (argument is BoundNullCoalescingOperator { LeftOperand: { Type.SpecialType: SpecialType.System_String } left, RightOperand: BoundLiteral { ConstantValueOpt: { IsString: true, RopeValue.IsEmpty: true } } }) 444if (call is { Arguments: [], ReceiverOpt.Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } charType, Method: { Name: "ToString" } method } 523if (arg.Type.SpecialType == SpecialType.System_Char) 552Debug.Assert(arg.HasAnyErrors || arg.Type.SpecialType == SpecialType.System_String); 641if (cv.SpecialType == SpecialType.System_Char) 754type: _compilation.GetSpecialType(SpecialType.System_String));
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (5)
58Debug.Assert(localType.SpecialType == SpecialType.System_Boolean); 75Debug.Assert(call.Type.SpecialType == SpecialType.System_Boolean == usesBoolReturns); 102var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 145Debug.Assert(node.Type is { SpecialType: SpecialType.System_String }); // if target-converted, we should not get here. 195Debug.Assert(result.Type.SpecialType == SpecialType.System_String || result.Type.IsErrorType());
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
126var objectType = _factory.SpecialType(SpecialType.System_Object);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
590Debug.Assert(boolOperator.ReturnType.SpecialType == SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (34)
85Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean 135var upconvertSpecialType = Binder.GetEnumPromotedType(underlyingType.SpecialType); 804type = _compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type); 903Debug.Assert(constantOne.SpecialType != SpecialType.None); 904Debug.Assert(binaryOperandType.SpecialType != SpecialType.None); 934Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 }); 948if (unaryOperandType.SpecialType == SpecialType.System_Decimal) 952else if (unaryOperandType.IsNullableType() && unaryOperandType.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal) 987Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal }); 994Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal); 1070SpecialType specialType; 1075specialType = SpecialType.System_Int32; 1078specialType = SpecialType.System_SByte; 1081specialType = SpecialType.System_Int16; 1084specialType = SpecialType.System_Byte; 1087specialType = SpecialType.System_UInt16; 1090specialType = SpecialType.System_Char; 1093specialType = SpecialType.System_UInt32; 1096specialType = SpecialType.System_Int64; 1099specialType = SpecialType.System_UInt64; 1102specialType = SpecialType.System_IntPtr; 1105specialType = SpecialType.System_UIntPtr; 1108specialType = SpecialType.System_Single; 1111specialType = SpecialType.System_Double; 1114specialType = SpecialType.System_Decimal; 1127type = _compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type); 1194case SpecialType.System_SByte: 1195case SpecialType.System_Int16: 1196case SpecialType.System_Int32: 1199case SpecialType.System_Byte: 1200case SpecialType.System_UInt16: 1201case SpecialType.System_UInt32: 1204case SpecialType.System_Int64: 1207case SpecialType.System_UInt64:
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
163_compilation.GetSpecialType(SpecialType.System_IDisposable) : 239_compilation.GetSpecialType(SpecialType.System_IDisposable) :
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (15)
538if (t1.Input.Type.SpecialType is SpecialType.System_Double or SpecialType.System_Single) 752bool isStringInput = input.Type.SpecialType == SpecialType.System_String; 790case SpecialType.System_IntPtr: 792NamedTypeSymbol int64Type = _factory.SpecialType(SpecialType.System_Int64); 800case SpecialType.System_UIntPtr: 802NamedTypeSymbol uint64Type = _factory.SpecialType(SpecialType.System_UInt64); 823SpecialType.System_Single => BinaryOperatorKind.FloatLessThanOrEqual, 824SpecialType.System_Double => BinaryOperatorKind.DoubleLessThanOrEqual, 825SpecialType.System_Decimal => BinaryOperatorKind.DecimalLessThanOrEqual, 956TypeSymbol returnType = _factory.SpecialType(SpecialType.System_UInt32); 959StringPatternInput.String => _factory.SpecialType(SpecialType.System_String), 961.Construct(_factory.SpecialType(SpecialType.System_Char)), 963.Construct(_factory.SpecialType(SpecialType.System_Char)), 1074_whenNodeIdentifierLocal ??= _factory.SynthesizedLocal(_factory.SpecialType(SpecialType.System_Int32));
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (16)
196Debug.Assert(method.ReturnType.SpecialType == SpecialType.System_Boolean); 219inputType = _factory.SpecialType(SpecialType.System_Object); 262Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 402TypeSymbol objectType = _factory.SpecialType(SpecialType.System_Object); 403var operandType = new PointerTypeSymbol(TypeWithAnnotations.Create(_factory.SpecialType(SpecialType.System_Void))); 409_factory.SpecialType(SpecialType.System_Boolean), 432if (input.Type.SpecialType == SpecialType.System_Double && double.IsNaN(value.DoubleValue) || 433input.Type.SpecialType == SpecialType.System_Single && float.IsNaN(value.SingleValue)) 441if (operatorKind.OperandTypes() == BinaryOperatorKind.Int && comparisonType.SpecialType != SpecialType.System_Int32) 446SpecialType.System_Byte => true, 447SpecialType.System_SByte => true, 448SpecialType.System_Int16 => true, 449SpecialType.System_UInt16 => true, 452comparisonType = _factory.SpecialType(SpecialType.System_Int32); 463return this._localRewriter.MakeBinaryOperator(_factory.Syntax, operatorKind, input, literal, _factory.SpecialType(SpecialType.System_Boolean), method: null, constrainedToTypeOpt: null); 474.Construct(_factory.SpecialType(SpecialType.System_Char));
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (4)
217resultType = _factory.SpecialType(SpecialType.System_Void); 310resultType = _factory.SpecialType(SpecialType.System_Void); 504var resultType = _factory.SpecialType(SpecialType.System_Boolean); 899var systemObjectType = _factory.SpecialType(SpecialType.System_Object);
Lowering\SpillSequenceSpiller.cs (1)
1231Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
129this.cachedState = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32), syntax: F.Syntax, kind: SynthesizedLocalKind.StateMachineCachedState);
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (1)
92f.SpecialType(SpecialType.System_Boolean),
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
109initialThreadIdField = F.StateMachineField(F.SpecialType(SpecialType.System_Int32), GeneratedNames.MakeIteratorCurrentThreadIdFieldName());
Lowering\SyntheticBoundNodeFactory.cs (41)
301public NamedTypeSymbol SpecialType(SpecialType st) 664return new BoundIsOperator(this.Syntax, operand, Type(type), c.Kind, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 669Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 670Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 671return Binary(BinaryOperatorKind.LogicalBoolAnd, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 676Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 677Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 678return Binary(BinaryOperatorKind.LogicalBoolOr, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 683return Binary(BinaryOperatorKind.IntEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 688return Binary(BinaryOperatorKind.ObjectEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 693var objectType = SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 714var objectType = SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 735return Binary(BinaryOperatorKind.ObjectNotEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 740return Binary(BinaryOperatorKind.IntNotEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 745return Binary(BinaryOperatorKind.IntLessThan, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 750return Binary(BinaryOperatorKind.IntGreaterThanOrEqual, SpecialType(CodeAnalysis.SpecialType.System_Boolean), left, right); 755return Binary(BinaryOperatorKind.IntSubtraction, SpecialType(CodeAnalysis.SpecialType.System_Int32), left, right); 760return Binary(BinaryOperatorKind.IntMultiplication, SpecialType(CodeAnalysis.SpecialType.System_Int32), left, right); 765return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Byte)) { WasCompilerGenerated = true }; 770return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 778return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_UInt32)) { WasCompilerGenerated = true }; 829case { SpecialType: CodeAnalysis.SpecialType.System_Double }: 832case { SpecialType: CodeAnalysis.SpecialType.System_Single }: 1125Debug.Assert(ex.Type is { SpecialType: CodeAnalysis.SpecialType.System_Int32 }); 1187return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 1199return new BoundLiteral(Syntax, stringConst, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_String)) { WasCompilerGenerated = true }; 1210return new BoundLiteral(Syntax, charConst, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Char)) { WasCompilerGenerated = true }; 1221return new BoundArrayLength(Syntax, array, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)); 1352return new BoundSizeOfOperator(Syntax, Type(type), Binder.GetConstantSizeOf(type), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 1378SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1388SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1398SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1406SpecialType(Microsoft.CodeAnalysis.SpecialType.System_UInt64)) 1421return new BoundModuleVersionIdString(Syntax, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_String)) { WasCompilerGenerated = true }; 1430=> new BoundThrowIfModuleCancellationRequested(Syntax, SpecialType(CodeAnalysis.SpecialType.System_Void)) { WasCompilerGenerated = true }; 1439SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1451SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1662Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } }); 1795TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1809TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1862Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
Operations\CSharpOperationFactory.cs (2)
1984: compilation.GetSpecialType(SpecialType.System_IDisposable); 2163TypeWithAnnotations.Create(((CSharpCompilation)_semanticModel.Compilation).GetSpecialType(SpecialType.System_Boolean)),
Parser\Lexer.cs (29)
102internal SpecialType ValueKind; 349case SpecialType.System_Int32: 352case SpecialType.System_UInt32: 355case SpecialType.System_Int64: 358case SpecialType.System_UInt64: 361case SpecialType.System_Single: 364case SpecialType.System_Double: 367case SpecialType.System_Decimal: 853info.ValueKind = SpecialType.None; 968info.ValueKind = SpecialType.System_Single; 973info.ValueKind = SpecialType.System_Double; 978info.ValueKind = SpecialType.System_Decimal; 982info.ValueKind = SpecialType.System_Double; 988info.ValueKind = SpecialType.System_Single; 993info.ValueKind = SpecialType.System_Double; 998info.ValueKind = SpecialType.System_Decimal; 1042case SpecialType.System_Single: 1045case SpecialType.System_Double: 1048case SpecialType.System_Decimal: 1074info.ValueKind = SpecialType.System_Int32; 1079info.ValueKind = SpecialType.System_UInt32; 1087info.ValueKind = SpecialType.System_Int64; 1092info.ValueKind = SpecialType.System_UInt64; 1104info.ValueKind = SpecialType.System_UInt32; 1109info.ValueKind = SpecialType.System_UInt64; 1119info.ValueKind = SpecialType.System_Int64; 1124info.ValueKind = SpecialType.System_UInt64; 1136info.ValueKind = SpecialType.System_UInt64; 2659info.ValueKind = SpecialType.System_Int32;
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (5)
34protected override void AddExplicitlyCastedLiteralValue(INamedTypeSymbol namedType, SpecialType type, object value) 42protected override void AddLiteralValue(SpecialType type, object value) 51case SpecialType.System_Boolean: 55case SpecialType.System_String: 56case SpecialType.System_Char:
SymbolDisplay\SymbolDisplayVisitor.Types.cs (18)
684case SpecialType.System_Void: 686case SpecialType.System_SByte: 688case SpecialType.System_Int16: 690case SpecialType.System_Int32: 692case SpecialType.System_Int64: 694case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 696case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 698case SpecialType.System_Byte: 700case SpecialType.System_UInt16: 702case SpecialType.System_UInt32: 704case SpecialType.System_UInt64: 706case SpecialType.System_Single: 708case SpecialType.System_Double: 710case SpecialType.System_Decimal: 712case SpecialType.System_Char: 714case SpecialType.System_Boolean: 716case SpecialType.System_String: 718case SpecialType.System_Object:
Symbols\AbstractTypeMap.cs (1)
396dynamicEraser = new DynamicTypeEraser(owner.ContainingAssembly.CorLibrary.GetSpecialType(SpecialType.System_Object));
Symbols\AnonymousTypes\AnonymousTypeManager.SymbolCollection.cs (7)
114get { return Compilation.GetSpecialType(SpecialType.System_Object); } 119get { return Compilation.GetSpecialType(SpecialType.System_Void); } 124get { return Compilation.GetSpecialType(SpecialType.System_Boolean); } 129get { return Compilation.GetSpecialType(SpecialType.System_String); } 134get { return Compilation.GetSpecialType(SpecialType.System_Int32); } 139get { return Compilation.GetSpecialType(SpecialType.System_IntPtr); } 144get { return Compilation.GetSpecialType(SpecialType.System_MulticastDelegate); }
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
172Compilation.GetSpecialType(SpecialType.System_IntPtr), 173returnsVoid ? Compilation.GetSpecialType(SpecialType.System_Void) : null,
Symbols\ArrayTypeSymbol.cs (4)
73return CreateMDArray(elementType, rank, sizes, lowerBounds, declaringAssembly.GetSpecialType(SpecialType.System_Array)); 95return CreateSZArray(elementType, declaringAssembly.GetSpecialType(SpecialType.System_Array), GetSZArrayInterfaces(elementType, declaringAssembly)); 113var iListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IList_T); 119var iReadOnlyListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T);
Symbols\AssemblySymbol.cs (4)
527Debug.Assert(SpecialMembers.GetDescriptor(feature).DeclaringSpecialType == SpecialType.System_Runtime_CompilerServices_RuntimeFeature); 528return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class, IsStatic: true } && 551GetSpecialType(SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute) is { TypeKind: TypeKind.Class }; 652return GetSpecialType(SpecialType.System_Object);
Symbols\Attributes\AttributeData.cs (12)
261string? memberName = value.DecodeValue<string>(SpecialType.System_String); 273var memberName = member.DecodeValue<string>(SpecialType.System_String); 309var sense = arguments.Attribute.CommonConstructorArguments[0].DecodeValue<bool>(SpecialType.System_Boolean); 312var memberName = value.DecodeValue<string>(SpecialType.System_String); 324var memberName = member.DecodeValue<string>(SpecialType.System_String); 559if (property.TypeWithAnnotations.HasType && property.Type.SpecialType == SpecialType.System_String && 578ctorArgument.DecodeValue<ClassInterfaceType>(SpecialType.System_Enum) : 579(ClassInterfaceType)ctorArgument.DecodeValue<short>(SpecialType.System_Int16); 603ctorArgument.DecodeValue<ComInterfaceType>(SpecialType.System_Enum) : 604(ComInterfaceType)ctorArgument.DecodeValue<short>(SpecialType.System_Int16); 653if (member is PropertySymbol { Type: { SpecialType: SpecialType.System_String } }) 807return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_String, out string? value) ? value : null;
Symbols\Attributes\SourceAttributeData.cs (15)
283SpecialType specType = parameterType.SpecialType; 326if (specType != SpecialType.System_Boolean) 334if (specType != SpecialType.System_Char) 342if (specType != SpecialType.System_SByte) 350if (specType != SpecialType.System_Byte) 358if (specType != SpecialType.System_Int16) 366if (specType != SpecialType.System_UInt16) 374if (specType != SpecialType.System_Int32) 382if (specType != SpecialType.System_UInt32) 390if (specType != SpecialType.System_Int64) 398if (specType != SpecialType.System_UInt64) 406if (specType != SpecialType.System_Single) 414if (specType != SpecialType.System_Double) 422if (specType != SpecialType.System_String) 430if (specType != SpecialType.System_Object)
Symbols\Compilation_WellKnownMembers.cs (8)
468var systemByte = GetSpecialType(SpecialType.System_Byte); 471var systemUnit32 = GetSpecialType(SpecialType.System_UInt32); 487var ticks = new TypedConstant(GetSpecialType(SpecialType.System_Int64), TypedConstantKind.Primitive, value.Ticks); 828NamedTypeSymbol booleanType = GetSpecialType(SpecialType.System_Boolean); 842var stringType = GetSpecialType(SpecialType.System_String); 856var boolType = GetSpecialType(SpecialType.System_Boolean); 1093case SpecialType.System_IntPtr: 1094case SpecialType.System_UIntPtr:
Symbols\ConstantValueUtils.cs (1)
112typeSymbol.SpecialType != SpecialType.System_String)
Symbols\ConstraintsHelper.cs (15)
111switch (typeParameter.HasReferenceTypeConstraint ? SpecialType.None : (bounds?.EffectiveBaseClass.SpecialType ?? SpecialType.System_Object)) 113case SpecialType.System_Object: 114case SpecialType.System_ValueType: 115case SpecialType.System_Enum: 143NamedTypeSymbol effectiveBaseClass = corLibrary.GetSpecialType(typeParameter.HasValueTypeConstraint ? SpecialType.System_ValueType : SpecialType.System_Object); 258constraintEffectiveBase = corLibrary.GetSpecialType(SpecialType.System_ValueType); 264constraintEffectiveBase = corLibrary.GetSpecialType(SpecialType.System_Enum); 270constraintEffectiveBase = corLibrary.GetSpecialType(SpecialType.System_Array); 322Debug.Assert((effectiveBaseClass.SpecialType == SpecialType.System_Object) || (deducedBaseType.SpecialType != SpecialType.System_Object)); 326if ((constraintTypes.Length == 0) && (deducedBaseType.SpecialType == SpecialType.System_Object)) 328Debug.Assert(effectiveBaseClass.SpecialType == SpecialType.System_Object); 1655if (type.SpecialType == SpecialType.System_Object)
Symbols\DynamicTypeSymbol.cs (2)
193return (int)Microsoft.CodeAnalysis.SpecialType.System_Object; 211return (object?)other != null && other.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object;
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
62return (TypeWithAnnotations.Create(Binder.GetSpecialType(DeclaringCompilation, SpecialType.System_Void, GetFirstLocation(), diagnostics)),
Symbols\FieldSymbol.cs (1)
142get { return this.IsConst && (this.Type.SpecialType != SpecialType.System_Decimal); }
Symbols\MemberSignatureComparer.cs (2)
698if (constraintType.SpecialType == SpecialType.System_Object) 711if ((constraintType.SpecialType == SpecialType.System_ValueType) &&
Symbols\Metadata\PE\DynamicTypeDecoder.cs (3)
145PeekFlag() && (type.SpecialType != SpecialType.System_Object && !type.IsDynamic())) 155if (type.SpecialType == SpecialType.System_Object) 176: _containingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Metadata\PE\MetadataDecoder.cs (5)
177return new MissingMetadataTypeSymbol.TopLevel(new MissingModuleSymbolWithName(moduleSymbol.ContainingAssembly, moduleName), ref emittedName, SpecialType.None); 422SpecialType baseSpecialType = (candidate.BaseTypeNoUseSiteDiagnostics?.SpecialType ?? SpecialType.None); 423if (baseSpecialType == SpecialType.None || baseSpecialType != (baseType?.SpecialType ?? SpecialType.None))
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (3)
18if (containingType?.SpecialType == SpecialType.System_Runtime_CompilerServices_RuntimeFeature 114case SpecialType.System_IntPtr: 115case SpecialType.System_UIntPtr:
Symbols\Metadata\PE\PEFieldSymbol.cs (3)
351_packedFlags.SetIsVolatile(customModifiersArray.Any(static m => !m.IsOptional && ((CSharpCustomModifier)m).ModifierSymbol.SpecialType == SpecialType.System_Runtime_CompilerServices_IsVolatile)); 517if (this.Type.SpecialType == SpecialType.System_Decimal) 653return this.Type.SpecialType == SpecialType.System_Decimal &&
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1399(method.ContainingType.SpecialType == SpecialType.System_Object &&
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
375if (keepLookingForDeclaredCorTypes && type.SpecialType != SpecialType.None)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (39)
397_corTypeId = SpecialType.None; 2257SpecialType baseCorTypeId = @base.SpecialType; 2261case SpecialType.System_Enum: 2266case SpecialType.System_MulticastDelegate: 2271case SpecialType.System_ValueType: 2273if (this.SpecialType != SpecialType.System_Enum) 2494if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) 2501case SpecialType.System_Void: 2502case SpecialType.System_Boolean: 2503case SpecialType.System_Char: 2504case SpecialType.System_Byte: 2505case SpecialType.System_SByte: 2506case SpecialType.System_Int16: 2507case SpecialType.System_UInt16: 2508case SpecialType.System_Int32: 2509case SpecialType.System_UInt32: 2510case SpecialType.System_Int64: 2511case SpecialType.System_UInt64: 2512case SpecialType.System_Single: 2513case SpecialType.System_Double: 2514case SpecialType.System_Decimal: 2515case SpecialType.System_IntPtr: 2516case SpecialType.System_UIntPtr: 2517case SpecialType.System_DateTime: 2518case SpecialType.System_TypedReference: 2519case SpecialType.System_ArgIterator: 2520case SpecialType.System_RuntimeArgumentHandle: 2521case SpecialType.System_RuntimeFieldHandle: 2522case SpecialType.System_RuntimeMethodHandle: 2523case SpecialType.System_RuntimeTypeHandle: 2575var isOrdinaryEmbeddableStruct = (this.TypeKind == TypeKind.Struct) && (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) && this.ContainingAssembly.IsLinked; 2739else if (TypeKind == TypeKind.Class && SpecialType != SpecialType.System_Enum) 2742if (@base?.SpecialType == SpecialType.None && @base.ContainingAssembly?.IsMissing == true) 2748switch ((SpecialType)SpecialTypes.GetTypeFromMetadataName(emittedName)) 2750case SpecialType.System_Enum: 2751case SpecialType.System_MulticastDelegate: 2752case SpecialType.System_ValueType: 3217Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
274else if (typeSymbol.SpecialType == SpecialType.System_ValueType) 292if (typeSymbol.SpecialType == SpecialType.System_ValueType && ((_flags & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0)) 546Debug.Assert(type.HasType && type.SpecialType == SpecialType.System_Object); 721return this.ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Metadata\PE\SymbolFactory.cs (1)
29internal override TypeSymbol GetSpecialType(PEModuleSymbol moduleSymbol, SpecialType specialType)
Symbols\MetadataOrSourceAssemblySymbol.cs (3)
83Debug.Assert(typeId != SpecialType.None); 146SpecialType.System_IntPtr => 0, 147SpecialType.System_UIntPtr => 1,
Symbols\MethodSymbol.cs (4)
1298new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.RequiredMembersMarker), // message 1299new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)) // error 1304ImmutableArray.Create(new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RequiredMembers))) 1318[new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.ClosedClasses))]));
Symbols\MethodSymbolExtensions.cs (1)
61else if (method.ContainingType.SpecialType == SpecialType.System_Object)
Symbols\MissingMetadataTypeSymbol.cs (9)
149/// Either <see cref="SpecialType"/>, <see cref="InternalSpecialType"/>, <see cref="WellKnownType"/>, or -1 if not initialized. 196RoslynDebug.Assert(typeId == -1 || typeId == (int)SpecialType.None || arity == 0 || mangleName); 313return (typeId >= (int)WellKnownType.First) ? SpecialType.None : (ExtendedSpecialType)typeId; 323var errorInfo = this.TypeId != (int)SpecialType.None ? 335if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 337return (int)Microsoft.CodeAnalysis.SpecialType.System_Object; 347Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 377this.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object)
Symbols\NamedTypeSymbol.cs (6)
1090if (this.SpecialType == SpecialType.System_Object) 1092return (int)SpecialType.System_Object; 1112if (this.SpecialType == SpecialType.System_Object) 2484Type.SpecialType: SpecialType.System_Object 2669Type.SpecialType: SpecialType.System_Boolean 2858ReturnType.SpecialType: SpecialType.System_Boolean
Symbols\NativeIntegerTypeSymbol.cs (5)
35Debug.Assert(underlyingType.SpecialType == SpecialType.System_IntPtr || underlyingType.SpecialType == SpecialType.System_UIntPtr); 317private readonly SpecialType _specialType; 324Debug.Assert(_specialType == SpecialType.System_IntPtr || _specialType == SpecialType.System_UIntPtr);
Symbols\PublicModel\TypeSymbol.cs (1)
197SpecialType ITypeSymbol.SpecialType => UnderlyingTypeSymbol.SpecialType;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
212return result.SpecialType == SpecialType.None ? result : result.AsNativeInteger();
Symbols\Source\ExtensionGroupingInfo.cs (3)
743protected override ITypeReference? ObjectType => ExtensionMarkerTypes[0].UnderlyingExtensions[0].ContainingAssembly.GetSpecialType(SpecialType.System_Object).GetCciAdapter(); 809var defaultMemberNameConstant = new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, firstIndexer.MetadataName); 931protected override ITypeReference? ObjectType => UnderlyingExtensions[0].ContainingAssembly.GetSpecialType(SpecialType.System_Object).GetCciAdapter();
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (2)
195int offset = attribute.CommonConstructorArguments[0].DecodeValue<int>(SpecialType.System_Int32); 281if (this.Type.SpecialType == SpecialType.System_Decimal)
Symbols\Source\ImplicitNamedTypeSymbol.cs (2)
57=> IsScriptClass ? null : this.DeclaringCompilation.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 63diagnostics.ReportUseSite(this.DeclaringCompilation.GetSpecialType(SpecialType.System_Object), GetFirstLocation());
Symbols\Source\ParameterHelpers.cs (2)
991conversion.IsIdentity && parameterType.SpecialType == SpecialType.System_Object && defaultExpression.Type.IsDynamic()) 1006defaultExpression.Type.SpecialType == SpecialType.System_String ||
Symbols\Source\SourceAssemblySymbol.cs (20)
1831var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1894var obj = GetSpecialType(SpecialType.System_Object); 1971var int32Type = _compilation.GetSpecialType(SpecialType.System_Int32); 1991var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2025var stringType = _compilation.GetSpecialType(SpecialType.System_String); 2035var stringType = _compilation.GetSpecialType(SpecialType.System_String); 2568wrapNonExceptionThrows = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 2622int arg = attribute.GetConstructorArgument<int>(i, SpecialType.System_Int32); 2808case SpecialType.System_Boolean: 2810case SpecialType.System_Byte: 2811case SpecialType.System_Decimal: 2812case SpecialType.System_Double: 2813case SpecialType.System_Int16: 2814case SpecialType.System_Int32: 2815case SpecialType.System_Int64: 2816case SpecialType.System_SByte: 2817case SpecialType.System_Single: 2818case SpecialType.System_UInt16: 2819case SpecialType.System_UInt32: 2820case SpecialType.System_UInt64:
Symbols\Source\SourceComplexParameterSymbol.cs (9)
685if (constructorArguments[0].TryDecodeValue(SpecialType.System_String, out string? parameterName) 911return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_Boolean, out bool value) ? 1004SpecialType specialType = arg.Kind == TypedConstantKind.Enum ? 1097TypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 1125TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1158TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1199TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1377if (constant.TypeInternal is not { SpecialType: SpecialType.System_String }) 1383var name = constant.DecodeValue<string>(SpecialType.System_String);
Symbols\Source\SourceConstructorSymbolBase.cs (1)
59_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
Symbols\Source\SourceDelegateMethodSymbol.cs (7)
61var voidType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax)); 63var objectType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax)); 64var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax)); 81if (binder.Compilation.GetSpecialType(SpecialType.System_IAsyncResult).TypeKind != TypeKind.Error && 82binder.Compilation.GetSpecialType(SpecialType.System_AsyncCallback).TypeKind != TypeKind.Error && 86var iAsyncResultType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax)); 87var asyncCallbackType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax));
Symbols\Source\SourceDestructorSymbol.cs (1)
86_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
Symbols\Source\SourceEnumConstantSymbol.cs (1)
159var constantType = this.ContainingType.EnumUnderlyingType.SpecialType;
Symbols\Source\SourceEventAccessorSymbol.cs (2)
131TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void); 142TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void);
Symbols\Source\SourceFieldSymbol.cs (1)
89CSharpCustomModifier.CreateRequired(this.ContainingAssembly.GetSpecialType(SpecialType.System_Runtime_CompilerServices_IsVolatile)));
Symbols\Source\SourceFixedFieldSymbol.cs (3)
47var intType = compilation.GetSpecialType(SpecialType.System_Int32); 90TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression); 238=> ContainingAssembly.GetSpecialType(SpecialType.System_ValueType);
Symbols\Source\SourceMemberContainerSymbol.cs (10)
3126if (method.IsOverride && method.GetConstructedLeastOverriddenMethod(this, requireSameReturnType: false).ContainingType.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 5041Conversion c = compilation.Conversions.ClassifyImplicitConversionFromType(parameterType.Type, compilation.GetSpecialType(SpecialType.System_Object), ref useSiteInfo); 5187TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)), 5204if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 5235TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)), 5287returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)), 5342returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_String)), 5516TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Int32)), 5615TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)), 5635if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMemberFieldSymbol.cs (2)
123&& this.Type.SpecialType == SpecialType.System_Decimal) 164if (IsConst && Type.SpecialType == SpecialType.System_Decimal &&
Symbols\Source\SourceMethodSymbol.cs (1)
290ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.UserDefinedCompoundAssignmentOperators)))
Symbols\Source\SourceMethodSymbolWithAttributes.cs (14)
344string? name = attributeData.GetConstructorArgument<string>(0, SpecialType.System_String); 663attribute.CommonConstructorArguments[0].DecodeValue<bool>(SpecialType.System_Boolean) 771string name = attribute.GetConstructorArgument<string>(0, SpecialType.System_String); 864string? moduleName = attribute.GetConstructorArgument<string>(0, SpecialType.System_String); 906charSet = namedArg.Value.DecodeValue<CharSet>(SpecialType.System_Enum); 911setLastError = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 916exactSpelling = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 920preserveSig = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 925callingConvention = namedArg.Value.DecodeValue<CallingConvention>(SpecialType.System_Enum); 929bestFitMapping = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 933throwOnUnmappable = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 1011{ Type.SpecialType: SpecialType.System_String }, 1019Debug.Assert(arguments.Attribute.AttributeConstructor.Parameters is [{ Type.SpecialType: SpecialType.System_Int32 }, { Type.SpecialType: SpecialType.System_String }]);
Symbols\Source\SourceModuleSymbol.cs (4)
590CharSet charSet = attribute.GetConstructorArgument<CharSet>(0, SpecialType.System_Enum); 680var version = ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, 11)); 686var version = ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, (int)MemorySafetyRulesVersion)); 693new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, _assemblySymbol.InternalsAreVisible));
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (20)
528SpecialType baseSpecialType = baseType.SpecialType; 532if (this.SpecialType == SpecialType.System_Enum && baseSpecialType == SpecialType.System_ValueType || 533this.SpecialType == SpecialType.System_MulticastDelegate && baseSpecialType == SpecialType.System_Delegate) 537else if (baseSpecialType == SpecialType.System_Array && this.ContainingAssembly.CorLibrary == this.ContainingAssembly) 583if (this.IsStatic && localBase.SpecialType != SpecialType.System_Object) 677if (this.SpecialType == SpecialType.System_Object && ((object)localBase != null || localInterfaces.Count != 0)) 704private static bool IsRestrictedBaseType(SpecialType specialType) 708case SpecialType.System_Array: 709case SpecialType.System_Enum: 710case SpecialType.System_Delegate: 711case SpecialType.System_MulticastDelegate: 712case SpecialType.System_ValueType: 780declaredBase = compilation.GetSpecialType(SpecialType.System_Enum); 785Binder.GetSpecialType(compilation, SpecialType.System_Object, this.GetFirstLocationOrNone(), diagnostics); 798if (this.SpecialType == SpecialType.System_Object) 803declaredBase = compilation.GetSpecialType(SpecialType.System_Object); 808declaredBase = compilation.GetSpecialType(SpecialType.System_ValueType); 816declaredBase = compilation.GetSpecialType(SpecialType.System_MulticastDelegate);
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (2)
69type = compilation.GetSpecialType(SpecialType.System_Int32); 76NamedTypeSymbol defaultUnderlyingType = compilation.GetSpecialType(SpecialType.System_Int32);
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (2)
195if (namedType.SpecialType == SpecialType.System_Void) 499if (namedType.SpecialType == SpecialType.System_Void)
Symbols\Source\SourceNamedTypeSymbol.cs (15)
948string? name = attributeData.GetConstructorArgument<string>(0, SpecialType.System_String); 1022int length = attributeData.GetConstructorArgument<int>(0, SpecialType.System_Int32); 1042string? methodName = attributeData.GetConstructorArgument<string>(1, SpecialType.System_String); 1076Debug.Assert(this.SpecialType == SpecialType.System_Object || this.DeclaringCompilation.IsAttributeType(this)); 1209string? methodName = attribute.CommonConstructorArguments[1].DecodeValue<string>(SpecialType.System_String); 1221int length = attribute.CommonConstructorArguments[0].DecodeValue<int>(SpecialType.System_Int32); 1418string name = attribute.GetConstructorArgument<string>(0, SpecialType.System_String); 1661if ((object)baseType != null && baseType.SpecialType != SpecialType.System_Object) 1766new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.ByRefLikeMarker), // message 1767new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)), // error=true 1772ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RefStructs))), 1785var defaultMemberNameConstant = new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, defaultMemberName); 1914Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 2033(type.SpecialType == SpecialType.System_Int32 ||
Symbols\Source\SourceNamespaceSymbol.cs (1)
446if ((object)type != null && type.SpecialType != SpecialType.None)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
143if (returnType.SpecialType == SpecialType.System_TypedReference && 144(this.ContainingType.SpecialType == SpecialType.System_TypedReference || this.ContainingType.SpecialType == SpecialType.System_ArgIterator))
Symbols\Source\SourceParameterSymbolBase.cs (1)
89defaultValue.SpecialType == SpecialType.System_Decimal &&
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
415var type = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, this.GetSyntax()));
Symbols\Source\SourcePropertySymbolBase.cs (2)
1521string? indexerName = attributeData.CommonConstructorArguments[0].DecodeValue<string>(SpecialType.System_String); 1784string indexerName = attribute.CommonConstructorArguments[0].DecodeValue<string>(SpecialType.System_String);
Symbols\Source\SourceTypeParameterSymbol.cs (1)
347return this.ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
668if ((ContainingType.SpecialType == SpecialType.System_Nullable_T) 818if (this.ReturnType.SpecialType != SpecialType.System_Boolean) 953else if (this.GetParameterType(1).StrippedType().SpecialType != SpecialType.System_Int32)
Symbols\SpecialTypeExtensions.cs (29)
11public static bool CanBeConst(this SpecialType specialType) 15case SpecialType.System_Boolean: 16case SpecialType.System_Char: 17case SpecialType.System_SByte: 18case SpecialType.System_Int16: 19case SpecialType.System_Int32: 20case SpecialType.System_Int64: 21case SpecialType.System_Byte: 22case SpecialType.System_UInt16: 23case SpecialType.System_UInt32: 24case SpecialType.System_UInt64: 25case SpecialType.System_Single: 26case SpecialType.System_Double: 27case SpecialType.System_Decimal: 28case SpecialType.System_String: 35public static bool IsValidVolatileFieldType(this SpecialType specialType) 39case SpecialType.System_Byte: 40case SpecialType.System_SByte: 41case SpecialType.System_Int16: 42case SpecialType.System_UInt16: 43case SpecialType.System_Int32: 44case SpecialType.System_UInt32: 45case SpecialType.System_Char: 46case SpecialType.System_Single: 47case SpecialType.System_Boolean: 48case SpecialType.System_IntPtr: 49case SpecialType.System_UIntPtr: 56public static int FixedBufferElementSizeInBytes(this SpecialType specialType) 60return specialType == SpecialType.System_Decimal ? 0 : specialType.SizeInBytes();
Symbols\Symbol.cs (1)
1305modifierType.SpecialType == SpecialType.System_Runtime_CompilerServices_IsVolatile)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (5)
33_moveNextCalledField = new SynthesizedFieldSymbol(this, compilation.GetSpecialType(SpecialType.System_Boolean), "_moveNextCalled", isReadOnly: false); 35var iDisposable = compilation.GetSpecialType(SpecialType.System_IDisposable); 36var iEnumerator = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator); 37var iEnumeratorT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(typeArgs); 215internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (2)
61internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object); 63internal override NamedTypeSymbol GetEffectiveBaseClass(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (24)
58private static readonly SpecialType[] s_requiredSpecialTypes = new[] 60SpecialType.System_Collections_IEnumerable, 61SpecialType.System_Collections_Generic_IEnumerable_T, 62SpecialType.System_Collections_Generic_ICollection_T, 63SpecialType.System_Collections_Generic_IList_T, 66private static readonly SpecialType[] s_readOnlyInterfacesSpecialTypes = new[] 68SpecialType.System_Collections_Generic_IReadOnlyCollection_T, 69SpecialType.System_Collections_Generic_IReadOnlyList_T, 135compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyCollection_T) is not MissingMetadataTypeSymbol && 136compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T) is not MissingMetadataTypeSymbol; 138foreach (var type in s_requiredSpecialTypes) 149foreach (var type in s_readOnlyInterfacesSpecialTypes) 294var iEnumerable = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 297var iEnumerableT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(typeArgs); 298var iReadOnlyCollectionT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyCollection_T).Construct(typeArgs); 299var iReadOnlyListT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T).Construct(typeArgs); 300var iCollectionT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T).Construct(typeArgs); 301var iListT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IList_T).Construct(typeArgs); 636NamedTypeSymbol objectType = f.SpecialType(SpecialType.System_Object); 839&& compilation.GetSpecialType(SpecialType.System_IDisposable) is not MissingMetadataTypeSymbol 840&& compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator) is not MissingMetadataTypeSymbol 841&& compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T) is not MissingMetadataTypeSymbol 935internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_Object); 993[new TypedConstant(DeclaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, debuggerDisplayString)]));
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (2)
29return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 66NamedTypeSymbol objectType = F.SpecialType(SpecialType.System_Object);
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
35return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Void, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (2)
46candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.IsStatic && 72BoundExpression recordEquals = F.LogicalAnd(F.ObjectNotEqual(left, F.Null(F.SpecialType(SpecialType.System_Object))),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
71return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (3)
37return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 94retExpr = F.ObjectNotEqual(other, F.Null(F.SpecialType(SpecialType.System_Object))); 108baseEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
34return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Int32, location, diagnostics)), 81if (overridden is null || overridden.ReturnType.SpecialType != SpecialType.System_Int32)
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (3)
33return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 36TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Object, location, diagnostics), annotation), 48if (_typedRecordEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (3)
94return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 158basePrintMethod.ReturnType.SpecialType != SpecialType.System_Boolean) 226var objectType = F.SpecialType(SpecialType.System_Object);
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
43return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, location, diagnostics), annotation),
Symbols\Synthesized\SynthesizedContainer.cs (2)
168internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(this.TypeKind == TypeKind.Struct ? SpecialType.System_ValueType : SpecialType.System_Object);
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (3)
33var systemObject = Binder.GetSpecialType(compilation, SpecialType.System_Object, DummySyntax(), diagnostics); 43var systemVoid = Binder.GetSpecialType(compilation, SpecialType.System_Void, DummySyntax(), diagnostics); 417ReturnType.SpecialType == SpecialType.System_Int32);
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
77compilation.CanEmitSpecialType(SpecialType.System_String))
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (1)
57delegateInvoke.ReturnType.SpecialType != SpecialType.System_Void ||
Symbols\Synthesized\SynthesizedInlineArrayAsSpanMethod.cs (1)
65return f.ExpressionStatement(new BoundParameter(f.Syntax, inlineArrayParameter, f.Compilation.GetSpecialType(SpecialType.System_Byte)) { WasCompilerGenerated = true });
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (4)
136internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_ValueType); 213arguments: ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, _arrayLength)), 266internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object); 268internal override NamedTypeSymbol GetEffectiveBaseClass(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
156get { return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void)); }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
274? compilation.GetSpecialType(SpecialType.System_Object)
Symbols\Synthesized\SynthesizedParameterSymbol.cs (3)
171compilation.CanEmitSpecialType(SpecialType.System_String)) 213SpecialType.System_Decimal => compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue), 214SpecialType.System_DateTime => compilation.SynthesizeDateTimeConstantAttribute(defaultValue.DateTimeValue),
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (4)
45_returnType = Binder.GetSpecialType(compilation, SpecialType.System_Void, NoLocation.Singleton, diagnostics); 49Construct(Binder.GetSpecialType(compilation, SpecialType.System_Int32, NoLocation.Singleton, diagnostics)); 52_returnType = Binder.GetSpecialType(compilation, SpecialType.System_Int32, NoLocation.Singleton, diagnostics); 59TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, NoLocation.Singleton, diagnostics)))), 0, RefKind.None, "args"));
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
139return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void));
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
24var submissionArrayType = compilation.CreateArrayTypeSymbol(compilation.GetSpecialType(SpecialType.System_Object));
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
33Debug.Assert(unmatchedValue.Type.SpecialType == SpecialType.System_Object);
Symbols\Synthesized\SynthesizedUnionValuePropertySymbol.cs (1)
75return (TypeWithAnnotations.Create(Binder.GetSpecialType(DeclaringCompilation, SpecialType.System_Object, TypeLocation, diagnostics), nullableAnnotation: NullableAnnotation.Annotated),
Symbols\TypedConstantExtensions.cs (4)
30if (constant.Kind == TypedConstantKind.Type || constant.TypeInternal!.SpecialType == SpecialType.System_Object) 54SpecialType splType = ((INamedTypeSymbol)constant.Type!).EnumUnderlyingType!.SpecialType; 69private static string DisplayUnsignedEnumConstant(TypedConstant constant, SpecialType specialType, ulong constantToDecode, string typeName) 148private static string DisplaySignedEnumConstant(TypedConstant constant, SpecialType specialType, long constantToDecode, string typeName)
Symbols\TypeParameterSymbol.cs (3)
422case SpecialType.System_Object: 423case SpecialType.System_ValueType: 424case SpecialType.System_Enum:
Symbols\TypeSymbol.cs (5)
503public SpecialType SpecialType => (SpecialType)ExtendedSpecialType; 561|| (SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && this.ContainingAssembly.RuntimeSupportsNumericIntPtr); 2530SpecialType ITypeSymbolInternal.SpecialType => this.SpecialType;
Symbols\TypeSymbolExtensions.cs (100)
108return type.SpecialType == SpecialType.System_Void; 142return type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 161&& nt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 214return type.SpecialType == SpecialType.System_Object; 219return type.SpecialType == SpecialType.System_String; 224return type.SpecialType == SpecialType.System_Char; 409SpecialType.System_Collections_Generic_IEnumerable_T or 410SpecialType.System_Collections_Generic_IReadOnlyCollection_T or 411SpecialType.System_Collections_Generic_IReadOnlyList_T, 427SpecialType.System_Collections_Generic_ICollection_T or 428SpecialType.System_Collections_Generic_IList_T, 566SpecialType st = t.SpecialType; 568if (st == SpecialType.System_Collections_Generic_IList_T || 569st == SpecialType.System_Collections_Generic_ICollection_T || 570st == SpecialType.System_Collections_Generic_IEnumerable_T || 571st == SpecialType.System_Collections_Generic_IReadOnlyList_T || 572st == SpecialType.System_Collections_Generic_IReadOnlyCollection_T) 687case SpecialType.System_SByte: 688case SpecialType.System_Byte: 689case SpecialType.System_Int16: 690case SpecialType.System_UInt16: 691case SpecialType.System_Int32: 692case SpecialType.System_UInt32: 693case SpecialType.System_Int64: 694case SpecialType.System_UInt64: 695case SpecialType.System_IntPtr when type.IsNativeIntegerType: 696case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 697case SpecialType.System_Char: 698case SpecialType.System_Boolean: 699case SpecialType.System_Single: 700case SpecialType.System_Double: 701case SpecialType.System_Decimal: 709public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type) 711return type is object ? type.SpecialType : SpecialType.None; 1430case SpecialType.System_SByte: 1431case SpecialType.System_Byte: 1432case SpecialType.System_Int16: 1433case SpecialType.System_UInt16: 1434case SpecialType.System_Int32: 1435case SpecialType.System_UInt32: 1436case SpecialType.System_Int64: 1437case SpecialType.System_UInt64: 1438case SpecialType.System_Char: 1439case SpecialType.System_String: 1442case SpecialType.System_Boolean: 1484&& arguments[0].SpecialType == SpecialType.System_Char; 1495&& arguments[0].SpecialType == SpecialType.System_Char; 1506&& arguments[0].SpecialType == SpecialType.System_Char; 1523case SpecialType.System_TypedReference: 1524case SpecialType.System_ArgIterator: 1525case SpecialType.System_RuntimeArgumentHandle: 1536case SpecialType.System_Boolean: 1537case SpecialType.System_Char: 1538case SpecialType.System_SByte: 1539case SpecialType.System_Int16: 1540case SpecialType.System_Int32: 1541case SpecialType.System_Int64: 1542case SpecialType.System_Byte: 1543case SpecialType.System_UInt16: 1544case SpecialType.System_UInt32: 1545case SpecialType.System_UInt64: 1546case SpecialType.System_IntPtr when type.IsNativeIntegerType: 1547case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 1548case SpecialType.System_Single: 1549case SpecialType.System_Double: 1552case SpecialType.System_Decimal: 1734if (type.SpecialType == SpecialType.System_Object) 2308case SpecialType.System_Object: return 0; 2309case SpecialType.System_String: return 1; 2310case SpecialType.System_Boolean: return 2; 2311case SpecialType.System_Char: return 3; 2312case SpecialType.System_SByte: return 4; 2313case SpecialType.System_Int16: return 5; 2314case SpecialType.System_Int32: return 6; 2315case SpecialType.System_Int64: return 7; 2316case SpecialType.System_Byte: return 8; 2317case SpecialType.System_UInt16: return 9; 2318case SpecialType.System_UInt32: return 10; 2319case SpecialType.System_UInt64: return 11; 2320case SpecialType.System_IntPtr when type.IsNativeIntegerType: return 12; 2321case SpecialType.System_UIntPtr when type.IsNativeIntegerType: return 13; 2322case SpecialType.System_Single: return 14; 2323case SpecialType.System_Double: return 15; 2324case SpecialType.System_Decimal: return 16; 2326case SpecialType.None: 2333case SpecialType.System_Boolean: return 17; 2334case SpecialType.System_Char: return 18; 2335case SpecialType.System_SByte: return 19; 2336case SpecialType.System_Int16: return 20; 2337case SpecialType.System_Int32: return 21; 2338case SpecialType.System_Int64: return 22; 2339case SpecialType.System_Byte: return 23; 2340case SpecialType.System_UInt16: return 24; 2341case SpecialType.System_UInt32: return 25; 2342case SpecialType.System_UInt64: return 26; 2343case SpecialType.System_IntPtr when underlyingType.IsNativeIntegerType: return 27; 2344case SpecialType.System_UIntPtr when underlyingType.IsNativeIntegerType: return 28; 2345case SpecialType.System_Single: return 29; 2346case SpecialType.System_Double: return 30; 2347case SpecialType.System_Decimal: return 31;
Symbols\TypeWithAnnotations.cs (9)
223=> Create(compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(typeSymbol))); 272public SpecialType SpecialType => _extensions.GetSpecialType(DefaultType); 865internal abstract SpecialType GetSpecialType(TypeSymbol typeSymbol); 897internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 970internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 1092internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) 1094var specialType = _underlying.SpecialType; 1095return specialType.IsValueType() ? SpecialType.None : specialType; 1203_compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(_underlying)) :
Syntax\SyntaxKindExtensions.cs (17)
11internal static SpecialType GetSpecialType(this SyntaxKind kind) 16return SpecialType.System_Void; 18return SpecialType.System_Boolean; 20return SpecialType.System_Byte; 22return SpecialType.System_SByte; 24return SpecialType.System_Int16; 26return SpecialType.System_UInt16; 28return SpecialType.System_Int32; 30return SpecialType.System_UInt32; 32return SpecialType.System_Int64; 34return SpecialType.System_UInt64; 36return SpecialType.System_Double; 38return SpecialType.System_Single; 40return SpecialType.System_Decimal; 42return SpecialType.System_String; 44return SpecialType.System_Char; 46return SpecialType.System_Object;
Utilities\TypeSymbolExtensions.cs (3)
220if (type.SpecialType == SpecialType.System_Object) 280return compilation.Assembly.GetSpecialType(SpecialType.System_Object); 284return compilation.Assembly.GetSpecialType(SpecialType.System_ValueType);
Utilities\ValueSetFactory.cs (17)
33public static IConstantValueSetFactory? ForSpecialType(SpecialType specialType, bool isNative = false) 37SpecialType.System_Byte => ForByte, 38SpecialType.System_SByte => ForSByte, 39SpecialType.System_Char => ForChar, 40SpecialType.System_Int16 => ForShort, 41SpecialType.System_UInt16 => ForUShort, 42SpecialType.System_Int32 => ForInt, 43SpecialType.System_UInt32 => ForUInt, 44SpecialType.System_Int64 => ForLong, 45SpecialType.System_UInt64 => ForULong, 46SpecialType.System_Boolean => ForBool, 47SpecialType.System_Single => ForFloat, 48SpecialType.System_Double => ForDouble, 49SpecialType.System_String => ForString, 50SpecialType.System_Decimal => ForDecimal, 51SpecialType.System_IntPtr when isNative => ForNint, 52SpecialType.System_UIntPtr when isNative => ForNuint,
Microsoft.CodeAnalysis.CSharp.CodeStyle (53)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
94if (containingType.BaseType?.SpecialType != SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
394if (methodReference.ContainingType.SpecialType is SpecialType.System_Object or SpecialType.System_ValueType)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
122if (lambdaTypeInfo.ConvertedType == null || lambdaTypeInfo.ConvertedType.SpecialType is SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
101var ienumerableType = convertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T 104i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
158if (firstParameter is { Type.SpecialType: SpecialType.System_Int32, Name: "capacity" })
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
185if (symbol is null || !symbol.IsUserDefinedOperator() || symbol.ContainingType.SpecialType == SpecialType.System_String) 202if (symbol is { Name: nameof(ReferenceEquals), ContainingType.SpecialType: SpecialType.System_Object })
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
83var arrayType = compilation.GetSpecialType(SpecialType.System_Array);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
74var stringType = compilation.GetSpecialType(SpecialType.System_String);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (5)
16=> method is { ContainingType.SpecialType: SpecialType.System_String, Name: nameof(string.Remove) }; 33p.Type.SpecialType == SpecialType.System_Int32) 78method.OriginalDefinition.Parameters[0].Type.SpecialType == SpecialType.System_Int32; 116=> parameter.Type.SpecialType == SpecialType.System_Int32 && 120=> parameter.Type.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
76if (semanticModel.GetTypeInfo(castExpression.Type).Type?.SpecialType == SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLabeledJumpStatements\CSharpUseLabeledJumpStatementsHelpers_FlagVariable.cs (1)
52if (semanticModel.GetDeclaredSymbol(declarator, cancellationToken) is not ILocalSymbol { Type.SpecialType: SpecialType.System_Boolean } flag)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
88if (castType?.SpecialType == SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
92Type.SpecialType: SpecialType.System_Object, 246=> value.UnwrapImplicitConversion() is IObjectCreationOperation { Type.SpecialType: SpecialType.System_Object };
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
77if (arrayCreationOperation.Type is not IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (13)
19case SpecialType.System_Boolean: 20case SpecialType.System_Char: 21case SpecialType.System_SByte: 22case SpecialType.System_Int16: 23case SpecialType.System_Int32: 24case SpecialType.System_Int64: 25case SpecialType.System_Byte: 26case SpecialType.System_UInt16: 27case SpecialType.System_UInt32: 28case SpecialType.System_UInt64: 29case SpecialType.System_Single: 30case SpecialType.System_Double: 33case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (18)
97while (current is IConversionOperation { Type.SpecialType: SpecialType.System_Delegate or SpecialType.System_MulticastDelegate }) 100if (current is IConversionOperation { Type.SpecialType: SpecialType.System_Object }) 585if (castNode.IsParentKind(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object) 690if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T && 691namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IReadOnlyCollection_T or SpecialType.System_Collections_Generic_IReadOnlyList_T) 697if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T && 698namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IList_T) 704if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T or SpecialType.System_Collections_Generic_IList_T && 769if (current.ContainingType.SpecialType == SpecialType.System_Object) 865=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr; 1083if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 1090else if (binaryOperation.RightOperand.Type?.SpecialType == SpecialType.System_Object && 1293=> type?.SpecialType is SpecialType.System_Double or SpecialType.System_Single; 1579rewrittenType.SpecialType == SpecialType.System_Enum;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (73)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 37methodSymbol.Parameters.First().Type.SpecialType == SpecialType.System_Object && 517else if (parameter.Type.SpecialType == SpecialType.System_Object) 1108var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (2)
87isEnumConstraint ? SpecialType.System_Enum : SpecialType.System_Delegate));
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
104if (previousReturnType.SpecialType is SpecialType.System_Void ||
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
53type: semanticModel.GetTypeInfo(((ConstantPatternSyntax)positionalPattern.Subpatterns[i].Pattern).Expression, cancellationToken).Type ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
96else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
66namedType.TypeArguments[0].SpecialType == SpecialType.System_Byte;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
23SpecialType underlyingSpecialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (6)
132var isNotSingle = !IsSpecialType(type, SpecialType.System_Single); 143if (value is double && !IsSpecialType(type, SpecialType.System_Double)) 148if (value is uint && !IsSpecialType(type, SpecialType.System_UInt32)) 153if (value is long && !IsSpecialType(type, SpecialType.System_Int64)) 158if (value is ulong && !IsSpecialType(type, SpecialType.System_UInt64)) 167var isNotDecimal = !IsSpecialType(type, SpecialType.System_Decimal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
250var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 321if (namedType is { TypeKind: TypeKind.Class, BaseType: not null, BaseType.SpecialType: not SpecialType.System_Object })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
112targetType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (1)
33if (typeInfo.Type != null && typeInfo.Type.SpecialType == SpecialType.System_Void)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
65if (type.SpecialType != SpecialType.System_Object)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
126syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 220if (symbol.SpecialType == SpecialType.System_Void)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\WithElementSyntaxExtensions.cs (1)
57static m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Int32, Name: "capacity" }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (12)
275case SpecialType.System_Boolean: 277case SpecialType.System_SByte: 278case SpecialType.System_Byte: 279case SpecialType.System_Int16: 280case SpecialType.System_UInt16: 281case SpecialType.System_Int32: 282case SpecialType.System_UInt32: 283case SpecialType.System_Int64: 284case SpecialType.System_UInt64: 285case SpecialType.System_Decimal: 286case SpecialType.System_Single: 287case SpecialType.System_Double:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (35)
589return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 848return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 972return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 982return CreateResult(SpecialType.System_Boolean); 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); 1070return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1077return CreateResult(SpecialType.System_Boolean); 1110return CreateResult(SpecialType.System_Boolean); 1133return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1147else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1154return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol); 1175return CreateResult(SpecialType.System_Boolean); 1209return CreateResult(SpecialType.System_Boolean); 1318return CreateResult(SpecialType.System_Void); 1335enumerableType ??= this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 1343var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1349: results.Concat(CreateResult(Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable))); 1361return CreateResult(SpecialType.System_Boolean); 1370return CreateResult(SpecialType.System_Boolean); 1679return CreateResult(SpecialType.System_Object); 1975return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1993return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2000return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2009return CreateResult(SpecialType.System_Boolean); 2056return types.Select(t => t.InferredType.SpecialType == SpecialType.System_Void ? new TypeInferenceInfo(task) : new TypeInferenceInfo(taskOfT.Construct(t.InferredType))); 2092return this.Compilation.GetSpecialType(SpecialType.System_Void); 2220return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2247return CreateResult(SpecialType.System_IDisposable); 2271return CreateResult(SpecialType.System_IDisposable); 2275return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2278if (laterUsageInference is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2307if (inferredDescendantTypes is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2452return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2461return CreateResult(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.Features (111)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
525ContainingType: not { SpecialType: SpecialType.System_Nullable_T }
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
199.FirstOrDefault(i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (3)
115if (type.SpecialType == SpecialType.System_Void) 164t => t.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T || 188originalDefinition.SpecialType == SpecialType.System_Nullable_T)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (1)
130if (namedTypeSymbol?.SpecialType == SpecialType.System_Object)
Completion\KeywordRecommenders\AbstractSpecialTypePreselectingKeywordRecommender.cs (1)
20protected abstract SpecialType SpecialType { get; }
Completion\KeywordRecommenders\BoolKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Boolean;
Completion\KeywordRecommenders\ByteKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Byte;
Completion\KeywordRecommenders\CharKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Char;
Completion\KeywordRecommenders\DecimalKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Decimal;
Completion\KeywordRecommenders\DoubleKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Double;
Completion\KeywordRecommenders\FloatKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Single;
Completion\KeywordRecommenders\IntKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Int32;
Completion\KeywordRecommenders\LongKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Int64;
Completion\KeywordRecommenders\ObjectKeywordRecommender.cs (2)
48protected override SpecialType SpecialType => SpecialType.System_Object;
Completion\KeywordRecommenders\SByteKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_SByte;
Completion\KeywordRecommenders\ShortKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Int16;
Completion\KeywordRecommenders\StringKeywordRecommender.cs (2)
16protected override SpecialType SpecialType => SpecialType.System_String;
Completion\KeywordRecommenders\UIntKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_UInt32;
Completion\KeywordRecommenders\ULongKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_UInt64;
Completion\KeywordRecommenders\UShortKeywordRecommender.cs (2)
57protected override SpecialType SpecialType => SpecialType.System_UInt16;
Completion\Providers\DefaultArgumentProvider.cs (13)
39SpecialType.System_Boolean => "false", 40SpecialType.System_Char => @"'\\0'", 41SpecialType.System_Byte => "(byte)0", 42SpecialType.System_SByte => "(sbyte)0", 43SpecialType.System_Int16 => "(short)0", 44SpecialType.System_UInt16 => "(ushort)0", 45SpecialType.System_Int32 => "0", 46SpecialType.System_UInt32 => "0U", 47SpecialType.System_Int64 => "0L", 48SpecialType.System_UInt64 => "0UL", 49SpecialType.System_Decimal => "0.0m", 50SpecialType.System_Single => "0.0f", 51SpecialType.System_Double => "0.0",
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (2)
70model.Compilation.GetSpecialType(SpecialType.System_Object); 90model.Compilation.GetSpecialType(SpecialType.System_Int32).GenerateTypeSyntax(),
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (5)
303methodSymbol.ReturnType?.SpecialType == SpecialType.System_Int32 && 368=> typeSymbol.SpecialType == SpecialType.System_Int32; 554if (returnTypeInfo.Type.OriginalDefinition?.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 560if (returnTypeInfo.ConvertedType.OriginalDefinition?.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 746if (methodSymbol.ReturnType.OriginalDefinition?.SpecialType != SpecialType.System_Collections_Generic_IEnumerable_T)
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (1)
32return info.Type == null || info.Type.SpecialType == SpecialType.System_Object
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (6)
179if (controlFlowValueType.SpecialType == SpecialType.System_Boolean) 215else if (controlFlowValueType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 255Contract.ThrowIfFalse(controlFlowValueType.SpecialType == SpecialType.System_Int32); 293return ReturnStatement(ReturnKeyword.WithoutTrailingTrivia(), this.AnalyzerResult.CoreReturnType.SpecialType == SpecialType.System_Void ? null : IdentifierName(ReturnValueName).WithLeadingTrivia(Space).WithoutTrailingTrivia(), SemicolonToken.WithoutLeadingTrivia()); 508if (this.AnalyzerResult.CoreReturnType.SpecialType == SpecialType.System_Void) 893var hasNonControlFlowReturnValue = variableInfos.Length > 0 || this.AnalyzerResult.CoreReturnType.SpecialType != SpecialType.System_Void;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
99return AnalyzerResult.CoreReturnType.SpecialType != SpecialType.System_Void
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
122if (info.Type?.SpecialType == SpecialType.System_String &&
ExtractMethod\Extensions.cs (1)
258=> type == null || type.SpecialType == SpecialType.System_Object;
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
142var isIntrinsic = tupleType.TupleElements.All(f => f.Type?.SpecialType != SpecialType.None);
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (1)
197if (symbol is not INamedTypeSymbol { SpecialType: SpecialType.System_Char })
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (4)
96SpecialType.System_Byte => IsUnsignedBoundary(startValue, endValue, byte.MaxValue), 97SpecialType.System_UInt16 => IsUnsignedBoundary(startValue, endValue, ushort.MaxValue), 98SpecialType.System_UInt32 => IsUnsignedBoundary(startValue, endValue, uint.MaxValue), 99SpecialType.System_UInt64 => IsUnsignedBoundary(startValue, endValue, ulong.MaxValue),
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (1)
63if (namedType.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T &&
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
69type: compilation.GetSpecialType(SpecialType.System_Int32).GenerateTypeSyntax(allowVar: false),
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
95: compilation.GetSpecialType(SpecialType.System_Int32).GenerateTypeSyntax();
Snippets\CSharpConsoleSnippetProvider.cs (1)
42if (lambdaSymbol is IMethodSymbol { ReturnType: { SpecialType: SpecialType.System_Void } or { TypeKind: TypeKind.Error } })
Snippets\CSharpIntMainSnippetProvider.cs (1)
31=> (TypeSyntax)generator.TypeExpression(SpecialType.System_Int32);
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
94if (containingType.BaseType?.SpecialType != SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
394if (methodReference.ContainingType.SpecialType is SpecialType.System_Object or SpecialType.System_ValueType)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
122if (lambdaTypeInfo.ConvertedType == null || lambdaTypeInfo.ConvertedType.SpecialType is SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
101var ienumerableType = convertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T 104i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
158if (firstParameter is { Type.SpecialType: SpecialType.System_Int32, Name: "capacity" })
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
185if (symbol is null || !symbol.IsUserDefinedOperator() || symbol.ContainingType.SpecialType == SpecialType.System_String) 202if (symbol is { Name: nameof(ReferenceEquals), ContainingType.SpecialType: SpecialType.System_Object })
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
83var arrayType = compilation.GetSpecialType(SpecialType.System_Array);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
74var stringType = compilation.GetSpecialType(SpecialType.System_String);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (5)
16=> method is { ContainingType.SpecialType: SpecialType.System_String, Name: nameof(string.Remove) }; 33p.Type.SpecialType == SpecialType.System_Int32) 78method.OriginalDefinition.Parameters[0].Type.SpecialType == SpecialType.System_Int32; 116=> parameter.Type.SpecialType == SpecialType.System_Int32 && 120=> parameter.Type.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
76if (semanticModel.GetTypeInfo(castExpression.Type).Type?.SpecialType == SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLabeledJumpStatements\CSharpUseLabeledJumpStatementsHelpers_FlagVariable.cs (1)
52if (semanticModel.GetDeclaredSymbol(declarator, cancellationToken) is not ILocalSymbol { Type.SpecialType: SpecialType.System_Boolean } flag)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
88if (castType?.SpecialType == SpecialType.System_Object)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
92Type.SpecialType: SpecialType.System_Object, 246=> value.UnwrapImplicitConversion() is IObjectCreationOperation { Type.SpecialType: SpecialType.System_Object };
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
77if (arrayCreationOperation.Type is not IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte })
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 37methodSymbol.Parameters.First().Type.SpecialType == SpecialType.System_Object && 517else if (parameter.Type.SpecialType == SpecialType.System_Object) 1108var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (2)
87isEnumConstraint ? SpecialType.System_Enum : SpecialType.System_Delegate));
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
104if (previousReturnType.SpecialType is SpecialType.System_Void ||
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
53type: semanticModel.GetTypeInfo(((ConstantPatternSyntax)positionalPattern.Subpatterns[i].Pattern).Expression, cancellationToken).Type ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
96else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
66namedType.TypeArguments[0].SpecialType == SpecialType.System_Byte;
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (5)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.Fixer.cs (1)
133else if (operation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Object
Microsoft.NetCore.Analyzers\Performance\CSharpUseSearchValues.Fixer.cs (1)
104bool isByte = elementType.SpecialType == SpecialType.System_Byte;
Microsoft.NetCore.Analyzers\Performance\CSharpUseStartsWithInsteadOfIndexOfComparisonWithZero.Fixer.cs (1)
47(TypeSyntax)generator.TypeExpression(SpecialType.System_Char),
Microsoft.NetCore.Analyzers\Runtime\CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs (1)
185syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint");
Microsoft.NetCore.Analyzers\Runtime\CSharpUseSpanBasedStringConcat.cs (1)
22operation.Type?.SpecialType == SpecialType.System_String;
Microsoft.CodeAnalysis.CSharp.Scripting (16)
Hosting\ObjectFormatter\CSharpTypeNameFormatter.cs (16)
27protected override string GetPrimitiveTypeName(SpecialType type) 31case SpecialType.System_Boolean: return "bool"; 32case SpecialType.System_Byte: return "byte"; 33case SpecialType.System_Char: return "char"; 34case SpecialType.System_Decimal: return "decimal"; 35case SpecialType.System_Double: return "double"; 36case SpecialType.System_Int16: return "short"; 37case SpecialType.System_Int32: return "int"; 38case SpecialType.System_Int64: return "long"; 39case SpecialType.System_SByte: return "sbyte"; 40case SpecialType.System_Single: return "float"; 41case SpecialType.System_String: return "string"; 42case SpecialType.System_UInt16: return "ushort"; 43case SpecialType.System_UInt32: return "uint"; 44case SpecialType.System_UInt64: return "ulong"; 45case SpecialType.System_Object: return "object";
Microsoft.CodeAnalysis.CSharp.Workspaces (248)
CodeGeneration\CSharpSyntaxGenerator.cs (17)
3507public override SyntaxNode TypeExpression(SpecialType specialType) 3510SpecialType.System_Boolean => BoolKeyword, 3511SpecialType.System_Byte => ByteKeyword, 3512SpecialType.System_Char => CharKeyword, 3513SpecialType.System_Decimal => DecimalKeyword, 3514SpecialType.System_Double => DoubleKeyword, 3515SpecialType.System_Int16 => ShortKeyword, 3516SpecialType.System_Int32 => IntKeyword, 3517SpecialType.System_Int64 => LongKeyword, 3518SpecialType.System_Object => ObjectKeyword, 3519SpecialType.System_SByte => SByteKeyword, 3520SpecialType.System_Single => FloatKeyword, 3521SpecialType.System_String => StringKeyword, 3522SpecialType.System_UInt16 => UShortKeyword, 3523SpecialType.System_UInt32 => UIntKeyword, 3524SpecialType.System_UInt64 => ULongKeyword, 3525SpecialType.System_Void => VoidKeyword,
Recommendations\CSharpRecommendationServiceRunner_Conversions.cs (109)
20private static readonly ImmutableArray<SpecialType> s_predefinedEnumConversionTargets = 22SpecialType.System_Byte, 23SpecialType.System_Char, 24SpecialType.System_Decimal, 25SpecialType.System_Double, 26SpecialType.System_Single, 27SpecialType.System_Int32, 28SpecialType.System_Int64, 29SpecialType.System_SByte, 30SpecialType.System_Int16, 31SpecialType.System_UInt32, 32SpecialType.System_UInt64, 33SpecialType.System_UInt16, 36private static readonly ImmutableArray<SpecialType> s_sbyteConversions = 38SpecialType.System_Byte, 39SpecialType.System_Char, 40SpecialType.System_UInt32, 41SpecialType.System_UInt64, 42SpecialType.System_UInt16, 45private static readonly ImmutableArray<SpecialType> s_byteConversions = [SpecialType.System_Char, SpecialType.System_SByte]; 47private static readonly ImmutableArray<SpecialType> s_int16Conversions = 49SpecialType.System_Byte, 50SpecialType.System_Char, 51SpecialType.System_UInt32, 52SpecialType.System_UInt64, 53SpecialType.System_UInt16, 54SpecialType.System_SByte, 57private static readonly ImmutableArray<SpecialType> s_uint16Conversions = [SpecialType.System_Byte, SpecialType.System_Char, SpecialType.System_SByte, SpecialType.System_Int16]; 59private static readonly ImmutableArray<SpecialType> s_int32Conversions = 61SpecialType.System_Byte, 62SpecialType.System_Char, 63SpecialType.System_SByte, 64SpecialType.System_Int16, 65SpecialType.System_UInt32, 66SpecialType.System_UInt16, 67SpecialType.System_UInt64, 70private static readonly ImmutableArray<SpecialType> s_uint32Conversions = 72SpecialType.System_Byte, 73SpecialType.System_Char, 74SpecialType.System_Int32, 75SpecialType.System_SByte, 76SpecialType.System_Int16, 77SpecialType.System_UInt16, 80private static readonly ImmutableArray<SpecialType> s_int64Conversions = 82SpecialType.System_Byte, 83SpecialType.System_Char, 84SpecialType.System_Int32, 85SpecialType.System_UInt32, 86SpecialType.System_UInt64, 87SpecialType.System_UInt16, 88SpecialType.System_SByte, 89SpecialType.System_Int16, 92private static readonly ImmutableArray<SpecialType> s_uint64Conversions = 94SpecialType.System_Byte, 95SpecialType.System_Char, 96SpecialType.System_Int32, 97SpecialType.System_Int64, 98SpecialType.System_UInt32, 99SpecialType.System_UInt16, 100SpecialType.System_SByte, 101SpecialType.System_Int16, 104private static readonly ImmutableArray<SpecialType> s_charConversions = [SpecialType.System_Byte, SpecialType.System_SByte, SpecialType.System_Int16]; 106private static readonly ImmutableArray<SpecialType> s_singleConversions = 108SpecialType.System_Byte, 109SpecialType.System_Char, 110SpecialType.System_Decimal, 111SpecialType.System_Int32, 112SpecialType.System_Int64, 113SpecialType.System_UInt32, 114SpecialType.System_UInt64, 115SpecialType.System_UInt16, 116SpecialType.System_SByte, 117SpecialType.System_Int16, 120private static readonly ImmutableArray<SpecialType> s_doubleConversions = 122SpecialType.System_Byte, 123SpecialType.System_Char, 124SpecialType.System_Decimal, 125SpecialType.System_Single, 126SpecialType.System_Int32, 127SpecialType.System_Int64, 128SpecialType.System_UInt32, 129SpecialType.System_UInt64, 130SpecialType.System_UInt16, 131SpecialType.System_SByte, 132SpecialType.System_Int16, 148? compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(container) 210public static ImmutableArray<SpecialType>? GetPredefinedNumericConversions(ITypeSymbol container) 213SpecialType.System_SByte => s_sbyteConversions, 214SpecialType.System_Byte => s_byteConversions, 215SpecialType.System_Int16 => s_int16Conversions, 216SpecialType.System_UInt16 => s_uint16Conversions, 217SpecialType.System_Int32 => s_int32Conversions, 218SpecialType.System_UInt32 => s_uint32Conversions, 219SpecialType.System_Int64 => s_int64Conversions, 220SpecialType.System_UInt64 => s_uint64Conversions, 221SpecialType.System_Char => s_charConversions, 222SpecialType.System_Single => s_singleConversions, 223SpecialType.System_Double => s_doubleConversions, 229ITypeSymbol container, INamedTypeSymbol containerWithoutNullable, ArrayBuilder<ISymbol> symbols, ImmutableArray<SpecialType> specialTypes) 233foreach (var specialType in specialTypes)
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (3)
55=> container.IsSpecialType() || container.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr; 96return symbol.Parameters.Length == 2 && symbol.ReturnType.SpecialType == SpecialType.System_Boolean;
Recommendations\CSharpRecommendationServiceRunner.cs (2)
938symbol.ContainingType.SpecialType is SpecialType.System_Object or SpecialType.System_ValueType)
Rename\CSharpRenameRewriterLanguageService.cs (1)
1027if (!method.ReturnsVoid && !method.Parameters.Any() && method.ReturnType.SpecialType == SpecialType.System_Boolean)
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (23)
33/// Returns the predefined keyword kind for a given <see cref="SpecialType"/>. 35/// <param name="specialType">The <see cref="SpecialType"/> of this type.</param> 37protected static SyntaxToken? TryGetPredefinedKeywordToken(SemanticModel semanticModel, SpecialType specialType) 41SpecialType.System_Boolean => SyntaxKind.BoolKeyword, 42SpecialType.System_Byte => SyntaxKind.ByteKeyword, 43SpecialType.System_SByte => SyntaxKind.SByteKeyword, 44SpecialType.System_Int32 => SyntaxKind.IntKeyword, 45SpecialType.System_UInt32 => SyntaxKind.UIntKeyword, 46SpecialType.System_Int16 => SyntaxKind.ShortKeyword, 47SpecialType.System_UInt16 => SyntaxKind.UShortKeyword, 48SpecialType.System_Int64 => SyntaxKind.LongKeyword, 49SpecialType.System_UInt64 => SyntaxKind.ULongKeyword, 50SpecialType.System_Single => SyntaxKind.FloatKeyword, 51SpecialType.System_Double => SyntaxKind.DoubleKeyword, 52SpecialType.System_Decimal => SyntaxKind.DecimalKeyword, 53SpecialType.System_String => SyntaxKind.StringKeyword, 54SpecialType.System_Char => SyntaxKind.CharKeyword, 55SpecialType.System_Object => SyntaxKind.ObjectKeyword, 56SpecialType.System_Void => SyntaxKind.VoidKeyword, 63if (specialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && semanticModel.UnifiesNativeIntegers()) 64return SyntaxFactory.Identifier(specialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 387semanticModel.GetTypeInfo(invocationExpr).Type.SpecialType == SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (13)
19case SpecialType.System_Boolean: 20case SpecialType.System_Char: 21case SpecialType.System_SByte: 22case SpecialType.System_Int16: 23case SpecialType.System_Int32: 24case SpecialType.System_Int64: 25case SpecialType.System_Byte: 26case SpecialType.System_UInt16: 27case SpecialType.System_UInt32: 28case SpecialType.System_UInt64: 29case SpecialType.System_Single: 30case SpecialType.System_Double: 33case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (18)
97while (current is IConversionOperation { Type.SpecialType: SpecialType.System_Delegate or SpecialType.System_MulticastDelegate }) 100if (current is IConversionOperation { Type.SpecialType: SpecialType.System_Object }) 585if (castNode.IsParentKind(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object) 690if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T && 691namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IReadOnlyCollection_T or SpecialType.System_Collections_Generic_IReadOnlyList_T) 697if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T && 698namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IList_T) 704if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T or SpecialType.System_Collections_Generic_IList_T && 769if (current.ContainingType.SpecialType == SpecialType.System_Object) 865=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr; 1083if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 1090else if (binaryOperation.RightOperand.Type?.SpecialType == SpecialType.System_Object && 1293=> type?.SpecialType is SpecialType.System_Double or SpecialType.System_Single; 1579rewrittenType.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
23SpecialType underlyingSpecialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (6)
132var isNotSingle = !IsSpecialType(type, SpecialType.System_Single); 143if (value is double && !IsSpecialType(type, SpecialType.System_Double)) 148if (value is uint && !IsSpecialType(type, SpecialType.System_UInt32)) 153if (value is long && !IsSpecialType(type, SpecialType.System_Int64)) 158if (value is ulong && !IsSpecialType(type, SpecialType.System_UInt64)) 167var isNotDecimal = !IsSpecialType(type, SpecialType.System_Decimal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
250var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 321if (namedType is { TypeKind: TypeKind.Class, BaseType: not null, BaseType.SpecialType: not SpecialType.System_Object })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
112targetType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (1)
33if (typeInfo.Type != null && typeInfo.Type.SpecialType == SpecialType.System_Void)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
65if (type.SpecialType != SpecialType.System_Object)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
126syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 220if (symbol.SpecialType == SpecialType.System_Void)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\WithElementSyntaxExtensions.cs (1)
57static m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Int32, Name: "capacity" }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (12)
275case SpecialType.System_Boolean: 277case SpecialType.System_SByte: 278case SpecialType.System_Byte: 279case SpecialType.System_Int16: 280case SpecialType.System_UInt16: 281case SpecialType.System_Int32: 282case SpecialType.System_UInt32: 283case SpecialType.System_Int64: 284case SpecialType.System_UInt64: 285case SpecialType.System_Decimal: 286case SpecialType.System_Single: 287case SpecialType.System_Double:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (35)
589return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 848return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 972return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 982return CreateResult(SpecialType.System_Boolean); 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); 1070return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1077return CreateResult(SpecialType.System_Boolean); 1110return CreateResult(SpecialType.System_Boolean); 1133return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1147else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1154return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol); 1175return CreateResult(SpecialType.System_Boolean); 1209return CreateResult(SpecialType.System_Boolean); 1318return CreateResult(SpecialType.System_Void); 1335enumerableType ??= this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 1343var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1349: results.Concat(CreateResult(Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable))); 1361return CreateResult(SpecialType.System_Boolean); 1370return CreateResult(SpecialType.System_Boolean); 1679return CreateResult(SpecialType.System_Object); 1975return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1993return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2000return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2009return CreateResult(SpecialType.System_Boolean); 2056return types.Select(t => t.InferredType.SpecialType == SpecialType.System_Void ? new TypeInferenceInfo(task) : new TypeInferenceInfo(taskOfT.Construct(t.InferredType))); 2092return this.Compilation.GetSpecialType(SpecialType.System_Void); 2220return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2247return CreateResult(SpecialType.System_IDisposable); 2271return CreateResult(SpecialType.System_IDisposable); 2275return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2278if (laterUsageInference is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2307if (inferredDescendantTypes is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2452return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2461return CreateResult(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.Extensions.Package (259)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.Features (145)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
165returnType: generator.TypeExpression(SpecialType.System_String),
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (2)
68if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 71if (type.SpecialType == SpecialType.System_Void)
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (10)
144case SpecialType.System_Enum: 145case SpecialType.System_String: 146case SpecialType.System_Object: 147case SpecialType.System_Delegate: 148case SpecialType.System_MulticastDelegate: 152case SpecialType.System_Array: 156case SpecialType.System_Collections_IEnumerable: 157case SpecialType.System_Collections_IEnumerator: 158case SpecialType.System_Collections_Generic_IEnumerable_T: 159case SpecialType.System_Collections_Generic_IEnumerator_T:
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (2)
63var inferredTypes = context.InferredTypes.Where(t => t.SpecialType != SpecialType.System_Void).ToSet<ITypeSymbol>(SymbolEqualityComparer.Default); 64var objectType = context.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
61if (symbol.ContainingType?.SpecialType == SpecialType.System_Object)
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (2)
209var isEnumBaseType = symbol.SpecialType is >= SpecialType.System_SByte and <= SpecialType.System_UInt64;
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
55if (type is { IsReferenceType: true } or { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
239if (collectionType.SpecialType == SpecialType.System_String) 241var charType = model.Compilation.GetSpecialType(SpecialType.System_Char);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (5)
112var ienumerableType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 113var ienumeratorType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T); 347var indexerType = GetIndexerType(containingType, collectionType, semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)); 351indexerType ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object)); 536=> property is { IsIndexer: true, Parameters: [{ Type.SpecialType: SpecialType.System_Int32 }] };
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (2)
245if (symbol?.ContainingType.SpecialType == SpecialType.System_Object) 294ContainingType.SpecialType: SpecialType.System_String,
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
122var shouldReplaceInvocation = invocationSymbol is { ContainingType.SpecialType: SpecialType.System_String, Name: nameof(string.Format) }; 132var stringType = semanticModel.Compilation.GetSpecialType(SpecialType.System_String);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
869model.Compilation.GetSpecialType(SpecialType.System_Void),
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
321if (attribute is { ConstructorArguments: [{ Type.SpecialType: SpecialType.System_String, Value: string stringValue }] })
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
190m => m is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_String }, ..] });
ExtractClass\AbstractExtractClassRefactoringProvider.cs (1)
137private static bool HasBaseType(INamedTypeSymbol containingType) => containingType.BaseType?.SpecialType != SpecialType.System_Object;
ExtractMethod\ExtractMethodFlowControlInformation.cs (6)
61var controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Void); 68controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Boolean); 73controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(compilation.GetSpecialType(SpecialType.System_Boolean)); 78controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Int32); 118=> ControlFlowValueType.SpecialType != SpecialType.System_Void;
ExtractMethod\MethodExtractor.Analyzer.cs (2)
187return compilation.GetSpecialType(SpecialType.System_Void); 202return compilation.GetSpecialType(SpecialType.System_Void);
ExtractMethod\MethodExtractor.CodeGenerator.cs (5)
263if (returnType != null && returnType.SpecialType != SpecialType.System_Void) 461return AnalyzerResult.CoreReturnType.SpecialType != SpecialType.System_Void 475if (controlFlowValueType.SpecialType == SpecialType.System_Void) 482if (coreReturnType.SpecialType == SpecialType.System_Void) 500return type.SpecialType == SpecialType.System_Void
ExtractMethod\MethodExtractor.cs (1)
228if (type.SpecialType == SpecialType.System_Void)
ExtractMethod\SelectionResult.cs (1)
69return (returnType ?? this.SemanticDocument.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object), returnsByRef);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
181var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (1)
137returnType: compilation.GetSpecialType(SpecialType.System_Int32),
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (2)
164compilation.GetSpecialType(SpecialType.System_Boolean), 181compilation.GetSpecialType(SpecialType.System_Boolean),
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
75return _state.Compilation.GetSpecialType(SpecialType.System_Void);
GenerateType\AbstractGenerateTypeService.State.cs (6)
259SpecialType.System_Object or 260SpecialType.System_Array or 261SpecialType.System_Delegate or 262SpecialType.System_MulticastDelegate or 263SpecialType.System_ValueType or 264SpecialType.System_Enum)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (3)
308.WhereAsArray(symbol => !symbol.IsErrorType() && symbol.SpecialType is not (SpecialType.System_Object or SpecialType.System_ValueType or SpecialType.System_Enum));
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (10)
124if (parameter.Type.SpecialType == SpecialType.System_String) 209if (parameter.Type.SpecialType == SpecialType.System_String) 283else if (parameter.Type.SpecialType == SpecialType.System_String && 422var enumType = compilation.GetSpecialType(SpecialType.System_Enum); 532return targetMethod.ContainingType.SpecialType == SpecialType.System_String; 642var enumType = compilation.GetSpecialType(SpecialType.System_Enum); 677compilation.GetSpecialType(SpecialType.System_Int32), 698.FirstOrDefault(s => s is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_Object }, ..] }); 765.FirstOrDefault(s => s is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_String }, ..] }); 776var stringType = compilation.GetSpecialType(SpecialType.System_String);
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
243return parameter.Type.SpecialType == SpecialType.System_Boolean;
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (2)
68var disposableType = semanticModel.Compilation.GetSpecialType(SpecialType.System_IDisposable); 105var disposableType = semanticModel.Compilation.GetSpecialType(SpecialType.System_IDisposable);
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
45type.SpecialType == SpecialType.System_Void)
IntroduceVariable\AbstractIntroduceVariableService.cs (2)
386if (typeInfo.Type?.SpecialType == SpecialType.System_String && 404return semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
IntroduceVariable\AbstractIntroduceVariableService.State_Query.cs (1)
30if (info.Type == null || info.Type.SpecialType == SpecialType.System_Void)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
105if (type == null || type.SpecialType == SpecialType.System_Void)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
593if (symbol.IsEnumType() && symbol.EnumUnderlyingType!.SpecialType != SpecialType.System_Int32)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
69public SpecialType SpecialType => _symbol.SpecialType;
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (2)
51var replacementNode = typeSymbol.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
87typeSymbol.SpecialType is SpecialType.None)
QuickInfo\QuickInfoUtilities.cs (1)
46if (symbol is INamedTypeSymbol { SpecialType: SpecialType.System_Void })
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
125if (current.ContainingType.SpecialType == SpecialType.System_Object)
RQName\RQNodeBuilder.cs (2)
70if (type != type.ConstructedFrom || type.SpecialType == SpecialType.System_Void) 265if (symbol.SpecialType == SpecialType.System_Void)
Snippets\SnippetProviders\AbstractConditionalBlockSnippetProvider.cs (1)
22=> type.SpecialType == SpecialType.System_Boolean;
Snippets\SnippetProviders\AbstractMainMethodSnippetProvider.cs (1)
29type: generator.ArrayTypeExpression(generator.TypeExpression(SpecialType.System_String)))],
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
177value.Type.SpecialType == SpecialType.System_Void)
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (3)
233method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 273if (method is { MetadataName: "GetInstance", IsStatic: true, Parameters: [{ Type.SpecialType: SpecialType.System_String }] } && 295if (parameter.Type.SpecialType != SpecialType.System_Int32)
src\roslyn\src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (7)
98if (collectionElementType.SpecialType == SpecialType.System_Object) 100var ienumerableOfT = collectionType.AllInterfaces.FirstOrDefault(i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 141var isFixable = collectionType.SpecialType == SpecialType.System_Collections_IEnumerable || collectionType.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 157=> collectionElementType.SpecialType != SpecialType.System_Object || 158collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T || 159collectionType.AllInterfaces.Any(static i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
30var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
97if (typeWithoutNullable.SpecialType == SpecialType.System_Boolean) 105if (type.RemoveNullableIfPresent() is not { SpecialType: SpecialType.System_Boolean })
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
158if (member is not IFieldSymbol fieldSymbol || fieldSymbol.Type.SpecialType != SpecialType.None)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
88if (leftType?.SpecialType != SpecialType.System_Boolean || 89rightType?.SpecialType != SpecialType.System_Boolean)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
849attribute.AttributeConstructor?.Parameters is [_, { Name: "checkId", Type.SpecialType: SpecialType.System_String }, ..] && 858attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (3)
902if (attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }]) 913Value: { Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string namedValue }, 1078(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
154typeInfo.Type?.SpecialType == SpecialType.System_Boolean && 155typeInfo.ConvertedType?.SpecialType == SpecialType.System_Boolean;
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
39var readOnlySpanOfCharType = compilation.ReadOnlySpanOfTType()?.Construct(compilation.GetSpecialType(SpecialType.System_Char));
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
35var dateTimeType = compilation.GetSpecialType(SpecialType.System_DateTime); 200return method.ContainingType.SpecialType == SpecialType.System_Object
src\roslyn\src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
34var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
144var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch, cancellationToken).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (5)
26ContainingType.OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, 85var objectType = compilation.GetSpecialType(SpecialType.System_Object); 214if (type is not INamedTypeSymbol namedType || namedType.ConstructedFrom.SpecialType != SpecialType.System_Nullable_T) 255var whenPartIsNullable = whenPartType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 435if (typeSymbol?.SpecialType == SpecialType.System_Object)
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
303if (containingType.SpecialType != SpecialType.System_String)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (9)
380case SpecialType.System_Boolean: 381case SpecialType.System_Byte: 382case SpecialType.System_Char: 383case SpecialType.System_Int16: 384case SpecialType.System_Int32: 385case SpecialType.System_Int64: 386case SpecialType.System_Double: 387case SpecialType.System_Single: 388case SpecialType.System_String:
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
75returnType: semanticModel.Compilation.GetSpecialType(SpecialType.System_Void),
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
64if (typeParameters.Length == 0 && returnType.SpecialType != SpecialType.System_Void)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
450inferredType = inferredType.SpecialType == SpecialType.System_Void
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
248var idisposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
175compilation.GetSpecialType(SpecialType.System_Boolean), 238var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
273var condition3 = typeParameter.HasReferenceTypeConstraint && typeParameter.ConstraintTypes.Any(static ts => ts.IsReferenceType && ts.SpecialType != SpecialType.System_Object);
src\roslyn\src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
57var readOnlySpanOfCharType = compilation.ReadOnlySpanOfTType()?.Construct(compilation.GetSpecialType(SpecialType.System_Char));
ValueTracking\ValueTracker.cs (1)
246return methodSymbol.ReturnType.SpecialType != SpecialType.System_Void;
Microsoft.CodeAnalysis.NetAnalyzers (581)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidOutParameters.cs (1)
87methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CollectionPropertiesShouldBeReadOnly.cs (1)
154ArrayType = wellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Array);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotRaiseExceptionsInUnexpectedLocations.cs (2)
257if (method.ReturnType.SpecialType == SpecialType.System_Boolean && 294if (method.ReturnType.SpecialType == SpecialType.System_Int32 && method.Parameters.Length == 1)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumsShouldHaveZeroValue.cs (2)
179SpecialType specialType = enumType.EnumUnderlyingType!.SpecialType; 189private static bool IsZeroValueConstant(object? value, SpecialType specialType)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumStorageShouldBeInt32.cs (3)
63SpecialType underlyingType = symbol.EnumUnderlyingType!.SpecialType; 64if (underlyingType == SpecialType.System_Int32) 76if (underlyingType == SpecialType.System_Int64 && symbol.HasAnyAttribute(flagsAttribute))
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EquatableAnalyzer.Fixer.cs (3)
151returnType: generator.TypeExpression(SpecialType.System_Boolean), 188generator.TypeExpression(SpecialType.System_Object)) 190returnType: generator.TypeExpression(SpecialType.System_Boolean),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\Helpers\EnumHelpers.cs (10)
12internal static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 20case SpecialType.System_Int16: 24case SpecialType.System_Int32: 28case SpecialType.System_Int64: 32case SpecialType.System_UInt16: 36case SpecialType.System_UInt32: 40case SpecialType.System_UInt64: 44case SpecialType.System_Byte: 48case SpecialType.System_SByte: 52case SpecialType.System_Char:
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementIDisposableCorrectly.cs (1)
403=> type.GetBaseTypes().FirstOrDefault(baseType => baseType.SpecialType != SpecialType.System_Object && baseType.HasFinalizer());
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementStandardExceptionConstructors.cs (2)
92else if (parameters.Length == 1 && parameters[0].Type.SpecialType == SpecialType.System_String) 97else if (parameters.Length == 2 && parameters[0].Type.SpecialType == SpecialType.System_String &&
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementStandardExceptionConstructors.Fixer.cs (2)
72generator.ParameterDeclaration("message", generator.TypeExpression(model.Compilation.GetSpecialType(SpecialType.System_String))) 92generator.ParameterDeclaration("message", generator.TypeExpression(model.Compilation.GetSpecialType(SpecialType.System_String))),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\NestedTypesShouldNotBeVisible.cs (1)
59INamedTypeSymbol? enumeratorType = wellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorOverloadsHaveNamedAlternates.cs (1)
115if (property == null || property.Type.SpecialType != SpecialType.System_Boolean)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorOverloadsHaveNamedAlternates.Fixer.cs (2)
78type: generator.TypeExpression(SpecialType.System_Boolean), 148INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PassSystemUriObjectsInsteadOfStrings.cs (1)
105var stringParameters = method.Parameters.GetParametersOfType(SpecialType.System_String);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertyNamesShouldNotMatchGetMethods.cs (1)
106if (member.ContainingType.SpecialType == SpecialType.System_Object &&
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriParametersShouldNotBeStrings.cs (1)
88var stringParameters = method.Parameters.GetParametersOfType(SpecialType.System_String);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriPropertiesShouldNotBeStrings.cs (1)
84if (property.Type?.SpecialType != SpecialType.System_String)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriReturnValuesShouldNotBeStrings.cs (1)
84if (method.IsAccessorMethod() || method.ReturnType?.SpecialType != SpecialType.System_String)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseIntegralOrStringArgumentForIndexers.cs (9)
37private static readonly ImmutableArray<SpecialType> s_allowedSpecialTypes = 39SpecialType.System_String, 40SpecialType.System_Int16, 41SpecialType.System_Int32, 42SpecialType.System_Int64, 43SpecialType.System_Object, 44SpecialType.System_UInt16, 45SpecialType.System_UInt32, 46SpecialType.System_UInt64
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidDeadConditionalCode.cs (2)
84op is IInvocationOperation { TargetMethod.ReturnType.SpecialType: SpecialType.System_Boolean } || 208operation.Type?.SpecialType == SpecialType.System_Boolean)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidLengthCalculationWhenSlicingToEnd.cs (2)
189var int32Type = compilation.GetSpecialType(SpecialType.System_Int32); 190var stringType = compilation.GetSpecialType(SpecialType.System_String);
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFields.cs (1)
69SpecialType specialType = argument.Type.TypeKind == TypeKind.Enum ?
Microsoft.CodeQuality.Analyzers\Maintainability\DoNotIgnoreMethodResults.cs (4)
329return method.ContainingType.SpecialType == SpecialType.System_String && 336method.ReturnType.SpecialType == SpecialType.System_Boolean && 345(method.ReturnType.SpecialType == SpecialType.System_Int32 || 346method.ReturnType.SpecialType == SpecialType.System_UInt32);
Microsoft.CodeQuality.Analyzers\Maintainability\UseCrossPlatformIntrinsicsAnalyzer.cs (26)
103(invocation.Arguments[1].Parameter?.Type.SpecialType is SpecialType.System_Byte or SpecialType.System_Int32) && 145AddBinaryOperatorMethods(methodSymbols, "AddScalar", armAdvSimdTypeSymbol, RuleKind.op_Addition, [SpecialType.System_Int64, SpecialType.System_UInt64, SpecialType.System_Double]); 147AddBinaryOperatorMethods(methodSymbols, "DivideScalar", armAdvSimdTypeSymbol, RuleKind.op_Division, [SpecialType.System_Double]); 149AddBinaryOperatorMethods(methodSymbols, "MultiplyScalar", armAdvSimdTypeSymbol, RuleKind.op_Multiply, [SpecialType.System_Double]); 152AddBinaryOperatorMethods(methodSymbols, "SubtractScalar", armAdvSimdTypeSymbol, RuleKind.op_Subtraction, [SpecialType.System_Int64, SpecialType.System_UInt64, SpecialType.System_Double]); 156AddShiftOperatorMethods(methodSymbols, "ShiftLeftLogicalScalar", armAdvSimdTypeSymbol, RuleKind.op_LeftShift, [SpecialType.System_Int64, SpecialType.System_UInt64]); 158AddShiftOperatorMethods(methodSymbols, "ShiftRightArithmeticScalar", armAdvSimdTypeSymbol, RuleKind.op_RightShift, [SpecialType.System_Int64, SpecialType.System_UInt64]); 160AddShiftOperatorMethods(methodSymbols, "ShiftRightLogicalScalar", armAdvSimdTypeSymbol, RuleKind.op_UnsignedRightShift, [SpecialType.System_Int64, SpecialType.System_UInt64]); 163AddUnaryOperatorMethods(methodSymbols, "NegateScalar", armAdvSimdTypeSymbol, RuleKind.op_UnaryNegation, [SpecialType.System_Double]); 175AddUnaryOperatorMethods(methodSymbols, "NegateScalar", armAdvSimdArm64TypeSymbol, RuleKind.op_UnaryNegation, [SpecialType.System_Int64]); 250AddBinaryOperatorMethods(methodSymbols, "Multiply", x86Avx512FTypeSymbol, RuleKind.op_Multiply, [SpecialType.System_Single, SpecialType.System_Double]); 282AddBinaryOperatorMethods(methodSymbols, "Multiply", x86Sse2TypeSymbol, RuleKind.op_Multiply, [SpecialType.System_Double]); 303static void AddBinaryOperatorMethods(Dictionary<IMethodSymbol, RuleKind> methodSymbols, string name, INamedTypeSymbol typeSymbol, RuleKind ruleKind, params SpecialType[] supportedTypes) 321static void AddShiftOperatorMethods(Dictionary<IMethodSymbol, RuleKind> methodSymbols, string name, INamedTypeSymbol typeSymbol, RuleKind ruleKind, params SpecialType[] supportedTypes) 334(m.Parameters[1].Type.SpecialType is SpecialType.System_Byte or SpecialType.System_Int32) && 340static void AddUnaryOperatorMethods(Dictionary<IMethodSymbol, RuleKind> methodSymbols, string name, INamedTypeSymbol typeSymbol, RuleKind ruleKind, params SpecialType[] supportedTypes)
Microsoft.CodeQuality.Analyzers\Maintainability\UseNameofInPlaceOfString.cs (1)
59|| argument.Value.Type?.SpecialType != SpecialType.System_String
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\AvoidMultipleEnumerationsHelpers.cs (4)
384builder.AddRange(type.Constructors.Where(c => c.Parameters.Any(p => p.Type.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T))); 406&& parameters[0].Type.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 448_ => type.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T or SpecialType.System_Collections_IEnumerable || additionalTypesToCheck.Contains(type)
Microsoft.CodeQuality.Analyzers\QualityGuidelines\UseLiteralsWhereAppropriate.cs (3)
57builder.Add(context.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 58builder.Add(context.Compilation.GetSpecialType(SpecialType.System_UIntPtr)); 97if (fieldInitializerType.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Data\ReviewSqlQueriesForSecurityVulnerabilities.cs (2)
154var potentials = arguments.WhereAsArray(arg => arg.Parameter?.Type.SpecialType == SpecialType.System_String && !arg.Parameter.IsImplicitlyDeclared); 218if (argumentValue.Type.SpecialType != SpecialType.System_String || !argumentValue.ConstantValue.HasValue)
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshalling.cs (1)
180if (type.SpecialType == SpecialType.System_Void)
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshallingAnalyzer.AutoLayoutTypeCache.cs (1)
63SpecialType specialType = argument.Type.TypeKind == TypeKind.Enum ?
Microsoft.NetCore.Analyzers\InteropServices\DoNotUseOutAttributeStringPInvokeParameters.cs (1)
62if (parameter.Type.SpecialType == SpecialType.System_String
Microsoft.NetCore.Analyzers\InteropServices\PInvokeDiagnosticAnalyzer.cs (3)
135if (parameter.Type.SpecialType == SpecialType.System_String || parameter.Type.Equals(_stringBuilderType)) 163(methodSymbol.ReturnType.SpecialType == SpecialType.System_String || methodSymbol.ReturnType.Equals(_stringBuilderType))) 179else if (argument.Type?.SpecialType == SpecialType.System_Int16)
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (9)
176var stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 186m.ReturnType.SpecialType == SpecialType.System_Boolean && 196m.Parameters[0].Type.SpecialType == SpecialType.System_String); 226m.ReturnType.SpecialType == SpecialType.System_Boolean && 467if (argument.Parameter?.Type.SpecialType == SpecialType.System_Int32 && 1353if (symbol == null || symbol is ITypeSymbol type && type.SpecialType != SpecialType.None) 1401if (typeArgument.SpecialType == SpecialType.None) 1469operation.Parameter?.Type.SpecialType == SpecialType.System_String && 2133argument.Type?.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.OperationVisitor.cs (1)
47if (symbol.GetMemberType()!.SpecialType != SpecialType.System_Boolean ||
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.Value.cs (2)
74if (literal.Type?.SpecialType == SpecialType.System_String && 95else if (literal.Type?.SpecialType == SpecialType.System_Int32)
Microsoft.NetCore.Analyzers\InteropServices\UseValidPlatformString.cs (1)
114m.ReturnType.SpecialType == SpecialType.System_Boolean &&
Microsoft.NetCore.Analyzers\Performance\AvoidPotentiallyExpensiveCallWhenLogging.cs (1)
226if (method.ContainingType?.SpecialType == SpecialType.System_Object &&
Microsoft.NetCore.Analyzers\Performance\CollapseMultiplePathOperations.cs (1)
95return method.ReturnType.SpecialType == SpecialType.System_String;
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (41)
263SpecialType.System_Char => true, 264SpecialType.System_Byte => true, 265SpecialType.System_UInt16 => true, 266SpecialType.System_UInt32 => true, 267SpecialType.System_UInt64 => true, 268SpecialType.System_SByte => true, 269SpecialType.System_Int16 => true, 270SpecialType.System_Int32 => true, 271SpecialType.System_Int64 => true, 272SpecialType.System_Single => true, 273SpecialType.System_Double => true, 274SpecialType.System_Boolean => true, 275SpecialType.System_String => true, 276SpecialType.None when type.TypeKind == TypeKind.TypeParameter => true, 300case SpecialType.System_Char: 302case SpecialType.System_Byte: 304case SpecialType.System_UInt16: 306case SpecialType.System_UInt32: 308case SpecialType.System_UInt64: 310case SpecialType.System_SByte: 312case SpecialType.System_Int16: 314case SpecialType.System_Int32: 316case SpecialType.System_Int64: 318case SpecialType.System_Single: 320case SpecialType.System_Double: 322case SpecialType.System_Boolean: 324case SpecialType.System_String: 352case SpecialType.System_Char: 354case SpecialType.System_Byte: 356case SpecialType.System_UInt16: 358case SpecialType.System_UInt32: 360case SpecialType.System_UInt64: 362case SpecialType.System_SByte: 364case SpecialType.System_Int16: 366case SpecialType.System_Int32: 368case SpecialType.System_Int64: 370case SpecialType.System_Single: 372case SpecialType.System_Double: 374case SpecialType.System_Boolean: 376case SpecialType.System_String: 378case SpecialType.None when parameterSymbol.Type.TypeKind == TypeKind.TypeParameter:
Microsoft.NetCore.Analyzers\Performance\PreferConvertToHexStringOverBitConverter.cs (3)
120var byteType = compilation.GetSpecialType(SpecialType.System_Byte); 122var int32Type = compilation.GetSpecialType(SpecialType.System_Int32); 123var stringType = compilation.GetSpecialType(SpecialType.System_String);
Microsoft.NetCore.Analyzers\Performance\PreferHashDataOverComputeHash.cs (2)
524var byteType = compilation.GetSpecialType(SpecialType.System_Byte); 525var intType = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.NetCore.Analyzers\Performance\PreferLengthCountIsEmptyOverAnyAnalyzer.cs (5)
141.Any(property => property.Type.SpecialType == SpecialType.System_Boolean); 153.Any(property => property.Type.SpecialType is SpecialType.System_Int32 or SpecialType.System_UInt32); 162.Any(property => property.Type.SpecialType is SpecialType.System_Int32 or SpecialType.System_UInt32);
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Analyzer.cs (2)
88INamedTypeSymbol stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 89INamedTypeSymbol int32Type = context.Compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.NetCore.Analyzers\Performance\UseAsSpanInsteadOfRangeIndexer.cs (1)
77var stringType = compilation.GetSpecialType(SpecialType.System_String);
Microsoft.NetCore.Analyzers\Performance\UseCompositeFormat.cs (4)
48INamedTypeSymbol stringType = compilationContext.Compilation.GetSpecialType(SpecialType.System_String); 108if (parameters.Length >= 1 && parameters[0].Type.SpecialType == SpecialType.System_String) 113parameters[1].Type.SpecialType == SpecialType.System_String && 147if (operation.Type?.SpecialType != SpecialType.System_String)
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.cs (3)
126var voidType = context.Compilation.GetSpecialType(SpecialType.System_Void); 347if (toType.SpecialType is SpecialType.System_Object or SpecialType.System_Delegate)
Microsoft.NetCore.Analyzers\Performance\UseCountProperly.cs (22)
389if (type != null && !TypeContainsVisibleProperty(context, type, propertyName, SpecialType.System_Int32, SpecialType.System_UInt64, out _)) 392if (!TypeContainsVisibleProperty(context, type, propertyName, SpecialType.System_Int32, SpecialType.System_UInt64, out _)) 505TypeContainsVisibleProperty(context, type, IsEmpty, SpecialType.System_Boolean, out ISymbol? isEmptyPropertySymbol) && 510else if (TypeContainsVisibleProperty(context, type, Length, SpecialType.System_Int32, SpecialType.System_UInt64, out _)) 514else if (TypeContainsVisibleProperty(context, type, Count, SpecialType.System_Int32, SpecialType.System_UInt64, out _)) 535TypeContainsVisibleProperty(context, type, IsEmpty, SpecialType.System_Boolean, out ISymbol? isEmptyPropertySymbol) && 558&& IsInRangeInclusive((uint)methodSymbol.ContainingType.SpecialType, (uint)SpecialType.System_Int32, (uint)SpecialType.System_UInt64); 661private static bool TypeContainsVisibleProperty(OperationAnalysisContext context, ITypeSymbol type, string propertyName, SpecialType propertyType, out ISymbol? propertySymbol) 664private static bool TypeContainsVisibleProperty(OperationAnalysisContext context, ITypeSymbol type, string propertyName, SpecialType lowerBound, SpecialType upperBound, out ISymbol? propertySymbol) 699OperationAnalysisContext context, ITypeSymbol type, string propertyName, SpecialType lowerBound, SpecialType upperBound, 728case SpecialType.System_Int32: 729case SpecialType.System_Int64: 730case SpecialType.System_UInt32: 731case SpecialType.System_UInt64: 732case SpecialType.System_Object:
Microsoft.NetCore.Analyzers\Performance\UseSearchValues.cs (12)
76bool isStringIndexOfAny = invocation.TargetMethod.ContainingType.SpecialType == SpecialType.System_String; 97var stringType = compilation.GetSpecialType(SpecialType.System_String); 141methods.Add(method.Construct(compilation.GetSpecialType(SpecialType.System_Byte))); 142methods.Add(method.Construct(compilation.GetSpecialType(SpecialType.System_Char))); 253array.ElementType.SpecialType is SpecialType.System_Byte or SpecialType.System_Char; 259typeArgument.SpecialType is SpecialType.System_Byte or SpecialType.System_Char; 265if (invocation.TargetMethod.ContainingType.SpecialType == SpecialType.System_String && 306if (operation.Type is { SpecialType: SpecialType.System_String } && 339if (operation.Type is not { SpecialType: SpecialType.System_Byte }) 347if (operation.Type is not { SpecialType: SpecialType.System_Char } ||
Microsoft.NetCore.Analyzers\Performance\UseSearchValues.Fixer.cs (3)
105typeArgument.SpecialType == SpecialType.System_Byte; 153generator.TypeExpression(searchValuesOfT.Construct(compilation.GetSpecialType(isByte ? SpecialType.System_Byte : SpecialType.System_Char))),
Microsoft.NetCore.Analyzers\Performance\UseStartsWithInsteadOfIndexOfComparisonWithZero.cs (6)
50var stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 56if (startsWithMethod.Parameters is [{ Type.SpecialType: SpecialType.System_Char }]) 71if (indexOfMethod.Parameters is [{ Type.SpecialType: SpecialType.System_String }]) 75else if (indexOfMethod.Parameters is [{ Type.SpecialType: SpecialType.System_Char }]) 79else if (indexOfMethod.Parameters is [{ Type.SpecialType: SpecialType.System_String }, { Name: "comparisonType" }]) 83else if (indexOfMethod.Parameters is [{ Type.SpecialType: SpecialType.System_Char }, { Name: "comparisonType" }])
Microsoft.NetCore.Analyzers\Performance\UseStringContainsCharOverloadWithSingleCharactersAnalyzer.cs (5)
45var stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 46var charType = context.Compilation.GetSpecialType(SpecialType.System_Char); 56return m.Parameters[0].Type.SpecialType == SpecialType.System_Char; 79&& invokedMethod.ContainingType.SpecialType.Equals(SpecialType.System_String) 82&& invokedMethod.Parameters[0].Type.SpecialType.Equals(SpecialType.System_String);
Microsoft.NetCore.Analyzers\Performance\UseStringMethodCharOverloadWithSingleCharacters.cs (5)
75var stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 76var charType = context.Compilation.GetSpecialType(SpecialType.System_Char); 84m.Parameters[0].Type.SpecialType == SpecialType.System_Char; 159invokedMethod.ContainingType.SpecialType == SpecialType.System_String && 162invokedMethod.Parameters[0].Type.SpecialType == SpecialType.System_String)
Microsoft.NetCore.Analyzers\Performance\UseStringMethodCharOverloadWithSingleCharacters.Fixer.cs (1)
78return argument?.Value.Type != null && argument.Value.Type.SpecialType == SpecialType.System_Int32;
Microsoft.NetCore.Analyzers\Runtime\AttributeStringLiteralsShouldParseCorrectly.cs (2)
170if (parameter.Type.SpecialType != SpecialType.System_String) 205namedArgument.Value.Type?.SpecialType != SpecialType.System_String)
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocations.cs (1)
56INamedTypeSymbol typeSymbol = context.Compilation.GetSpecialType(SpecialType.System_Array);
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocations.Fixer.cs (1)
43INamedTypeSymbol? arrayTypeSymbol = semanticModel.Compilation.GetSpecialType(SpecialType.System_Array);
Microsoft.NetCore.Analyzers\Runtime\BufferBlockCopyLengthAnalyzer.cs (5)
48INamedTypeSymbol arrayType = context.Compilation.GetSpecialType(SpecialType.System_Array); 49INamedTypeSymbol int32Type = context.Compilation.GetSpecialType(SpecialType.System_Int32); 95if (countArgumentArrayTypeSymbol.ElementType.SpecialType is not SpecialType.System_Byte and 96not SpecialType.System_SByte and 97not SpecialType.System_Boolean)
Microsoft.NetCore.Analyzers\Runtime\DisposableTypesShouldDeclareFinalizer.cs (2)
47compilation.GetSpecialType(SpecialType.System_IntPtr), 48compilation.GetSpecialType(SpecialType.System_UIntPtr),
Microsoft.NetCore.Analyzers\Runtime\DisposeObjectsBeforeLosingScope.cs (1)
186=> type.SpecialType == SpecialType.System_Object ||
Microsoft.NetCore.Analyzers\Runtime\DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer.cs (15)
77== SpecialType.System_Collections_IEnumerable 124if (operation.Type.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 132if (t.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 207if (castFrom.SpecialType == SpecialType.System_Object 208|| castTo.SpecialType == SpecialType.System_Object) 248return t.SpecialType is not SpecialType.System_Enum 249and not SpecialType.System_ValueType; 298return castFrom.SpecialType is not SpecialType.System_Enum 299and not SpecialType.System_ValueType; 301return castTo.SpecialType is not SpecialType.System_Enum 302and not SpecialType.System_ValueType; 328return castTo.SpecialType != SpecialType.System_Array; 330return castFrom.SpecialType != SpecialType.System_Array; 333return castFrom.SpecialType != SpecialType.System_ValueType; 335return castTo.SpecialType != SpecialType.System_ValueType;
Microsoft.NetCore.Analyzers\Runtime\DoNotLockOnObjectsWithWeakIdentity.cs (15)
110type.SpecialType == SpecialType.System_String || 129SpecialType.System_Boolean 130or SpecialType.System_Byte 131or SpecialType.System_Char 132or SpecialType.System_Double 133or SpecialType.System_Int16 134or SpecialType.System_Int32 135or SpecialType.System_Int64 136or SpecialType.System_UInt16 137or SpecialType.System_UInt32 138or SpecialType.System_UInt64 139or SpecialType.System_IntPtr 140or SpecialType.System_UIntPtr 141or SpecialType.System_SByte 142or SpecialType.System_Single => true,
Microsoft.NetCore.Analyzers\Runtime\DoNotPassLiteralsAsLocalizedParameters.cs (2)
227if (parameterSymbol.Type.SpecialType != SpecialType.System_String) 318localizableAttribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_Boolean &&
Microsoft.NetCore.Analyzers\Runtime\DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectly.cs (3)
98if (targetType.TypeKind == TypeKind.Interface && targetType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IReadOnlyList_T) 107if (current.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IReadOnlyList_T) 112if (current.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IList_T)
Microsoft.NetCore.Analyzers\Runtime\DoNotUseReferenceEqualsWithValueTypes.cs (1)
55var objectType = compilationStartContext.Compilation.GetSpecialType(SpecialType.System_Object);
Microsoft.NetCore.Analyzers\Runtime\InstantiateArgumentExceptionsCorrectly.cs (2)
110if (argument.Parameter?.Type.SpecialType != SpecialType.System_String) 194if (parameter.Type.SpecialType == SpecialType.System_String
Microsoft.NetCore.Analyzers\Runtime\LoggerMessageDefineAnalyzer.cs (2)
333if (parameter.Type.SpecialType == SpecialType.System_String && 341else if (parameter.Type.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Runtime\NormalizeStringsToUppercase.cs (1)
44var stringType = context.Compilation.GetSpecialType(SpecialType.System_String);
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstring.cs (3)
235var stringType = compilation.GetSpecialType(SpecialType.System_String); 236var charType = compilation.GetSpecialType(SpecialType.System_Char); 237var int32Type = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitString.Fixer.cs (1)
84SyntaxNode charTypeNode = generator.TypeExpression(SpecialType.System_Char);
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitStringAnalyzer.cs (1)
54s.Parameters[0].Type.SpecialType == SpecialType.System_String);
Microsoft.NetCore.Analyzers\Runtime\PreferDictionaryContainsMethods.cs (3)
116|| containsMethod.ReturnType.SpecialType != SpecialType.System_Boolean 145.FirstOrDefault(x => x.ReturnType.SpecialType == SpecialType.System_Boolean && 166.FirstOrDefault(x => x.ReturnType.SpecialType == SpecialType.System_Boolean &&
Microsoft.NetCore.Analyzers\Runtime\PreferReadOnlySpanPropertiesOverReadOnlyArrayFieldsAnalyzer.cs (6)
224elementType.SpecialType != SpecialType.System_String && 227SpecialType.System_Boolean or 228SpecialType.System_Byte or 229SpecialType.System_SByte); 251method.Parameters is [{ RefKind: RefKind.None, Type.SpecialType: SpecialType.System_RuntimeFieldHandle }] && 446var arrayLengthProperty = compilation.GetSpecialType(SpecialType.System_Array).GetMembers(nameof(Array.Length)).OfType<IPropertySymbol>().FirstOrDefault();
Microsoft.NetCore.Analyzers\Runtime\PreferStreamAsyncMemoryOverloads.cs (2)
99INamedTypeSymbol byteType = context.Compilation.GetSpecialType(SpecialType.System_Byte); 105INamedTypeSymbol int32Type = context.Compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOf.Fixer.cs (3)
75if (firstArgument.Parameter?.Type.SpecialType == SpecialType.System_Char) 89if (indexOfMethodArguments[0].Value.Type?.SpecialType is SpecialType.System_String or SpecialType.System_Char)
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOfAnalyzer.cs (3)
43if (context.Compilation.GetSpecialType(SpecialType.System_String) is not INamedTypeSymbol stringType || 44context.Compilation.GetSpecialType(SpecialType.System_Char) is not INamedTypeSymbol charType || 125if (localReference.Local.Type.SpecialType != SpecialType.System_Int32)
Microsoft.NetCore.Analyzers\Runtime\PreferTypedStringBuilderAppendOverloads.cs (12)
58s.Parameters[0].Type.SpecialType != SpecialType.System_Object && 65s.Parameters[0].Type.SpecialType == SpecialType.System_Int32 && 66s.Parameters[1].Type.SpecialType != SpecialType.System_Object && 76s.Parameters[0].Type.SpecialType == SpecialType.System_Char && 77s.Parameters[1].Type.SpecialType == SpecialType.System_Int32); 81s.Parameters[0].Type.SpecialType == SpecialType.System_String); 83s.Parameters[0].Type.SpecialType == SpecialType.System_Int32 && 84s.Parameters[1].Type.SpecialType == SpecialType.System_String); 120toStringInvoke.Type?.SpecialType == SpecialType.System_String && 139objectCreation.Type?.SpecialType == SpecialType.System_String && 141objectCreation.Arguments[0].Value?.Type?.SpecialType == SpecialType.System_Char && 142objectCreation.Arguments[1].Value?.Type?.SpecialType == SpecialType.System_Int32 &&
Microsoft.NetCore.Analyzers\Runtime\PreventNumericIntPtrUIntPtrBehavioralChanges.cs (12)
83if ((binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_IntPtr || 84binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_UIntPtr) && 165conversion.Operand.Type?.SpecialType == SpecialType.System_Int32; 168intPtrType?.SpecialType == SpecialType.System_IntPtr && 172convertingType?.SpecialType == SpecialType.System_IntPtr && 173operandType?.SpecialType == SpecialType.System_Int64; 176convertingType?.SpecialType == SpecialType.System_Int32 && 177operandType?.SpecialType == SpecialType.System_IntPtr; 180convertingType?.SpecialType == SpecialType.System_UIntPtr && 181operandType?.SpecialType == SpecialType.System_UInt64; 184convertingType?.SpecialType == SpecialType.System_UInt32 && 185operandType?.SpecialType == SpecialType.System_UIntPtr;
Microsoft.NetCore.Analyzers\Runtime\ProvideCorrectArgumentsToFormattingMethods.cs (3)
354INamedTypeSymbol @string = compilation.GetSpecialType(SpecialType.System_String); 358Object = compilation.GetSpecialType(SpecialType.System_Object); 445if (method.Parameters[formatIndex].Type.SpecialType != SpecialType.System_String)
Microsoft.NetCore.Analyzers\Runtime\ProvideStreamMemoryBasedAsyncOverrides.cs (2)
111var int32Type = compilation.GetSpecialType(SpecialType.System_Int32); 112var byteType = compilation.GetSpecialType(SpecialType.System_Byte);
Microsoft.NetCore.Analyzers\Runtime\SerializationRulesDiagnosticAnalyzer.cs (1)
120(baseType.SpecialType == SpecialType.System_Object ||
Microsoft.NetCore.Analyzers\Runtime\SpecifyCultureForToLowerAndToUpper.cs (1)
38var stringType = context.Compilation.GetSpecialType(SpecialType.System_String);
Microsoft.NetCore.Analyzers\Runtime\SpecifyIFormatProvider.cs (11)
97var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object); 98var stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 100var charType = context.Compilation.GetSpecialType(SpecialType.System_Char); 101var boolType = context.Compilation.GetSpecialType(SpecialType.System_Boolean); 104var nullableT = context.Compilation.GetSpecialType(SpecialType.System_Nullable_T); 162.Where(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_String or SpecialType.System_Boolean or SpecialType.System_Char }, var possibleFormatProvider] 167.First(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_String }, var possibleFormatProvider] 171.First(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_String }, var possibleFormatProvider] 311return type?.GetMembers("ToString").OfType<IMethodSymbol>().FirstOrDefault(s => s.Parameters is [{ Type.SpecialType: SpecialType.System_String }]);
Microsoft.NetCore.Analyzers\Runtime\SpecifyStringComparison.cs (6)
55var stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 88if (targetMethod.ContainingType.SpecialType == SpecialType.System_String && 132var objectType = compilation.GetSpecialType(SpecialType.System_Object); 133var booleanType = compilation.GetSpecialType(SpecialType.System_Boolean); 134var integerType = compilation.GetSpecialType(SpecialType.System_Int32); 177method.Parameters[0].Type.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Runtime\TestForEmptyStringsUsingStringLength.cs (4)
108if (binaryOperation.LeftOperand.Type?.SpecialType != SpecialType.System_String || 109binaryOperation.RightOperand.Type?.SpecialType != SpecialType.System_String) 134methodSymbol.ContainingType.SpecialType == SpecialType.System_String; 158field.Type.SpecialType == SpecialType.System_String;
Microsoft.NetCore.Analyzers\Runtime\TestForEmptyStringsUsingStringLength.Fixer.cs (2)
130if (fieldSymbol.Type.SpecialType == SpecialType.System_String) 149SyntaxNode typeNameSyntax = generator.TypeExpression(SpecialType.System_String);
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectly.Fixer.cs (2)
86if (symbol is IFieldSymbol { HasConstantValue: true, Name: "NaN", Type: { SpecialType: SpecialType.System_Single or SpecialType.System_Double } type })
Microsoft.NetCore.Analyzers\Runtime\UseAsyncMethodInAsyncContext.cs (1)
91INamedTypeSymbol intType = context.Compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.cs (1)
87INamedTypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
Microsoft.NetCore.Analyzers\Runtime\UseExceptionThrowHelpers.cs (3)
106INamedTypeSymbol stringType = context.Compilation.GetSpecialType(SpecialType.System_String); 107INamedTypeSymbol objectType = context.Compilation.GetSpecialType(SpecialType.System_Object); 438parameterReferenceOperation.Type?.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Runtime\UseOrdinalStringComparison.cs (14)
55methodSymbol.ContainingType.SpecialType == SpecialType.System_String && 105return methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_Object; 108return methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 125return methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 126methodSymbol.Parameters[1].Type.SpecialType == SpecialType.System_String && 130return methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 131methodSymbol.Parameters[1].Type.SpecialType == SpecialType.System_Int32 && 132methodSymbol.Parameters[2].Type.SpecialType == SpecialType.System_String && 133methodSymbol.Parameters[3].Type.SpecialType == SpecialType.System_Int32 && 134methodSymbol.Parameters[4].Type.SpecialType == SpecialType.System_Int32 && 144return methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_Object && 145methodSymbol.Parameters[1].Type.SpecialType == SpecialType.System_Object; 148return methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 149methodSymbol.Parameters[1].Type.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Runtime\UseOrdinalStringComparison.Fixer.cs (10)
131return parameters[0].Type.SpecialType == SpecialType.System_String; 133return parameters[0].Type.SpecialType == SpecialType.System_String && 134parameters[1].Type.SpecialType == SpecialType.System_String; 143return parameters[0].Type.SpecialType == SpecialType.System_String && 144parameters[1].Type.SpecialType == SpecialType.System_String; 146return parameters[0].Type.SpecialType == SpecialType.System_String && 147parameters[1].Type.SpecialType == SpecialType.System_Int32 && 148parameters[2].Type.SpecialType == SpecialType.System_String && 149parameters[3].Type.SpecialType == SpecialType.System_Int32 && 150parameters[4].Type.SpecialType == SpecialType.System_Int32;
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.cs (8)
89case SpecialType.System_String: 90case SpecialType.System_Char when value is ILiteralOperation: 155if (conversion.Type?.SpecialType is SpecialType.System_Object) 167if (conversion.Type?.SpecialType is SpecialType.System_Object or SpecialType.System_String) 194var stringType = compilation.GetSpecialType(SpecialType.System_String); 195var charType = compilation.GetSpecialType(SpecialType.System_Char); 212var intParamInfo = ParameterInfo.GetParameterInfo(compilation.GetSpecialType(SpecialType.System_Int32));
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.Fixer.cs (1)
174else if (value.Type?.SpecialType == SpecialType.System_Char &&
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.cs (3)
104var stringType = compilation.GetSpecialType(SpecialType.System_String); 105var boolType = compilation.GetSpecialType(SpecialType.System_Boolean); 131var intType = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.NetCore.Analyzers\Security\DoNotAddSchemaByURL.cs (1)
59methodSymbol.Parameters[1].Type.SpecialType == SpecialType.System_String)
Microsoft.NetCore.Analyzers\Security\DoNotAlwaysSkipTokenValidationInDelegates.cs (6)
52var nullableDateTime = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(compilation.GetSpecialType(SpecialType.System_DateTime)); 53var stringSymbol = compilation.GetSpecialType(SpecialType.System_String); 54var ienumString = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(stringSymbol); 144if (methodSymbol.ReturnType.SpecialType != SpecialType.System_Boolean) 172if (methodSymbol.ReturnType.SpecialType != SpecialType.System_Boolean)
Microsoft.NetCore.Analyzers\Security\DoNotDisableCertificateValidation.cs (2)
48var obj = compilation.GetSpecialType(SpecialType.System_Object); 128if (methodSymbol.ReturnType.SpecialType != SpecialType.System_Boolean)
Microsoft.NetCore.Analyzers\Security\DoNotInstallRootCert.cs (1)
111else if (constructorMethod.Parameters[0].Type.SpecialType == SpecialType.System_String)
Microsoft.NetCore.Analyzers\Security\DoNotSetSwitch.cs (2)
87methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 88methodSymbol.Parameters[1].Type.SpecialType == SpecialType.System_Boolean);
Microsoft.NetCore.Analyzers\Security\DoNotUseDSA.cs (2)
131parameter.Type.SpecialType == SpecialType.System_String && 147firstParameter.Type.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (1)
106constructorMethod.Parameters[2].Type.SpecialType == SpecialType.System_Int32)
Microsoft.NetCore.Analyzers\Security\SetViewStateUserKey.cs (1)
89propertyReferenceOperation.Property.Type.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Security\SourceTriggeredTaintedDataAnalyzerBase.cs (1)
453method.Parameters.Any(parameter => parameter.Type.SpecialType == SpecialType.System_String))
Microsoft.NetCore.Analyzers\Security\UseContainerLevelAccessPolicy.cs (1)
128s.Parameter.Type.SpecialType == SpecialType.System_String);
Microsoft.NetCore.Analyzers\Security\UseRSAWithSufficientKeySize.cs (3)
90arguments[0].Parameter?.Type.SpecialType == SpecialType.System_Int32 && 129arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String && 145arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String &&
Microsoft.NetCore.Analyzers\Tasks\DoNotCreateTaskCompletionSourceWithWrongArguments.cs (1)
75targetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
Microsoft.NetCore.Analyzers\Usage\DoNotPassNonNullableValueToArgumentNullExceptionThrowIfNull.cs (1)
51.FirstOrDefault(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, _]);
Microsoft.NetCore.Analyzers\Usage\ProvideCorrectArgumentToEnumHasFlag.cs (1)
48if (invocation.TargetMethod.ContainingType.SpecialType == SpecialType.System_Enum &&
Microsoft.NetFramework.Analyzers\Helpers\CompilationSecurityTypes.cs (1)
37SystemObject = compilation.GetSpecialType(SpecialType.System_Object);
Microsoft.NetFramework.Analyzers\Helpers\SecurityDiagnosticHelpers.cs (1)
294IAssemblySymbol mscorlibAssembly = compilation.GetSpecialType(SpecialType.System_String).ContainingAssembly;
Microsoft.NetFramework.Analyzers\MarkVerbHandlersWithValidateAntiforgeryTokenAnalyzer.MvcAttributeSymbols.cs (1)
98&& parameterArrayType.ElementType.SpecialType == SpecialType.System_String)
src\40daf5e1cab76dff\HardcodedBytesSources.cs (4)
49arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 62arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 78arrayTypeSymbol.ElementType.SpecialType == SpecialType.System_Char, 87arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String,
src\40daf5e1cab76dff\HardcodedSymmetricAlgorithmKeysSources.cs (4)
58arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 71arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 88arrayTypeSymbol.ElementType.SpecialType == SpecialType.System_Char, 95arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String,
src\40daf5e1cab76dff\StringTransferSources.cs (7)
37(firstParameter.Type.SpecialType == SpecialType.System_String || 38firstParameter.Type.SpecialType == SpecialType.System_Char || 41arrayType.ElementType.SpecialType == SpecialType.System_Char) || 43pointerType.PointedAtType.SpecialType == SpecialType.System_Char)), 86(secondParameter.Type.SpecialType == SpecialType.System_String || 87secondParameter.Type.SpecialType == SpecialType.System_Char || 90arrayType.ElementType.SpecialType == SpecialType.System_Char)),
src\40daf5e1cab76dff\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
696&& taintedArgument.Parameter.Type.SpecialType == SpecialType.System_String)
src\440320f3f10733a8\ValueContentAbstractValue.cs (42)
46case SpecialType.System_Byte: 47case SpecialType.System_Double: 48case SpecialType.System_Int16: 49case SpecialType.System_Int32: 50case SpecialType.System_Int64: 51case SpecialType.System_UInt16: 52case SpecialType.System_UInt32: 53case SpecialType.System_UInt64: 54case SpecialType.System_SByte: 55case SpecialType.System_Single: 64case SpecialType.System_String: 72case SpecialType.System_Boolean: 301case SpecialType.System_String: 302return type2.SpecialType == SpecialType.System_String && 305case SpecialType.System_Char: 306return type2.SpecialType == SpecialType.System_Char && 309case SpecialType.System_Boolean: 310return type2.SpecialType == SpecialType.System_Boolean && 313case SpecialType.System_Byte: 314case SpecialType.System_Int16: 315case SpecialType.System_Int32: 316case SpecialType.System_Int64: 317case SpecialType.System_UInt16: 318case SpecialType.System_UInt32: 319case SpecialType.System_SByte: 320case SpecialType.System_UInt64: 327case SpecialType.System_SByte: 331case SpecialType.System_Int16: 335case SpecialType.System_Int32: 339case SpecialType.System_Int64: 343case SpecialType.System_Byte: 347case SpecialType.System_UInt16: 351case SpecialType.System_UInt32: 355case SpecialType.System_UInt64: 359case SpecialType.System_Boolean: 367case SpecialType.System_Double: 368case SpecialType.System_Single: 371case SpecialType.System_Single: 372case SpecialType.System_Double: 377case SpecialType.System_Single: 381case SpecialType.System_Double: 385case SpecialType.System_Boolean:
src\440320f3f10733a8\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (2)
243var incrementValueType = WellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Int32); 261operation.Field.ContainingType.SpecialType == SpecialType.System_String)
src\afc74d572e54ec72\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (2)
191invocation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Boolean && 341invocation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Boolean)
src\ffd9070534249528\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (2)
999method.ContainingType.SpecialType != SpecialType.None || 1020(symbol.ContainingType.SpecialType != SpecialType.None ||
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
338(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 372SpecialType.System_Boolean 373or SpecialType.System_Byte 374or SpecialType.System_Char 375or SpecialType.System_Double 376or SpecialType.System_Int16 377or SpecialType.System_Int32 378or SpecialType.System_Int64 379or SpecialType.System_UInt16 380or SpecialType.System_UInt32 381or SpecialType.System_UInt64 382or SpecialType.System_IntPtr 383or SpecialType.System_UIntPtr 384or SpecialType.System_SByte 385or SpecialType.System_Single 386or SpecialType.System_String 387or SpecialType.System_Object 388or SpecialType.System_ValueType 389or SpecialType.System_Void => true,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\DiagnosticHelpers.cs (11)
10public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 18case SpecialType.System_Int16: 22case SpecialType.System_Int32: 26case SpecialType.System_Int64: 30case SpecialType.System_UInt16: 34case SpecialType.System_UInt32: 38case SpecialType.System_UInt64: 42case SpecialType.System_Byte: 46case SpecialType.System_SByte: 50case SpecialType.System_Char: 54case SpecialType.System_Boolean:
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
102compilation.GetSpecialType(SpecialType.System_Object),
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\CompilationExtensions.cs (1)
75var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (22)
25method.ReturnType.SpecialType == SpecialType.System_Boolean && 27method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 37method.ContainingType.SpecialType == SpecialType.System_Object && 40method.ReturnType.SpecialType == SpecialType.System_Boolean && 42method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 52method.ContainingType.SpecialType == SpecialType.System_Object && 54method.ReturnType.SpecialType == SpecialType.System_Boolean && 55method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 56method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 68method.ReturnType.SpecialType == SpecialType.System_Int32 && 80method.ReturnType.SpecialType == SpecialType.System_String && 94if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 122if (method.ContainingType.SpecialType == SpecialType.System_Object) 138return overridden.ContainingType.SpecialType == SpecialType.System_Object; // it is object.Finalize 245parameter.Type.SpecialType == SpecialType.System_Boolean && 294method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 392method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 524method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 538method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 633method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 646method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 711method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
147if (symbol.BaseType == null || symbol.BaseType.SpecialType != SpecialType.System_Object || !symbol.AllInterfaces.IsDefaultOrEmpty)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
112if (constantValueType.SpecialType is SpecialType.System_Double or SpecialType.System_Single)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
28|| property.Type?.SpecialType != SpecialType.System_Boolean)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
312public static IEnumerable<IParameterSymbol> GetParametersOfType(this IEnumerable<IParameterSymbol> parameters, SpecialType specialType) 425var @object = compilation.GetSpecialType(SpecialType.System_Object);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (17)
28SpecialType.System_Boolean 29or SpecialType.System_Byte 30or SpecialType.System_Char 31or SpecialType.System_Double 32or SpecialType.System_Int16 33or SpecialType.System_Int32 34or SpecialType.System_Int64 35or SpecialType.System_UInt16 36or SpecialType.System_UInt32 37or SpecialType.System_UInt64 38or SpecialType.System_SByte 39or SpecialType.System_Single 40or SpecialType.System_String => true, 294=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 304=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T; 307=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 313=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntity.cs (2)
294=> Type.SpecialType == SpecialType.System_Boolean || 296Type.Language == LanguageNames.VisualBasic && Type.SpecialType == SpecialType.System_Object;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (1)
414type ??= _wellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Object);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (7)
347method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 744if (branch.BranchValue.Type?.SpecialType == SpecialType.System_Boolean && 990var validationMethods = requiresMethods.Concat(assumeMethods).Concat(assertMethods).OfType<IMethodSymbol>().Where(m => m.IsStatic && m.ReturnsVoid && !m.Parameters.IsEmpty && (m.Parameters[0].Type.SpecialType == SpecialType.System_Boolean)); 1694if (invocation.Type?.SpecialType != SpecialType.System_Boolean) 1858operation.Type?.SpecialType == SpecialType.System_Boolean && 2405argument.Parameter?.Type.SpecialType == SpecialType.System_Object) 3233operation.Type?.SpecialType == SpecialType.System_Boolean &&
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (1)
53nestedRegion.ExceptionType.SpecialType == SpecialType.System_Object ||
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
Microsoft.CodeAnalysis.Razor.Compiler (15)
CSharp\CompilationExtensions.cs (2)
43var byteType = compilation.GetSpecialType(SpecialType.System_Byte); 75var stringType = compilation.GetSpecialType(SpecialType.System_String);
CSharp\CompilationTagHelperFeature.cs (1)
40var @string = compilation.GetSpecialType(SpecialType.System_String);
CSharp\DefaultTagHelperDescriptorFactory.cs (2)
292if (dictionaryTypeArguments is not [{ SpecialType: SpecialType.System_String }, ..]) 387=> GetDictionaryArgumentTypes(property) is [{ SpecialType: SpecialType.System_String }, ..];
Language\TagHelpers\Producers\ComponentTagHelperProducer.cs (4)
34compilation.GetSpecialType(SpecialType.System_String), 35compilation.GetSpecialType(SpecialType.System_Object)); 318if (property.Type.SpecialType == SpecialType.System_String) 468Type.SpecialType: SpecialType.System_Boolean,
Mvc.Version1_X\ViewComponentTagHelperDescriptorFactory.cs (2)
135if (returnType.SpecialType == SpecialType.System_Void) 228if (dictionaryType == null || dictionaryType.TypeArguments[0].SpecialType != SpecialType.System_String)
Mvc.Version2_X\ViewComponentTagHelperDescriptorFactory.cs (2)
129if (returnType.SpecialType == SpecialType.System_Void) 243if (dictionaryType == null || dictionaryType.TypeArguments[0].SpecialType != SpecialType.System_String)
Mvc\ViewComponentTagHelperDescriptorFactory.cs (2)
129if (returnType.SpecialType == SpecialType.System_Void) 246if (dictionaryType == null || dictionaryType.TypeArguments[0].SpecialType != SpecialType.System_String)
Microsoft.CodeAnalysis.ResxSourceGenerator (362)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
339(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 373SpecialType.System_Boolean 374or SpecialType.System_Byte 375or SpecialType.System_Char 376or SpecialType.System_Double 377or SpecialType.System_Int16 378or SpecialType.System_Int32 379or SpecialType.System_Int64 380or SpecialType.System_UInt16 381or SpecialType.System_UInt32 382or SpecialType.System_UInt64 383or SpecialType.System_IntPtr 384or SpecialType.System_UIntPtr 385or SpecialType.System_SByte 386or SpecialType.System_Single 387or SpecialType.System_String 388or SpecialType.System_Object 389or SpecialType.System_ValueType 390or SpecialType.System_Void => true,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 185Name: "Dispose", MethodKind: MethodKind.Ordinary, ReturnsVoid: true, Parameters: [{ Type.SpecialType: SpecialType.System_Boolean, RefKind: RefKind.None }] 230method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 397method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 411method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 490method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 530method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 249=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 257=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 263=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.Scripting (38)
Hosting\ObjectFormatter\CommonPrimitiveFormatter.cs (18)
63case SpecialType.System_Int32: 66case SpecialType.System_String: 69case SpecialType.System_Boolean: 72case SpecialType.System_Char: 75case SpecialType.System_Int64: 78case SpecialType.System_Double: 81case SpecialType.System_Byte: 84case SpecialType.System_Decimal: 87case SpecialType.System_UInt32: 90case SpecialType.System_UInt64: 93case SpecialType.System_Single: 96case SpecialType.System_Int16: 99case SpecialType.System_UInt16: 102case SpecialType.System_DateTime: 105case SpecialType.System_SByte: 108case SpecialType.System_Object: 109case SpecialType.System_Void: 110case SpecialType.None:
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
21protected abstract string GetPrimitiveTypeName(SpecialType type);
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (19)
275internal static SpecialType GetPrimitiveSpecialType(Type type) 281return SpecialType.System_Int32; 286return SpecialType.System_String; 291return SpecialType.System_Boolean; 296return SpecialType.System_Char; 301return SpecialType.System_Int64; 306return SpecialType.System_Double; 311return SpecialType.System_Byte; 316return SpecialType.System_Decimal; 321return SpecialType.System_UInt32; 326return SpecialType.System_UInt64; 331return SpecialType.System_Single; 336return SpecialType.System_Int16; 341return SpecialType.System_UInt16; 346return SpecialType.System_DateTime; 351return SpecialType.System_SByte; 356return SpecialType.System_Object; 361return SpecialType.System_Void; 364return SpecialType.None;
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (36)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\BasicOverrideEqualsOnOverloadingOperatorEquals.vb (1)
43If type.TypeKind = TypeKind.Interface OrElse type.IsImplicitClass OrElse type.SpecialType = SpecialType.System_Object Then
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\BasicOverrideGetHashCodeOnOverridingEquals.vb (1)
44If type.TypeKind = TypeKind.Interface OrElse type.IsImplicitClass OrElse type.SpecialType = SpecialType.System_Object Then
Microsoft.NetCore.Analyzers\Runtime\BasicForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.vb (33)
117If symbol.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 132Case SpecialType.System_Object 134Case SpecialType.System_Boolean 136Case SpecialType.System_Char 138Case SpecialType.System_SByte 140Case SpecialType.System_Byte 142Case SpecialType.System_Int16 144Case SpecialType.System_UInt16 146Case SpecialType.System_Int32 148Case SpecialType.System_Int64 150Case SpecialType.System_UInt32 152Case SpecialType.System_UInt64 154Case SpecialType.System_Decimal 156Case SpecialType.System_Single 158Case SpecialType.System_Double 160Case SpecialType.System_String 162Case SpecialType.System_DateTime 242Case SpecialType.System_Boolean, 243SpecialType.System_Byte, 244SpecialType.System_SByte, 245SpecialType.System_Int16, 246SpecialType.System_UInt16, 247SpecialType.System_Int32, 248SpecialType.System_UInt32, 249SpecialType.System_Int64, 250SpecialType.System_UInt64, 251SpecialType.System_Single, 252SpecialType.System_Double, 253SpecialType.System_Decimal, 254SpecialType.System_DateTime, 255SpecialType.System_Char, 256SpecialType.System_String, 257SpecialType.System_Object
Microsoft.NetCore.Analyzers\Runtime\BasicUseSpanBasedStringConcat.vb (1)
36If conversion IsNot Nothing AndAlso conversion.Type.SpecialType = SpecialType.System_Object AndAlso
Microsoft.CodeAnalysis.Workspaces (405)
Editing\SyntaxGenerator.cs (2)
794underlyingType: type.EnumUnderlyingType is null or { SpecialType: SpecialType.System_Int32 } 2007public abstract SyntaxNode TypeExpression(SpecialType specialType);
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
301typeNameConstant.Type.SpecialType != SpecialType.System_String ||
FindSymbols\FindReferences\DependentTypeFinder.cs (5)
216case SpecialType.System_Object: 220predicate: static n => n.BaseType?.SpecialType == SpecialType.System_Object).ConfigureAwait(false); 222case SpecialType.System_ValueType: 226case SpecialType.System_Enum: 230case SpecialType.System_MulticastDelegate:
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (1)
200if (symbol is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, TypeArguments: [var valueType] })
Recommendations\AbstractRecommendationService.cs (1)
76if (namedType.SpecialType == SpecialType.System_Void)
Recommendations\AbstractRecommendationServiceRunner.cs (9)
305AddSpecialTypeSymbolAndItsAliases(nameof(Byte), SpecialType.System_Byte); 306AddSpecialTypeSymbolAndItsAliases(nameof(SByte), SpecialType.System_SByte); 307AddSpecialTypeSymbolAndItsAliases(nameof(Int16), SpecialType.System_Int16); 308AddSpecialTypeSymbolAndItsAliases(nameof(UInt16), SpecialType.System_UInt16); 309AddSpecialTypeSymbolAndItsAliases(nameof(Int32), SpecialType.System_Int32); 310AddSpecialTypeSymbolAndItsAliases(nameof(UInt32), SpecialType.System_UInt32); 311AddSpecialTypeSymbolAndItsAliases(nameof(Int64), SpecialType.System_Int64); 312AddSpecialTypeSymbolAndItsAliases(nameof(UInt64), SpecialType.System_UInt64); 316void AddSpecialTypeSymbolAndItsAliases(string name, SpecialType specialType)
Shared\Extensions\ITypeSymbolExtensions.cs (4)
178return type.OriginalDefinition is { SpecialType: SpecialType.System_Collections_Generic_IEnumerable_T or SpecialType.System_Collections_IEnumerable } || 179type.AllInterfaces.Any(s => s.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T or SpecialType.System_Collections_IEnumerable);
Shared\Utilities\EditorBrowsableHelpers.cs (1)
100var shortType = compilation.GetSpecialType(SpecialType.System_Int16);
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
14protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 77var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 137IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 171var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 187var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
21SpecialType specialType, 25public SpecialType SpecialType { get; protected set; } = specialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
58parameterType ??= compilation.GetSpecialType(SpecialType.System_Object); 66returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 436case SpecialType.System_Boolean: 437case SpecialType.System_Char: 438case SpecialType.System_SByte: 439case SpecialType.System_Byte: 440case SpecialType.System_Int16: 441case SpecialType.System_UInt16: 442case SpecialType.System_Int32: 443case SpecialType.System_UInt32: 444case SpecialType.System_Int64: 445case SpecialType.System_UInt64: 446case SpecialType.System_Decimal: 447case SpecialType.System_Single: 448case SpecialType.System_Double: 449case SpecialType.System_String: 450case SpecialType.System_DateTime: 468method.ReturnType.SpecialType == SpecialType.System_Boolean && 469method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 182else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 303SpecialType? patternValueType) 305if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 445if (containingType?.SpecialType == SpecialType.System_Array || 446containingType?.SpecialType == SpecialType.System_String) 456case SpecialType.System_Byte: 457case SpecialType.System_UInt16: 458case SpecialType.System_UInt32: 459case SpecialType.System_UInt64: 501SpecialType? patternValueType) 508if (patternValueType == SpecialType.System_Boolean)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.Diagnostics.DataContractReader.DataGenerator (14)
Parser.cs (14)
444named.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T && 475SpecialType.System_Boolean => "uint8", 476SpecialType.System_SByte => "int8", 477SpecialType.System_Byte => "uint8", 478SpecialType.System_Char => "uint16", 479SpecialType.System_Int16 => "int16", 480SpecialType.System_UInt16 => "uint16", 481SpecialType.System_Int32 => "int32", 482SpecialType.System_UInt32 => "uint32", 483SpecialType.System_Int64 => "int64", 484SpecialType.System_UInt64 => "uint64", 485SpecialType.System_IntPtr => "nint", 486SpecialType.System_UIntPtr => "nuint", 487SpecialType.System_String => "string",
Microsoft.DotNet.ApiCompatibility (1)
ApiStabilityClassifier.cs (1)
88attribute.AttributeConstructor.Parameters is [{ Type.SpecialType: SpecialType.System_String }];
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\AppContextDefaultsAnalyzer.cs (2)
147if (methodSym.Parameters[0].Type.SpecialType != SpecialType.System_String) 150if (methodSym.Parameters[1].Type.SpecialType != SpecialType.System_Boolean)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (45)
ConfigurationBindingGenerator.Parser.cs (24)
68type.SpecialType is SpecialType.System_Object or SpecialType.System_Void || 227unboundGeneric.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 239if (type is IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte }) 257SpecialType specialType = namedType.SpecialType; 261case SpecialType.System_String: 262case SpecialType.System_Object: 267case SpecialType.System_Boolean: 268case SpecialType.System_Char: 273case SpecialType.System_Single: 274case SpecialType.System_Double: 275case SpecialType.System_Decimal: 280case SpecialType.System_Byte: 281case SpecialType.System_Int16: 282case SpecialType.System_Int32: 283case SpecialType.System_Int64: 284case SpecialType.System_SByte: 285case SpecialType.System_UInt16: 286case SpecialType.System_UInt32: 287case SpecialType.System_UInt64: 292case SpecialType.System_DateTime: 297case SpecialType.None: 567if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1092if (firstParam.Name == "argument" && firstParam.Type.SpecialType == SpecialType.System_Object
Emitter\CoreBindingHelpers.cs (1)
1026bool treatEmptyValueAsNull = member.TypeRef.SpecialType is SpecialType.System_Nullable_T;
Parser\ConfigurationBinder.cs (5)
58if (@params[1].Type.SpecialType is SpecialType.System_String) 82if (instanceArg.Parameter?.Type.SpecialType is not SpecialType.System_Object) 200if (paramCount > 3 || @params[1].Type.SpecialType is not SpecialType.System_String) 222if (@params[2].Type.SpecialType is not SpecialType.System_String) 234else if (paramCount is 4 && @params[3].Type.SpecialType is SpecialType.System_Object)
Parser\KnownTypeSymbols.cs (9)
75String = compilation.GetSpecialType(SpecialType.System_String); 103IEnumerable = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 109GenericICollection = compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T); 120GenericIEnumerable_Unbound = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).ConstructUnboundGenericType(); 121GenericIList_Unbound = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IList_T).ConstructUnboundGenericType(); 129Enum = compilation.GetSpecialType(SpecialType.System_Enum); 135IntPtr = Compilation.GetSpecialType(SpecialType.System_IntPtr); 136UIntPtr = Compilation.GetSpecialType(SpecialType.System_UIntPtr); 137Delegate = Compilation.GetSpecialType(SpecialType.System_Delegate);
Parser\OptionsBuilderConfigurationExtensions.cs (1)
79@params[1].Type.SpecialType is SpecialType.System_String &&
Parser\OptionsConfigurationServiceCollectionExtensions.cs (2)
44if (secondParamType.SpecialType is SpecialType.System_String && 60@params[1].Type.SpecialType is SpecialType.System_String &&
Specs\Types\TypeSpec.cs (1)
24IsExactIEnumerableOfT = namedTypeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T;
src\runtime\src\libraries\Common\src\SourceGenerators\TypeRef.cs (2)
34public SpecialType SpecialType { get; } 36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;
Microsoft.Extensions.Logging.Generators (4)
LoggerMessageGenerator.Parser.cs (2)
152if (items[0].Type.SpecialType == SpecialType.System_String) 697while (currentClassType is { SpecialType: not SpecialType.System_Object })
LoggerMessageGenerator.Roslyn4.0.cs (2)
51INamedTypeSymbol? enumerableSymbol = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 52INamedTypeSymbol? stringSymbol = compilation.GetSpecialType(SpecialType.System_String);
Microsoft.Extensions.Options.SourceGeneration (39)
OptionsSourceGenContext.cs (15)
49SpecialType.System_Boolean => true, 50SpecialType.System_Byte => true, 51SpecialType.System_Char => true, 52SpecialType.System_DateTime => true, 53SpecialType.System_Decimal => true, 54SpecialType.System_Double => true, 55SpecialType.System_Int16 => true, 56SpecialType.System_Int32 => true, 57SpecialType.System_Int64 => true, 58SpecialType.System_SByte => true, 59SpecialType.System_Single => true, 60SpecialType.System_UInt16 => true, 61SpecialType.System_UInt32 => true, 62SpecialType.System_UInt64 => true, 63SpecialType.System_String => true,
Parser.cs (16)
307|| method.Parameters[0].Type.SpecialType != SpecialType.System_String 352if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 367if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T))) 380if (modelType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 389while (baseType is not null && baseType.SpecialType != SpecialType.System_Object 672if (transValidatorTypeName == null && speculate && memberType.SpecialType == SpecialType.None) 685if (enumerationValidatorTypeName == null && speculate && memberType.SpecialType != SpecialType.System_String) 726if (memberType.SpecialType == SpecialType.System_String || ConvertTo(memberType, _symbolHolder.ICollectionSymbol)) 730else if (ParserUtilities.TypeHasProperty(memberType, "Count", SpecialType.System_Int32)) 748if (constructorParameters.Length == 1 && constructorParameters[0].Name == "otherProperty" && constructorParameters[0].Type.SpecialType == SpecialType.System_String) 763if (typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 795(SymbolEqualityComparer.Default.Equals(typeSymbol, _symbolHolder.TimeSpanSymbol) || typeSymbol.SpecialType == SpecialType.System_String)) 814if (mt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1009if (type.SpecialType == SpecialType.System_Boolean) 1020if (type.SpecialType == SpecialType.System_String) 1025if (type.SpecialType == SpecialType.System_Char)
ParserUtilities.cs (5)
71internal static bool TypeHasProperty(ITypeSymbol typeSymbol, string propertyName, SpecialType returnType) 76if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 89} while (type is not null && type.SpecialType != SpecialType.System_Object); 108=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
SymbolLoader.cs (3)
105method.ReturnType.SpecialType == SpecialType.System_String && 107method.Parameters[0].Type.SpecialType == SpecialType.System_String && 108method.Parameters[1].Type.SpecialType == SpecialType.System_String);
Microsoft.Extensions.Validation.ValidationsGenerator (16)
Analyzers\ValidationsDiagnosticAnalyzer.cs (2)
110if (currentType.SpecialType != SpecialType.None || currentType.IsExemptType(wellKnownTypes)) 238if (parameter.Type.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T)
Extensions\ITypeSymbolExtensions.cs (4)
19if (type.SpecialType == SpecialType.System_String) 36if (type.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 44if (iface.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 73if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T &&
Parsers\ValidationsGenerator.TypesParser.cs (2)
68if (typeSymbol.SpecialType != SpecialType.None) 101while (current != null && current.SpecialType != SpecialType.System_Object)
src\aspnetcore\src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
40if (typeSymbol.SpecialType == SpecialType.System_String) 98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 100methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 110methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (2)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T) 317if (typeSymbol.OriginalDefinition?.SpecialType == SpecialType.System_Nullable_T &&
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (1)
58public INamedTypeSymbol Get(SpecialType type)
Microsoft.Gen.BuildMetadata (2)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Logging (13)
Parsing\AttributeProcessors.cs (1)
50else if (a.Type?.SpecialType == SpecialType.System_Int32)
Parsing\Parser.cs (1)
720while (currentClassType is { SpecialType: not SpecialType.System_Object })
Parsing\Parser.LogProperties.cs (1)
93while (namedType != null && namedType.SpecialType != SpecialType.System_Object)
Parsing\Parser.Records.cs (1)
35while (namedType != null && namedType.SpecialType != SpecialType.System_Object)
Parsing\SymbolLoader.cs (1)
89var enumerableSymbol = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable);
Parsing\TypeSymbolExtensions.cs (6)
14&& sym.SpecialType != SpecialType.System_String; 51&& ts.Parameters[0].Type.SpecialType == SpecialType.System_String 71=> typeSymbol.SpecialType != SpecialType.None || 72typeSymbol.OriginalDefinition.SpecialType != SpecialType.None || 80while (current != null && current.SpecialType != SpecialType.System_Object) 95if (sym is INamedTypeSymbol namedTypeSymbol && namedTypeSymbol.IsGenericType && namedTypeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Logging.Unit.Tests (9)
LogParserUtilitiesTests.cs (5)
24typeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.System_Nullable_T); 29anotherTypeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.None); 39typeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.None); 99.Returns(SpecialType.None); 156paramTypeMock.SetupGet(x => x.SpecialType).Returns(SpecialType.None);
TypeSymbolExtensionsTests.cs (4)
286INamedTypeSymbol nullableType = compilation.GetSpecialType(SpecialType.System_Nullable_T); 287INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 298INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 308INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.Gen.MetadataExtractor (17)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (14)
35private static readonly HashSet<SpecialType> _allowedGenericAttributeTypeArgs = 37SpecialType.System_Byte, 38SpecialType.System_Int16, 39SpecialType.System_Int32, 40SpecialType.System_Int64, 41SpecialType.System_Decimal, 42SpecialType.System_Single, 43SpecialType.System_Double 578if (returnType.SpecialType != SpecialType.None || 699SpecialType specialType; 732if (specialType == SpecialType.None) 771if (specialType == SpecialType.System_String) 800else if (specialType == SpecialType.None) 827if (kind == TypeKind.Struct && specialType == SpecialType.None)
src\Generators\Microsoft.Gen.Metrics\SymbolLoader.cs (1)
38var longType = compilation.GetSpecialType(SpecialType.System_Int64);
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Metrics (17)
Parser.cs (14)
35private static readonly HashSet<SpecialType> _allowedGenericAttributeTypeArgs = 37SpecialType.System_Byte, 38SpecialType.System_Int16, 39SpecialType.System_Int32, 40SpecialType.System_Int64, 41SpecialType.System_Decimal, 42SpecialType.System_Single, 43SpecialType.System_Double 578if (returnType.SpecialType != SpecialType.None || 699SpecialType specialType; 732if (specialType == SpecialType.None) 771if (specialType == SpecialType.System_String) 800else if (specialType == SpecialType.None) 827if (kind == TypeKind.Struct && specialType == SpecialType.None)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
SymbolLoader.cs (1)
38var longType = compilation.GetSpecialType(SpecialType.System_Int64);
Microsoft.Gen.MetricsReports (17)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (14)
35private static readonly HashSet<SpecialType> _allowedGenericAttributeTypeArgs = 37SpecialType.System_Byte, 38SpecialType.System_Int16, 39SpecialType.System_Int32, 40SpecialType.System_Int64, 41SpecialType.System_Decimal, 42SpecialType.System_Single, 43SpecialType.System_Double 578if (returnType.SpecialType != SpecialType.None || 699SpecialType specialType; 732if (specialType == SpecialType.None) 771if (specialType == SpecialType.System_String) 800else if (specialType == SpecialType.None) 827if (kind == TypeKind.Struct && specialType == SpecialType.None)
src\Generators\Microsoft.Gen.Metrics\SymbolLoader.cs (1)
38var longType = compilation.GetSpecialType(SpecialType.System_Int64);
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Interop.ComInterfaceGenerator (9)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (3)
219public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_String; 226public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type is { TypeKind: TypeKind.Array or TypeKind.Delegate } or { SpecialType: SpecialType.System_Array or SpecialType.System_Object };
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (2)
146if (operand is IConversionOperation { Type.SpecialType: SpecialType.System_Object } objConversion) 174if (operand is IConversionOperation { Type.SpecialType: SpecialType.System_Object } objConversion)
ComInterfaceGenerator.cs (2)
246&& ((managedReturnInfo.ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Int32 or SpecialType.System_Enum } or EnumTypeInfo
parent\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
240if (parameter.Type.SpecialType == SpecialType.System_Boolean 249if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean
Microsoft.Interop.JavaScript.JSImportGenerator (15)
JSManagedTypeInfo.cs (15)
17case { SpecialType: SpecialType.System_Void }: 19case { SpecialType: SpecialType.System_Boolean }: 21case { SpecialType: SpecialType.System_Byte }: 23case { SpecialType: SpecialType.System_Char }: 25case { SpecialType: SpecialType.System_Int16 }: 27case { SpecialType: SpecialType.System_Int32 }: 29case { SpecialType: SpecialType.System_Int64 }: 31case { SpecialType: SpecialType.System_Single }: 33case { SpecialType: SpecialType.System_Double }: 35case { SpecialType: SpecialType.System_IntPtr }: 36case IPointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void }: 38case { SpecialType: SpecialType.System_DateTime }: 44case { SpecialType: SpecialType.System_Object }: 46case { SpecialType: SpecialType.System_String }: 52case INamedTypeSymbol { ConstructedFrom.SpecialType: SpecialType.System_Nullable_T } nullable:
Microsoft.Interop.LibraryImportGenerator (20)
Analyzers\ConvertToLibraryImportFixer.cs (5)
263editor.Generator.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32))); 704if (param.Type.SpecialType is SpecialType.System_String or SpecialType.System_Char) 710return method.ReturnType.SpecialType is SpecialType.System_String or SpecialType.System_Char;
Analyzers\CustomMarshallerAttributeFixer.cs (12)
248gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)), 262gen.ParameterDeclaration("numElements", type: gen.TypeExpression(SpecialType.System_Int32), refKind: RefKind.Out), 278gen.ParameterDeclaration("numElements", type: gen.TypeExpression(SpecialType.System_Int32)), 309gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 325gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 382return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 396return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr); 460gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)), 493gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 507gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 549return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 563return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr);
ErrorHandlingInfoParser.cs (1)
53&& method.ReturnType.SpecialType != SpecialType.System_Void
parent\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
240if (parameter.Type.SpecialType == SpecialType.System_Boolean 249if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelStringMarshallingInfoProvider.cs (1)
26public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_String;
Microsoft.Interop.SourceGeneration (87)
BooleanMarshallingInfoProvider.cs (1)
16public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_Boolean;
CharMarshallingInfoProvider.cs (1)
23public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_Char;
IncrementalGeneratorInitializationContextExtensions.cs (1)
33(context, ct) => SymbolEqualityComparer.Default.Equals(context.Attributes[0].AttributeClass.ContainingAssembly, context.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly))
ManagedToNativeStubGenerator.cs (1)
78HasForwardedTypes |= generator.IsForwarder() && generator is { TypeInfo.ManagedType: not SpecialTypeInfo { SpecialType: Microsoft.CodeAnalysis.SpecialType.System_Void } };
ManagedTypeInfo.cs (13)
35if (type.SpecialType != SpecialType.None) 71public sealed record SpecialTypeInfo(string FullTypeName, string DiagnosticFormattedName, SpecialType SpecialType) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName) 73public static readonly SpecialTypeInfo Byte = new("byte", "byte", SpecialType.System_Byte); 74public static readonly SpecialTypeInfo SByte = new("sbyte", "sbyte", SpecialType.System_SByte); 75public static readonly SpecialTypeInfo Int16 = new("short", "short", SpecialType.System_Int16); 76public static readonly SpecialTypeInfo UInt16 = new("ushort", "ushort", SpecialType.System_UInt16); 77public static readonly SpecialTypeInfo Int32 = new("int", "int", SpecialType.System_Int32); 78public static readonly SpecialTypeInfo UInt32 = new("uint", "uint", SpecialType.System_UInt32); 79public static readonly SpecialTypeInfo Void = new("void", "void", SpecialType.System_Void); 80public static readonly SpecialTypeInfo String = new("string", "string", SpecialType.System_String); 81public static readonly SpecialTypeInfo Boolean = new("bool", "bool", SpecialType.System_Boolean); 82public static readonly SpecialTypeInfo IntPtr = new("nint", "nint", SpecialType.System_IntPtr); 95public sealed record EnumTypeInfo(string FullTypeName, string DiagnosticFormattedName, SpecialType UnderlyingType) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName);
MarshalAsParser.cs (1)
225&& type.SpecialType == SpecialType.System_Object
MarshalAsWithCustomMarshallersParser.cs (3)
62if (elementType.SpecialType == SpecialType.System_String) 83if (type.SpecialType == SpecialType.System_String) 88if (type.SpecialType == SpecialType.System_Object && marshalAsInfo is MarshalAsScalarInfo(UnmanagedType.Struct, _))
MarshallerShape.cs (8)
316&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 327&& m.Parameters[2].Type.SpecialType == SpecialType.System_Int32 357&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 367&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 377&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 397&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 709&& m.Parameters[0].Type.SpecialType == SpecialType.System_Int32 719&& m.Parameters[0].Type.SpecialType == SpecialType.System_Int32
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (1)
95requiresCast = specialType.SpecialType != SpecialType.System_Int32;
Marshalling\BoolMarshaller.cs (1)
26Debug.Assert(info.ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Boolean });
Marshalling\CharMarshaller.cs (1)
33Debug.Assert(info.ManagedType is SpecialTypeInfo {SpecialType: SpecialType.System_Char });
Marshalling\CharMarshallingGeneratorResolver.cs (1)
26if (info.ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Char })
Marshalling\MarshalAsMarshallingGeneratorResolver.cs (21)
41case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_SByte }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I1, _) } 42or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Byte }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U1, _) } 43or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int16 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I2, _) } 44or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt16 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U2, _) } 45or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int32 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I4 or UnmanagedType.Error, _) } 46or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt32 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U4 or UnmanagedType.Error, _) } 47or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int64 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I8, _) } 48or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt64 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U8, _) } 49or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_IntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.SysInt, _) } 50or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UIntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.SysUInt, _) } 51or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Single }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.R4, _) } 52or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Double }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.R8, _) }: 59SpecialType underlyingSpecialType = enumType.UnderlyingType; 60if (underlyingSpecialType == SpecialType.System_Boolean || underlyingSpecialType == SpecialType.System_Char) 75case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.U1, _) }: 77case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.I1, _) }: 79case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.U4, _) }: 81case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.I4 or UnmanagedType.Bool, _) }: 83case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.VariantBool, _) }: 95case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Void } }:
MarshallingAttributeInfo.cs (5)
173SpecialType.System_Void => CreateWellKnownComExceptionMarshallingData(TypeNames.ExceptionAsVoidMarshaller, unmanagedReturnType), 174SpecialType.System_Int32 => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsHResultMarshaller}<int>", unmanagedReturnType), 175SpecialType.System_UInt32 => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsHResultMarshaller}<uint>", unmanagedReturnType), 176SpecialType.System_Single => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsNaNMarshaller}<float>", unmanagedReturnType), 177SpecialType.System_Double => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsNaNMarshaller}<double>", unmanagedReturnType),
StringMarshallingInfoProvider.cs (1)
28public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_String;
TypeSymbolExtensions.cs (27)
62if (t.SpecialType is not SpecialType.None) 81if (t.ContainingAssembly.Equals(compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly, SymbolEqualityComparer.Default)) 168public static bool IsIntegralType(this SpecialType type) 170return type is SpecialType.System_SByte 171or SpecialType.System_Byte 172or SpecialType.System_Int16 173or SpecialType.System_UInt16 174or SpecialType.System_Int32 175or SpecialType.System_UInt32 176or SpecialType.System_Int64 177or SpecialType.System_UInt64 178or SpecialType.System_IntPtr 179or SpecialType.System_UIntPtr; 182public static bool IsAlwaysBlittable(this SpecialType type) 184return type is SpecialType.System_Void 185or SpecialType.System_SByte 186or SpecialType.System_Byte 187or SpecialType.System_Int16 188or SpecialType.System_UInt16 189or SpecialType.System_Int32 190or SpecialType.System_UInt32 191or SpecialType.System_Int64 192or SpecialType.System_UInt64 193or SpecialType.System_IntPtr 194or SpecialType.System_UIntPtr 195or SpecialType.System_Single 196or SpecialType.System_Double;
Microsoft.Maui.Controls.BindingSourceGen (1)
ITypeSymbolExtensions.cs (1)
30 && namedTypeSymbol.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T;
Roslyn.Diagnostics.Analyzers (450)
AbstractDoNotCopyValue.cs (1)
1564if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
AbstractRunIterations`1.cs (1)
117syntaxGenerator.TypeExpression(SpecialType.System_Int32)),
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
339(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 373SpecialType.System_Boolean 374or SpecialType.System_Byte 375or SpecialType.System_Char 376or SpecialType.System_Double 377or SpecialType.System_Int16 378or SpecialType.System_Int32 379or SpecialType.System_Int64 380or SpecialType.System_UInt16 381or SpecialType.System_UInt32 382or SpecialType.System_UInt64 383or SpecialType.System_IntPtr 384or SpecialType.System_UIntPtr 385or SpecialType.System_SByte 386or SpecialType.System_Single 387or SpecialType.System_String 388or SpecialType.System_Object 389or SpecialType.System_ValueType 390or SpecialType.System_Void => true,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 185Name: "Dispose", MethodKind: MethodKind.Ordinary, ReturnsVoid: true, Parameters: [{ Type.SpecialType: SpecialType.System_Boolean, RefKind: RefKind.None }] 230method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 397method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 411method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 490method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 530method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 249=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 257=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 263=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (6)
23is SpecialType.System_Collections_Generic_IEnumerable_T 24or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 25or SpecialType.System_Collections_Generic_IReadOnlyList_T; 31is SpecialType.System_Collections_Generic_ICollection_T 32or SpecialType.System_Collections_Generic_IList_T; 98var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
169if (type.SpecialType == SpecialType.System_String)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
757return symbol is IMethodSymbol { ContainingType.SpecialType: SpecialType.System_Object } 1016if (newReceiverType.SpecialType != SpecialType.None) 1023return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1024SpecialType.System_Delegate or 1025SpecialType.System_Enum or 1026SpecialType.System_String;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
74method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 135methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
675ContainingType.SpecialType: SpecialType.System_Object,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
514.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 519types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 726if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 776ReturnType.SpecialType: SpecialType.System_Boolean,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 269case SpecialType.System_Array or SpecialType.System_ValueType: 272case SpecialType.System_Delegate: 273case SpecialType.System_MulticastDelegate: 274case SpecialType.System_Enum: 287case SpecialType.System_Byte: 288case SpecialType.System_SByte: 289case SpecialType.System_Int16: 290case SpecialType.System_UInt16: 291case SpecialType.System_Int32: 292case SpecialType.System_UInt32: 293case SpecialType.System_Int64: 294case SpecialType.System_UInt64: 295case SpecialType.System_Single: 296case SpecialType.System_Double: 297case SpecialType.System_Decimal: 298case SpecialType.System_IntPtr when type.IsNativeIntegerType: 299case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 381case SpecialType.System_Object: 382case SpecialType.System_Void: 383case SpecialType.System_Boolean: 384case SpecialType.System_SByte: 385case SpecialType.System_Byte: 386case SpecialType.System_Decimal: 387case SpecialType.System_Single: 388case SpecialType.System_Double: 389case SpecialType.System_Int16: 390case SpecialType.System_Int32: 391case SpecialType.System_Int64: 392case SpecialType.System_Char: 393case SpecialType.System_String: 394case SpecialType.System_UInt16: 395case SpecialType.System_UInt32: 396case SpecialType.System_UInt64: 397case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 398case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 409typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 658case SpecialType.System_Boolean: 659case SpecialType.System_Char: 660case SpecialType.System_SByte: 661case SpecialType.System_Byte: 662case SpecialType.System_Int16: 663case SpecialType.System_UInt16: 664case SpecialType.System_Int32: 665case SpecialType.System_UInt32: 666case SpecialType.System_Int64: 667case SpecialType.System_UInt64: 668case SpecialType.System_Decimal: 669case SpecialType.System_Single: 670case SpecialType.System_Double: 673case SpecialType.System_IntPtr: 674case SpecialType.System_UIntPtr: 677case SpecialType.System_DateTime: 801namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
14protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 77var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 137IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 171var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 187var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
21SpecialType specialType, 25public SpecialType SpecialType { get; protected set; } = specialType;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
58parameterType ??= compilation.GetSpecialType(SpecialType.System_Object); 66returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 436case SpecialType.System_Boolean: 437case SpecialType.System_Char: 438case SpecialType.System_SByte: 439case SpecialType.System_Byte: 440case SpecialType.System_Int16: 441case SpecialType.System_UInt16: 442case SpecialType.System_Int32: 443case SpecialType.System_UInt32: 444case SpecialType.System_Int64: 445case SpecialType.System_UInt64: 446case SpecialType.System_Decimal: 447case SpecialType.System_Single: 448case SpecialType.System_Double: 449case SpecialType.System_String: 450case SpecialType.System_DateTime: 468method.ReturnType.SpecialType == SpecialType.System_Boolean && 469method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 182else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 303SpecialType? patternValueType) 305if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 445if (containingType?.SpecialType == SpecialType.System_Array || 446containingType?.SpecialType == SpecialType.System_String) 456case SpecialType.System_Byte: 457case SpecialType.System_UInt16: 458case SpecialType.System_UInt32: 459case SpecialType.System_UInt64: 501SpecialType? patternValueType) 508if (patternValueType == SpecialType.System_Boolean)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Roslyn.Diagnostics.CSharp.Analyzers (96)
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (2)
51if (member is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_Boolean }, { Type.SpecialType: SpecialType.System_String }] } method)
PreferNullLiteral.cs (1)
68|| namedType.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (13)
19case SpecialType.System_Boolean: 20case SpecialType.System_Char: 21case SpecialType.System_SByte: 22case SpecialType.System_Int16: 23case SpecialType.System_Int32: 24case SpecialType.System_Int64: 25case SpecialType.System_Byte: 26case SpecialType.System_UInt16: 27case SpecialType.System_UInt32: 28case SpecialType.System_UInt64: 29case SpecialType.System_Single: 30case SpecialType.System_Double: 33case SpecialType.System_Decimal:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (18)
97while (current is IConversionOperation { Type.SpecialType: SpecialType.System_Delegate or SpecialType.System_MulticastDelegate }) 100if (current is IConversionOperation { Type.SpecialType: SpecialType.System_Object }) 585if (castNode.IsParentKind(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object) 690if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T && 691namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IReadOnlyCollection_T or SpecialType.System_Collections_Generic_IReadOnlyList_T) 697if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T && 698namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IList_T) 704if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T or SpecialType.System_Collections_Generic_IList_T && 769if (current.ContainingType.SpecialType == SpecialType.System_Object) 865=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr; 1083if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 1090else if (binaryOperation.RightOperand.Type?.SpecialType == SpecialType.System_Object && 1293=> type?.SpecialType is SpecialType.System_Double or SpecialType.System_Single; 1579rewrittenType.SpecialType == SpecialType.System_Enum;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
23SpecialType underlyingSpecialType,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (6)
132var isNotSingle = !IsSpecialType(type, SpecialType.System_Single); 143if (value is double && !IsSpecialType(type, SpecialType.System_Double)) 148if (value is uint && !IsSpecialType(type, SpecialType.System_UInt32)) 153if (value is long && !IsSpecialType(type, SpecialType.System_Int64)) 158if (value is ulong && !IsSpecialType(type, SpecialType.System_UInt64)) 167var isNotDecimal = !IsSpecialType(type, SpecialType.System_Decimal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
250var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 321if (namedType is { TypeKind: TypeKind.Class, BaseType: not null, BaseType.SpecialType: not SpecialType.System_Object })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
112targetType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (1)
33if (typeInfo.Type != null && typeInfo.Type.SpecialType == SpecialType.System_Void)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
65if (type.SpecialType != SpecialType.System_Object)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
126syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 220if (symbol.SpecialType == SpecialType.System_Void)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\WithElementSyntaxExtensions.cs (1)
57static m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Int32, Name: "capacity" }]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (12)
275case SpecialType.System_Boolean: 277case SpecialType.System_SByte: 278case SpecialType.System_Byte: 279case SpecialType.System_Int16: 280case SpecialType.System_UInt16: 281case SpecialType.System_Int32: 282case SpecialType.System_UInt32: 283case SpecialType.System_Int64: 284case SpecialType.System_UInt64: 285case SpecialType.System_Decimal: 286case SpecialType.System_Single: 287case SpecialType.System_Double:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (35)
589return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 848return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 972return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 982return CreateResult(SpecialType.System_Boolean); 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); 1070return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1077return CreateResult(SpecialType.System_Boolean); 1110return CreateResult(SpecialType.System_Boolean); 1133return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1147else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1154return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol); 1175return CreateResult(SpecialType.System_Boolean); 1209return CreateResult(SpecialType.System_Boolean); 1318return CreateResult(SpecialType.System_Void); 1335enumerableType ??= this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 1343var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1349: results.Concat(CreateResult(Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable))); 1361return CreateResult(SpecialType.System_Boolean); 1370return CreateResult(SpecialType.System_Boolean); 1679return CreateResult(SpecialType.System_Object); 1975return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1993return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2000return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2009return CreateResult(SpecialType.System_Boolean); 2056return types.Select(t => t.InferredType.SpecialType == SpecialType.System_Void ? new TypeInferenceInfo(task) : new TypeInferenceInfo(taskOfT.Construct(t.InferredType))); 2092return this.Compilation.GetSpecialType(SpecialType.System_Void); 2220return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2247return CreateResult(SpecialType.System_IDisposable); 2271return CreateResult(SpecialType.System_IDisposable); 2275return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2278if (laterUsageInference is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2307if (inferredDescendantTypes is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2452return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2461return CreateResult(SpecialType.System_Boolean);
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
455if (symbol == null || symbol is ITypeSymbol type && type.SpecialType != SpecialType.None)
System.Text.Json.SourceGeneration (62)
Helpers\KnownTypeSymbols.cs (6)
127public INamedTypeSymbol ObjectType => _ObjectType ??= Compilation.GetSpecialType(SpecialType.System_Object); 130public INamedTypeSymbol StringType => _StringType ??= Compilation.GetSpecialType(SpecialType.System_String); 168: (_ByteArrayType = new(Compilation.CreateArrayTypeSymbol(Compilation.GetSpecialType(SpecialType.System_Byte), rank: 1))).Value; 174: (_MemoryByteType = new(MemoryType?.Construct(Compilation.GetSpecialType(SpecialType.System_Byte)))).Value; 180: (_ReadOnlyMemoryByteType = new(ReadOnlyMemoryType?.Construct(Compilation.GetSpecialType(SpecialType.System_Byte)))).Value; 295public INamedTypeSymbol? DelegateType => _DelegateType ??= Compilation.GetSpecialType(SpecialType.System_Delegate);
Helpers\RoslynExtensions.cs (14)
506if (!arg.IsValueType || arg is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T }) 625SpecialType.System_SByte or SpecialType.System_Int16 or SpecialType.System_Int32 or SpecialType.System_Int64 or 626SpecialType.System_Byte or SpecialType.System_UInt16 or SpecialType.System_UInt32 or SpecialType.System_UInt64 or 627SpecialType.System_Single or SpecialType.System_Double or SpecialType.System_Decimal; 631=> !type.IsValueType || type.OriginalDefinition.SpecialType is SpecialType.System_Nullable_T; 635if (type.IsValueType && type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
JsonSourceGenerator.Emitter.cs (1)
824return caseSpec.CaseType.SpecialType is SpecialType.System_Nullable_T
JsonSourceGenerator.Parser.cs (35)
835ITypeSymbol patternType = caseType is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } nullableCaseType 1639bool acceptsNull = caseType is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } 1707=> type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } named 1712=> type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T }; 1724ITypeSymbol root = _knownSymbols.Compilation.GetSpecialType(SpecialType.System_Void); 1828if (type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T } nullable) 1846if (type.SpecialType is SpecialType.System_Boolean) 1869if (type.SpecialType is SpecialType.System_String or SpecialType.System_Char or SpecialType.System_DateTime || 1897type.SpecialType is SpecialType.System_Object) 1924i.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T)) 1935type.SpecialType is SpecialType.System_Byte or SpecialType.System_SByte or 1936SpecialType.System_Int16 or SpecialType.System_UInt16 or 1937SpecialType.System_Int32 or SpecialType.System_UInt32 or 1938SpecialType.System_Int64 or SpecialType.System_UInt64 or 1939SpecialType.System_Single or SpecialType.System_Double or 1940SpecialType.System_Decimal; 1943type is IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte }; 1948named.TypeArguments[0].SpecialType == SpecialType.System_Byte && 1954named.TypeArguments[0].SpecialType == SpecialType.System_Byte && 3207if (type.SpecialType is SpecialType.System_Boolean) 3212if (type.SpecialType is SpecialType.System_Char) 3219if (type.SpecialType is SpecialType.System_String or SpecialType.System_DateTime || 3347SpecialType.System_Boolean or 3348SpecialType.System_Char or 3349SpecialType.System_DateTime or 3350SpecialType.System_String or 3351SpecialType.System_Object ||
Model\TypeGenerationSpec.cs (4)
186if (property.PropertyType.SpecialType is SpecialType.System_Object || 198CollectionValueType!.SpecialType is not SpecialType.System_Object; 201return CollectionKeyType!.SpecialType is SpecialType.System_String && 202CollectionValueType!.SpecialType is not SpecialType.System_Object;
src\runtime\src\libraries\Common\src\SourceGenerators\TypeRef.cs (2)
34public SpecialType SpecialType { get; } 36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
96if (items[2].Type?.SpecialType == SpecialType.System_Int32)
System.Windows.Forms.Analyzers (1)
System\Windows\Forms\Analyzers\Designer\DesignerTypeFacts.cs (1)
97&& method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean);
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
94|| shouldSerializeMethod.ReturnType.SpecialType != SpecialType.System_Boolean
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
92shouldSerializeMethod.ReturnType.SpecialType <> SpecialType.System_Boolean OrElse