internal override FormatEntryData GeneratePayload(PSObject so, int enumerationLimit)
        {
            FormatEntryData fed = new FormatEntryData();

            TableRowEntry tre;

            if (this.dataBaseInfo.view != null)
            {
                tre = GenerateTableRowEntryFromDataBaseInfo(so, enumerationLimit);
            }
            else
            {
                tre = GenerateTableRowEntryFromFromProperties(so, enumerationLimit);
                // get the global setting for multiline
                tre.multiLine = this.dataBaseInfo.db.defaultSettingsSection.MultilineTables;
            }

            fed.formatEntryInfo = tre;

            // override from command line, if there
            if (this.parameters != null && this.parameters.shapeParameters != null)
            {
                TableSpecificParameters tableSpecific = (TableSpecificParameters)this.parameters.shapeParameters;
                if (tableSpecific != null && tableSpecific.multiLine.HasValue)
                {
                    tre.multiLine = tableSpecific.multiLine.Value;
                }
            }

            return(fed);
        }
Exemplo n.º 2
0
        internal override FormatEntryData GeneratePayload(PSObject so, int enumerationLimit)
        {
            TableRowEntry   entry;
            FormatEntryData data = new FormatEntryData();

            if (base.dataBaseInfo.view != null)
            {
                entry = this.GenerateTableRowEntryFromDataBaseInfo(so, enumerationLimit);
            }
            else
            {
                entry           = this.GenerateTableRowEntryFromFromProperties(so, enumerationLimit);
                entry.multiLine = base.dataBaseInfo.db.defaultSettingsSection.MultilineTables;
            }
            data.formatEntryInfo = entry;
            if ((base.parameters != null) && (base.parameters.shapeParameters != null))
            {
                TableSpecificParameters shapeParameters = (TableSpecificParameters)base.parameters.shapeParameters;
                if ((shapeParameters != null) && shapeParameters.multiLine.HasValue)
                {
                    entry.multiLine = shapeParameters.multiLine.Value;
                }
            }
            return(data);
        }
Exemplo n.º 3
0
 internal override FormattingCommandLineParameters GetCommandLineParameters()
 {
     FormattingCommandLineParameters parameters = new FormattingCommandLineParameters();
     base.GetCommandLineProperties(parameters, true);
     parameters.forceFormattingAlsoOnOutOfBand = (bool) base.Force;
     if (this.showErrorsAsMessages.HasValue)
     {
         parameters.showErrorsAsMessages = base.showErrorsAsMessages;
     }
     if (this.showErrorsInFormattedOutput.HasValue)
     {
         parameters.showErrorsInFormattedOutput = base.showErrorsInFormattedOutput;
     }
     parameters.expansion = base.ProcessExpandParameter();
     if (this.autosize.HasValue)
     {
         parameters.autosize = new bool?(this.autosize.Value);
     }
     parameters.groupByParameter = base.ProcessGroupByParameter();
     TableSpecificParameters parameters2 = new TableSpecificParameters();
     parameters.shapeParameters = parameters2;
     if (this.hideHeaders.HasValue)
     {
         parameters2.hideHeaders = new bool?(this.hideHeaders.Value);
     }
     if (this.multiLine.HasValue)
     {
         parameters2.multiLine = new bool?(this.multiLine.Value);
     }
     return parameters;
 }
Exemplo n.º 4
0
        internal override FormattingCommandLineParameters GetCommandLineParameters()
        {
            FormattingCommandLineParameters parameters = new FormattingCommandLineParameters();

            base.GetCommandLineProperties(parameters, true);
            parameters.forceFormattingAlsoOnOutOfBand = (bool)base.Force;
            if (this.showErrorsAsMessages.HasValue)
            {
                parameters.showErrorsAsMessages = base.showErrorsAsMessages;
            }
            if (this.showErrorsInFormattedOutput.HasValue)
            {
                parameters.showErrorsInFormattedOutput = base.showErrorsInFormattedOutput;
            }
            parameters.expansion = base.ProcessExpandParameter();
            if (this.autosize.HasValue)
            {
                parameters.autosize = new bool?(this.autosize.Value);
            }
            parameters.groupByParameter = base.ProcessGroupByParameter();
            TableSpecificParameters parameters2 = new TableSpecificParameters();

            parameters.shapeParameters = parameters2;
            if (this.hideHeaders.HasValue)
            {
                parameters2.hideHeaders = new bool?(this.hideHeaders.Value);
            }
            if (this.multiLine.HasValue)
            {
                parameters2.multiLine = new bool?(this.multiLine.Value);
            }
            return(parameters);
        }
Exemplo n.º 5
0
        internal override FormattingCommandLineParameters GetCommandLineParameters()
        {
            FormattingCommandLineParameters parameters = new FormattingCommandLineParameters();

            GetCommandLineProperties(parameters, true);
            parameters.forceFormattingAlsoOnOutOfBand = this.Force;
            if (this.showErrorsAsMessages.HasValue)
            {
                parameters.showErrorsAsMessages = this.showErrorsAsMessages;
            }
            if (this.showErrorsInFormattedOutput.HasValue)
            {
                parameters.showErrorsInFormattedOutput = this.showErrorsInFormattedOutput;
            }

            parameters.expansion = ProcessExpandParameter();

            if (_autosize.HasValue)
            {
                parameters.autosize = _autosize.Value;
            }

            if (RepeatHeader)
            {
                parameters.repeatHeader = true;
            }

            parameters.groupByParameter = this.ProcessGroupByParameter();

            TableSpecificParameters tableParameters = new TableSpecificParameters();

            parameters.shapeParameters = tableParameters;

            if (_hideHeaders.HasValue)
            {
                tableParameters.hideHeaders = _hideHeaders.Value;
            }

            if (_multiLine.HasValue)
            {
                tableParameters.multiLine = _multiLine.Value;
            }

            return(parameters);
        }
Exemplo n.º 6
0
        internal override FormattingCommandLineParameters GetCommandLineParameters()
        {
            FormattingCommandLineParameters parameters = new FormattingCommandLineParameters();

            GetCommandLineProperties(parameters, true);
            parameters.forceFormattingAlsoOnOutOfBand = this.Force;
            if (this.showErrorsAsMessages.HasValue)
                parameters.showErrorsAsMessages = this.showErrorsAsMessages;
            if (this.showErrorsInFormattedOutput.HasValue)
                parameters.showErrorsInFormattedOutput = this.showErrorsInFormattedOutput;

            parameters.expansion = ProcessExpandParameter();

            if (_autosize.HasValue)
                parameters.autosize = _autosize.Value;

            parameters.groupByParameter = this.ProcessGroupByParameter();

            TableSpecificParameters tableParameters = new TableSpecificParameters();
            parameters.shapeParameters = tableParameters;

            if (_hideHeaders.HasValue)
            {
                tableParameters.hideHeaders = _hideHeaders.Value;
            }

            if (_multiLine.HasValue)
            {
                tableParameters.multiLine = _multiLine.Value;
            }
            return parameters;
        }