diff --git a/src/Language/CSharp.purs b/src/Language/CSharp.purs index 43e5a24c..6f04178e 100644 --- a/src/Language/CSharp.purs +++ b/src/Language/CSharp.purs @@ -19,7 +19,7 @@ import IRGraph (IRClassData(..), IRType(..), IRUnionRep, Named, forUnion_, isUni import Options (Option, booleanOption, enumOption) forbiddenNames :: Array String -forbiddenNames = ["Converter", "JsonConverter", "Type", "Serialize"] +forbiddenNames = ["QuickType", "Converter", "JsonConverter", "Type", "Serialize"] listOption :: Option Boolean listOption = enumOption "array-type" "Select C# type to use for JSON arrays" [Tuple "array" false, Tuple "list" true] @@ -119,7 +119,7 @@ csharpDoc = do oneOfThese <- getForSingleOrMultipleTopLevels "" " one of these" line $ "// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do" <> oneOfThese <> ":" line "//" - line $ "// using " <> module_ <> ";" + line $ "// using QuickType;" forEachTopLevel_ \topLevelName topLevelType -> do line "//" line $ "// var data = " <> module_ <> ".FromJson(jsonString);" @@ -127,7 +127,7 @@ csharpDoc = do line "// For POCOs visit quicktype.io?poco" line "//" - line $ "namespace " <> module_ + line "namespace QuickType" line "{" indent do let using s = line $ "using " <> s <> ";" diff --git a/test/fixtures/csharp/Program.cs b/test/fixtures/csharp/Program.cs index 9c959c84..de1677a2 100755 --- a/test/fixtures/csharp/Program.cs +++ b/test/fixtures/csharp/Program.cs @@ -8,7 +8,7 @@ namespace QuickType { var path = args[0]; var json = System.IO.File.ReadAllText(path); - var output = QuickType.FromJson(json).ToJson(); + var output = TopLevel.FromJson(json).ToJson(); Console.WriteLine("{0}", output); } } diff --git a/test/test.ts b/test/test.ts index 30b0cbd7..0d7761ce 100755 --- a/test/test.ts +++ b/test/test.ts @@ -231,7 +231,7 @@ class CSharpJSONFixture extends JSONFixture { setupCommand = "dotnet restore --no-cache"; diffViaSchema = true; output = "QuickType.cs"; - topLevel = "QuickType"; + topLevel = "TopLevel"; async test(sample: string) { compareJsonFileToJson({