ExpressionTreeToString icon indicating copy to clipboard operation
ExpressionTreeToString copied to clipboard

Options architecture

Open zspitz opened this issue 4 years ago • 0 comments

Sometimes a given rendered will expose various options, e.g. text wrapping in the code renderers, or the using / Imports / static usings when rendering a type name, or the number of spaces to indent.

If a renderer supports various options, there should be a class describing those options, and a static instance of the class e.g. at CSharpRenderOptions.Current. The options should not be set per call, but rather per visitor/writer.

This also allows the renderer at the C# key to be overridden with another rendering function, perhaps with its own option mechanism.

As long as these option classes are serializable, the visualizer can support passing them back and forth.

We'll open individual issues for each writer/visitor, to describe the available options.

zspitz avatar Sep 28 '20 20:09 zspitz