Class Generator
Handles the Slice compiler protocol: decoding the request, converting compiler types to rich symbols, invoking a transform function, and encoding the response.
public static class Generator
- Inheritance
-
Generator
- Inherited Members
Methods
RunAsync(PipeReader, PipeWriter, Func<ImmutableList<SliceFile>, (string key, string value)[], Task<GeneratorResponse>>)
Reads a Slice-encoded request from input, converts the decoded types into rich
symbols, invokes transform with the converted source files, and writes the Slice-encoded
response to output.
public static Task RunAsync(PipeReader input, PipeWriter output, Func<ImmutableList<SliceFile>, (string key, string value)[], Task<GeneratorResponse>> transform)
Parameters
inputPipeReaderThe pipe reader to read the Slice-encoded request from.
outputPipeWriterThe pipe writer to write the Slice-encoded response to.
transformFunc<ImmutableList<SliceFile>, (string key, string value)[], Task<GeneratorResponse>>A function that receives the converted source files and the additional options sequence, and returns a task that produces the generator response.