102 references to PredefinedType
Microsoft.CodeAnalysis.CodeStyle (44)
ISyntaxFacts.cs (3)
120bool IsPredefinedType(SyntaxToken token, PredefinedType type); 123bool IsPredefinedType([NotNullWhen(true)] SyntaxNode? node, PredefinedType type); 192bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs\SpecialTypeExtensions.cs (21)
11public static PredefinedType ToPredefinedType(this SpecialType specialType) 14SpecialType.System_Object => PredefinedType.Object, 15SpecialType.System_Void => PredefinedType.Void, 16SpecialType.System_Boolean => PredefinedType.Boolean, 17SpecialType.System_Char => PredefinedType.Char, 18SpecialType.System_SByte => PredefinedType.SByte, 19SpecialType.System_Byte => PredefinedType.Byte, 20SpecialType.System_Int16 => PredefinedType.Int16, 21SpecialType.System_UInt16 => PredefinedType.UInt16, 22SpecialType.System_Int32 => PredefinedType.Int32, 23SpecialType.System_UInt32 => PredefinedType.UInt32, 24SpecialType.System_Int64 => PredefinedType.Int64, 25SpecialType.System_UInt64 => PredefinedType.UInt64, 26SpecialType.System_Decimal => PredefinedType.Decimal, 27SpecialType.System_Single => PredefinedType.Single, 28SpecialType.System_Double => PredefinedType.Double, 29SpecialType.System_String => PredefinedType.String, 30SpecialType.System_DateTime => PredefinedType.DateTime, 31SpecialType.System_IntPtr => PredefinedType.IntPtr, 32SpecialType.System_UIntPtr => PredefinedType.UIntPtr, 33_ => PredefinedType.None,
PredefinedTypeExtensions.cs (20)
11public static SpecialType ToSpecialType(this PredefinedType predefinedType) 14PredefinedType.Object => SpecialType.System_Object, 15PredefinedType.Void => SpecialType.System_Void, 16PredefinedType.Boolean => SpecialType.System_Boolean, 17PredefinedType.Char => SpecialType.System_Char, 18PredefinedType.SByte => SpecialType.System_SByte, 19PredefinedType.Byte => SpecialType.System_Byte, 20PredefinedType.Int16 => SpecialType.System_Int16, 21PredefinedType.UInt16 => SpecialType.System_UInt16, 22PredefinedType.Int32 => SpecialType.System_Int32, 23PredefinedType.UInt32 => SpecialType.System_UInt32, 24PredefinedType.Int64 => SpecialType.System_Int64, 25PredefinedType.UInt64 => SpecialType.System_UInt64, 26PredefinedType.Decimal => SpecialType.System_Decimal, 27PredefinedType.Single => SpecialType.System_Single, 28PredefinedType.Double => SpecialType.System_Double, 29PredefinedType.String => SpecialType.System_String, 30PredefinedType.DateTime => SpecialType.System_DateTime, 31PredefinedType.IntPtr => SpecialType.System_IntPtr, 32PredefinedType.UIntPtr => SpecialType.System_UIntPtr,
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
SyntaxGeneratorExtensions_Negate.cs (2)
155if (syntaxFacts.IsPredefinedType(rightOperand, PredefinedType.Object) && 535if (syntaxFacts.IsPredefinedType(type, PredefinedType.Object))
Microsoft.CodeAnalysis.CSharp.CodeStyle (29)
CSharpSyntaxFacts.cs (26)
313public bool IsPredefinedType(SyntaxToken token, PredefinedType type) 314=> TryGetPredefinedType(token, out var actualType) && actualType == type; 319public bool IsPredefinedType(SyntaxNode? node, PredefinedType type) 322public bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type) 325return type != PredefinedType.None; 328private static PredefinedType GetPredefinedType(SyntaxToken token) 331SyntaxKind.BoolKeyword => PredefinedType.Boolean, 332SyntaxKind.ByteKeyword => PredefinedType.Byte, 333SyntaxKind.SByteKeyword => PredefinedType.SByte, 334SyntaxKind.IntKeyword => PredefinedType.Int32, 335SyntaxKind.UIntKeyword => PredefinedType.UInt32, 336SyntaxKind.ShortKeyword => PredefinedType.Int16, 337SyntaxKind.UShortKeyword => PredefinedType.UInt16, 338SyntaxKind.LongKeyword => PredefinedType.Int64, 339SyntaxKind.ULongKeyword => PredefinedType.UInt64, 340SyntaxKind.FloatKeyword => PredefinedType.Single, 341SyntaxKind.DoubleKeyword => PredefinedType.Double, 342SyntaxKind.DecimalKeyword => PredefinedType.Decimal, 343SyntaxKind.StringKeyword => PredefinedType.String, 344SyntaxKind.CharKeyword => PredefinedType.Char, 345SyntaxKind.ObjectKeyword => PredefinedType.Object, 346SyntaxKind.VoidKeyword => PredefinedType.Void, 349"nint" => PredefinedType.IntPtr, 350"nuint" => PredefinedType.UIntPtr, 351_ => PredefinedType.None, 353_ => PredefinedType.None,
NullableImpactingSpanWalker.cs (3)
140&& CSharpSyntaxFacts.Instance.TryGetPredefinedType(predefinedType.Keyword, out var type)) 142if (type is CodeAnalysis.LanguageService.PredefinedType.Object or CodeAnalysis.LanguageService.PredefinedType.String)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (27)
VisualBasicSyntaxFacts.vb (27)
302Dim actualType As PredefinedType = PredefinedType.None 303Return TryGetPredefinedType(token, actualType) AndAlso actualType <> PredefinedType.None 306Public Function IsPredefinedType(token As SyntaxToken, type As PredefinedType) As Boolean Implements ISyntaxFacts.IsPredefinedType 307Dim actualType As PredefinedType = PredefinedType.None 316Public Function IsPredefinedType(node As SyntaxNode, type As PredefinedType) As Boolean Implements ISyntaxFacts.IsPredefinedType 321Public Function TryGetPredefinedType(token As SyntaxToken, ByRef type As PredefinedType) As Boolean Implements ISyntaxFacts.TryGetPredefinedType 323Return type <> PredefinedType.None 326Private Shared Function GetPredefinedType(token As SyntaxToken) As PredefinedType 329Return PredefinedType.Boolean 331Return PredefinedType.Byte 333Return PredefinedType.SByte 335Return PredefinedType.Int32 337Return PredefinedType.UInt32 339Return PredefinedType.Int16 341Return PredefinedType.UInt16 343Return PredefinedType.Int64 345Return PredefinedType.UInt64 347Return PredefinedType.Single 349Return PredefinedType.Double 351Return PredefinedType.Decimal 353Return PredefinedType.String 355Return PredefinedType.Char 357Return PredefinedType.Object 359Return PredefinedType.DateTime 361Return PredefinedType.None