internal TableFormatGeneratorOptions(FormatGeneratorOptions options) { Expand = options.Expand; Force = options.Force; GroupBy = options.GroupBy; DisplayError = options.DisplayError; ShowError = options.ShowError; View = options.View; Properties = options.Properties; }
public static FormatGenerator Get(ExecutionContext context, FormatShape shape, FormatGeneratorOptions options) { if (_lastGenerator != null && _lastGenerator.Shape.Equals(shape) && _lastGenerator.Options.Equals(options)) { return _lastGenerator; } switch (shape) { case FormatShape.List: _lastGenerator = new ListFormatGenerator(context, options); break; case FormatShape.Table: _lastGenerator = new TableFormatGenerator(context, options); break; default: throw new PSInvalidOperationException("Cannot get a FormatGenerator with undefined shape"); } return _lastGenerator; }
public static FormatGenerator Get(ExecutionContext context, FormatShape shape, FormatGeneratorOptions options) { if (_lastGenerator != null && _lastGenerator.Shape.Equals(shape) && _lastGenerator.Options.Equals(options)) { return(_lastGenerator); } switch (shape) { case FormatShape.List: _lastGenerator = new ListFormatGenerator(context, options); break; case FormatShape.Table: _lastGenerator = new TableFormatGenerator(context, options); break; default: throw new PSInvalidOperationException("Cannot get a FormatGenerator with undefined shape"); } return(_lastGenerator); }
protected FormatGenerator(ExecutionContext context, FormatShape shape, FormatGeneratorOptions options) { Options = options; Shape = shape; ExecutionContext = context; }
internal FormatManager(FormatShape shape, ExecutionContext context) { Shape = shape; Options = new FormatGeneratorOptions(); _state = FormattingState.FormatEnd; }
public ListFormatGenerator(ExecutionContext context, FormatGeneratorOptions options) : base(context, FormatShape.List, options) { }
public TableFormatGenerator(ExecutionContext context, FormatGeneratorOptions options) : this(context, new TableFormatGeneratorOptions(options)) { }