コード例 #1
0
ファイル: TableView.cs プロジェクト: dfinke/powershell
        internal void Initialize(MshExpressionFactory expressionFactory,
                                 TypeInfoDataBase db)
        {
            _expressionFactory = expressionFactory;
            _typeInfoDatabase = db;

            // Initialize Format Error Manager.
            FormatErrorPolicy formatErrorPolicy = new FormatErrorPolicy();

            formatErrorPolicy.ShowErrorsAsMessages = _typeInfoDatabase.defaultSettingsSection.formatErrorPolicy.ShowErrorsAsMessages;
            formatErrorPolicy.ShowErrorsInFormattedOutput = _typeInfoDatabase.defaultSettingsSection.formatErrorPolicy.ShowErrorsInFormattedOutput;

            _errorManager = new FormatErrorManager(formatErrorPolicy);
        }
コード例 #2
0
ファイル: FormatViewGenerator.cs プロジェクト: 40a/PowerShell
        private void InitializeFormatErrorManager()
        {
            FormatErrorPolicy formatErrorPolicy = new FormatErrorPolicy();
            if (parameters != null && parameters.showErrorsAsMessages.HasValue)
            {
                formatErrorPolicy.ShowErrorsAsMessages = parameters.showErrorsAsMessages.Value;
            }
            else
            {
                formatErrorPolicy.ShowErrorsAsMessages = this.dataBaseInfo.db.defaultSettingsSection.formatErrorPolicy.ShowErrorsAsMessages;
            }
            if (parameters != null && parameters.showErrorsInFormattedOutput.HasValue)
            {
                formatErrorPolicy.ShowErrorsInFormattedOutput = parameters.showErrorsInFormattedOutput.Value;
            }
            else
            {
                formatErrorPolicy.ShowErrorsInFormattedOutput = this.dataBaseInfo.db.defaultSettingsSection.formatErrorPolicy.ShowErrorsInFormattedOutput;
            }

            _errorManager = new FormatErrorManager(formatErrorPolicy);
        }
コード例 #3
0
        private void InitializeFormatErrorManager()
        {
            FormatErrorPolicy formatErrorPolicy = new FormatErrorPolicy();

            if ((this.parameters != null) && this.parameters.showErrorsAsMessages.HasValue)
            {
                formatErrorPolicy.ShowErrorsAsMessages = this.parameters.showErrorsAsMessages.Value;
            }
            else
            {
                formatErrorPolicy.ShowErrorsAsMessages = this.dataBaseInfo.db.defaultSettingsSection.formatErrorPolicy.ShowErrorsAsMessages;
            }
            if ((this.parameters != null) && this.parameters.showErrorsInFormattedOutput.HasValue)
            {
                formatErrorPolicy.ShowErrorsInFormattedOutput = this.parameters.showErrorsInFormattedOutput.Value;
            }
            else
            {
                formatErrorPolicy.ShowErrorsInFormattedOutput = this.dataBaseInfo.db.defaultSettingsSection.formatErrorPolicy.ShowErrorsInFormattedOutput;
            }
            this.errorManager = new FormatErrorManager(formatErrorPolicy);
        }
コード例 #4
0
 internal FormatErrorManager(FormatErrorPolicy formatErrorPolicy)
 {
     _formatErrorPolicy = formatErrorPolicy;
 }
コード例 #5
0
ファイル: FormatViewManager.cs プロジェクト: 40a/PowerShell
 internal FormatErrorManager(FormatErrorPolicy formatErrorPolicy)
 {
     _formatErrorPolicy = formatErrorPolicy;
 }
コード例 #6
0
ファイル: TableView.cs プロジェクト: nickchal/pash
 internal void Initialize(MshExpressionFactory expressionFactory, TypeInfoDataBase db)
 {
     this.expressionFactory = expressionFactory;
     this.typeInfoDatabase = db;
     FormatErrorPolicy formatErrorPolicy = new FormatErrorPolicy {
         ShowErrorsAsMessages = this.typeInfoDatabase.defaultSettingsSection.formatErrorPolicy.ShowErrorsAsMessages,
         ShowErrorsInFormattedOutput = this.typeInfoDatabase.defaultSettingsSection.formatErrorPolicy.ShowErrorsInFormattedOutput
     };
     this.errorManager = new FormatErrorManager(formatErrorPolicy);
 }