Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 78 additions & 2 deletions src/Linq2GraphQL.Generator/GraphQLSchema/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,83 @@ internal static string SafeVariableName(string name)
return newName;
}

public static readonly HashSet<string> Keywords = ["event"];
public static readonly HashSet<string> Keywords = [
"abstract",
"as",
"base",
"bool",
"break",
"byte",
"case",
"catch",
"char",
"checked",
"class",
"const",
"continue",
"decimal",
"default",
"delegate",
"do",
"double",
"else",
"enum",
"event",
"explicit",
"extern",
"false",
"finally",
"fixed",
"float",
"for",
"foreach",
"goto",
"if",
"implicit",
"in",
"int",
"interface",
"internal",
"is",
"lock",
"long",
"namespace",
"new",
"null",
"object",
"operator",
"out",
"override",
"params",
"private",
"protected",
"public",
"readonly",
"ref",
"return",
"sbyte",
"sealed",
"short",
"sizeof",
"static",
"string",
"struct",
"switch",
"this",
"throw",
"true",
"try",
"typeof",
"uint",
"ulong",
"unchecked",
"unsafe",
"ushort",
"using",
"virtual",
"void",
"volatile",
"while",];


public static readonly Dictionary<string, (string Name, Type type)> TypeMapping =
Expand All @@ -47,5 +123,5 @@ internal static string SafeVariableName(string name)
{ "Byte", new ValueTuple<string, Type>("byte", typeof(byte)) },
};


}
Loading