Beispiel #1
0
        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);
        }
Beispiel #2
0
        internal void Initialize(PSPropertyExpressionFactory 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);
        }