public ScriptColumn(string label,
                            ScriptBlock script,
                            ColumnAlignment alignment,
                            int width,
                            string tag,
                            TrimLocation trimLocation,
                            bool captureContext)
            : base(alignment, width, tag, trimLocation)
        {
            if (String.IsNullOrEmpty(label))
            {
                throw new ArgumentException("You must supply a column label.", "label");
            }

            if (null == script)
            {
                throw new ArgumentNullException("script");
            }

            m_label = label;
            Script  = script;
            if (captureContext)
            {
                Context = DbgProvider.CapturePsContext();
            }
        } // end constructor
示例#2
0
        public AltSingleLineViewDefinition(ScriptBlock script, bool captureContext)
        {
            if (null == script)
            {
                throw new ArgumentNullException("script");
            }

            Script = script;
            if (captureContext)
            {
                Context = DbgProvider.CapturePsContext();
            }
        } // end constructor
        public Footer(ColumnAlignment alignment, ScriptBlock script, bool captureContext)
        {
            if (null == script)
            {
                throw new ArgumentNullException("script");
            }

            Alignment = alignment;
            Script    = script;
            if (captureContext)
            {
                Context = DbgProvider.CapturePsContext();
            }
        }
 public AltTableViewDefinition(bool showIndex,
                               IReadOnlyList <Column> columns,
                               Footer footer,
                               ScriptBlock produceGroupByHeader,
                               object groupBy,
                               bool captureContext,
                               bool preserveHeaderContext)
     : this(_ProduceColumns(showIndex, columns),
            footer,
            produceGroupByHeader,
            groupBy,
            captureContext ? DbgProvider.CapturePsContext() : null,
            preserveHeaderContext)
 {
 } // end constructor
示例#5
0
        public AltListViewDefinition(IReadOnlyList <ListItem> listItems,
                                     ScriptBlock produceGroupByHeader,
                                     object groupBy,
                                     bool captureContext,
                                     bool preserveHeaderContext)
        {
            if (null == listItems)
            {
                throw new ArgumentNullException("listItems");
            }

            ListItems            = listItems;
            ProduceGroupByHeader = produceGroupByHeader;
            GroupBy = groupBy;
            PreserveHeaderContext = preserveHeaderContext;
            if (captureContext)
            {
                Context = DbgProvider.CapturePsContext();
            }
        } // end constructor
示例#6
0
        public ScriptListItem(string label, ScriptBlock script, bool captureContext)
        {
            if (String.IsNullOrEmpty(label))
            {
                throw new ArgumentException("You must supply a label.", "label");
            }

            if (null == script)
            {
                throw new ArgumentNullException("script");
            }

            m_label = label;
            Script  = script;
            if (captureContext)
            {
                Context = DbgProvider.CapturePsContext();
            }
            else
            {
                Context = new PsContext();
            }
        } // end constructor
        public AltCustomViewDefinition(ScriptBlock script,
                                       ScriptBlock produceGroupByHeader,
                                       object groupBy,
                                       ScriptBlock end,
                                       bool captureContext,
                                       bool preserveHeaderContext,
                                       bool preserveScriptContext)
        {
            if (null == script)
            {
                throw new ArgumentNullException("script");
            }

            Script = script;
            ProduceGroupByHeader = produceGroupByHeader;
            GroupBy = groupBy;
            End     = end;
            PreserveHeaderContext = preserveHeaderContext;
            PreserveScriptContext = preserveScriptContext;
            if (captureContext)
            {
                Context = DbgProvider.CapturePsContext();
            }
        } // end constructor