コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
ファイル: FormatGenerator.cs プロジェクト: prateek/Pash
 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;
 }
コード例 #4
0
ファイル: FormatGenerator.cs プロジェクト: zhuyue1314/Pash
        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);
        }
コード例 #5
0
ファイル: FormatGenerator.cs プロジェクト: zhuyue1314/Pash
 protected FormatGenerator(ExecutionContext context, FormatShape shape, FormatGeneratorOptions options)
 {
     Options          = options;
     Shape            = shape;
     ExecutionContext = context;
 }
コード例 #6
0
ファイル: FormatManager.cs プロジェクト: prateek/Pash
 internal FormatManager(FormatShape shape, ExecutionContext context)
 {
     Shape = shape;
     Options = new FormatGeneratorOptions();
     _state = FormattingState.FormatEnd;
 }
コード例 #7
0
ファイル: ListFormatGenerator.cs プロジェクト: mauve/Pash
 public ListFormatGenerator(ExecutionContext context, FormatGeneratorOptions options)
     : base(context, FormatShape.List, options)
 {
 }
コード例 #8
0
ファイル: FormatGenerator.cs プロジェクト: prateek/Pash
 protected FormatGenerator(ExecutionContext context, FormatShape shape, FormatGeneratorOptions options)
 {
     Options = options;
     Shape = shape;
     ExecutionContext = context;
 }
コード例 #9
0
 public ListFormatGenerator(ExecutionContext context, FormatGeneratorOptions options)
     : base(context, FormatShape.List, options)
 {
 }
コード例 #10
0
ファイル: TableFormatGenerator.cs プロジェクト: prateek/Pash
 public TableFormatGenerator(ExecutionContext context, FormatGeneratorOptions options)
     : this(context, new TableFormatGeneratorOptions(options))
 {
 }
コード例 #11
0
ファイル: TableFormatGenerator.cs プロジェクト: jagrem/Pash
 public TableFormatGenerator(ExecutionContext context, FormatGeneratorOptions options)
     : this(context, new TableFormatGeneratorOptions(options))
 {
 }
コード例 #12
0
 internal FormatManager(FormatShape shape, ExecutionContext context)
 {
     Shape   = shape;
     Options = new FormatGeneratorOptions();
     _state  = FormattingState.FormatEnd;
 }