Table of Contents

Class Generator

Namespace
ZeroC.Slice.Symbols
Assembly
ZeroC.Slice.Symbols.dll

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

input PipeReader

The pipe reader to read the Slice-encoded request from.

output PipeWriter

The pipe writer to write the Slice-encoded response to.

transform Func<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.

Returns

Task