Got basic file writing working.
This commit is contained in:
Родитель
c3ae27f4eb
Коммит
689ae03ddf
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "@autorest/csharp-v3",
|
||||
"lockfileVersion": 1
|
||||
}
|
|
@ -6,4 +6,4 @@
|
|||
"scripts": {
|
||||
"start": "dotnet ./bin/AutoRest.CSharp.V3.dll --server"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
28
readme.md
28
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
|
||||
```
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<IEnumerable<string>>("GetPluginNames", async () => new[] { "csharp-v3" });
|
||||
connection.Dispatch<string, string, bool>("Process", (plugin, sessionId) => new Dispatcher(connection, plugin, sessionId).Process());
|
||||
connection.DispatchNotification("Shutdown", connection.Stop);
|
||||
|
|
Загрузка…
Ссылка в новой задаче