diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..2057c282 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4 @@ +{ + "name": "@autorest/csharp-v3", + "lockfileVersion": 1 +} diff --git a/package.json b/package.json index 7805f2ef..87d3804d 100644 --- a/package.json +++ b/package.json @@ -6,4 +6,4 @@ "scripts": { "start": "dotnet ./bin/AutoRest.CSharp.V3.dll --server" } -} \ No newline at end of file +} diff --git a/readme.md b/readme.md index c49b0152..c165f25d 100644 --- a/readme.md +++ b/readme.md @@ -3,16 +3,34 @@ ## Configuration ```yaml -clear-output-folder: false -azure-track2-csharp: true - use-extension: "@autorest/remodeler" : "~2.0.4" pipeline: + remodeler: + input: openapi-document/multi-api/identity csharp-v3: input: remodeler + csharp-v3/emitter: + input: csharp-v3 + scope: output-info -output-artifact: - - source-file-csharp +output-info: + output-artifact: source-file-csharp + +# emitter: +# input: csharp-v3 +# scope: output-info +# # output-artifact: source-file-csharp + +# output-info: +# # is-object: false +# output-artifact: source-file-csharp +# # output-artifact: +# # - source-file-csharp +# # - source-file-csproj +# # - source-file-powershell +# # - source-file-other +# # - binary-file +# # - preserved-files ``` diff --git a/src/Dispatcher.cs b/src/Dispatcher.cs index 57dfe6f5..70b32aa6 100644 --- a/src/Dispatcher.cs +++ b/src/Dispatcher.cs @@ -18,6 +18,22 @@ namespace AutoRest.CSharp.V3 } var codeModel = await ReadFile(files.First()); + var file = new Message + { + Channel = "file", + Details = new + { + content = codeModel, + type = "source-file-csharp", + uri = "CodeModel.yaml" + }, + //Text = codeModel, + //Key = new[] { "source-file-csharp", "CodeModel.yaml" } + }; + //Message(new Message {Text = codeModel, Channel = "fatal"}); + Message(file); + //WriteFile("CodeModel.yaml", codeModel, null); + //Console.WriteLine("Got here"); return true; } } diff --git a/src/Program.cs b/src/Program.cs index 596676b1..fbd4a76a 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -15,7 +15,7 @@ namespace AutoRest.CSharp.V3 return 1; } - using var connection = new Connection(Console.OpenStandardOutput(), Console.OpenStandardInput()); + var connection = new Connection(Console.OpenStandardOutput(), Console.OpenStandardInput()); connection.Dispatch>("GetPluginNames", async () => new[] { "csharp-v3" }); connection.Dispatch("Process", (plugin, sessionId) => new Dispatcher(connection, plugin, sessionId).Process()); connection.DispatchNotification("Shutdown", connection.Stop);