Esempio n. 1
0
 private void UpdateFormats()
 {
     using (RunspaceConfiguration.tracer.TraceMethod())
     {
         Collection <string> independentErrors = new Collection <string>();
         Collection <PSSnapInTypeAndFormatErrors> formatAndTypesErrors = FormatAndTypeDataHelper.GetFormatAndTypesErrors(this, this._host, (IEnumerable)this.Formats, RunspaceConfigurationCategory.Formats, independentErrors);
         this.FormatDBManager.UpdateDataBase(formatAndTypesErrors, this.AuthorizationManager, this._host);
         FormatAndTypeDataHelper.ThrowExceptionOnError("ErrorsUpdatingFormats", independentErrors, formatAndTypesErrors, RunspaceConfigurationCategory.Formats);
     }
 }
        internal void UpdateTypes(bool preValidated)
        {
            Collection <string> independentErrors    = new Collection <string>();
            Collection <int>    entryIndicesToRemove = new Collection <int>();
            Collection <PSSnapInTypeAndFormatErrors> psSnapinTypes = FormatAndTypeDataHelper.GetFormatAndTypesErrors(this, this._host, this.Types, RunspaceConfigurationCategory.Types, independentErrors, entryIndicesToRemove);

            if (entryIndicesToRemove.Count > 0)
            {
                this.RemoveNeedlessEntries(RunspaceConfigurationCategory.Types, entryIndicesToRemove);
            }
            this.TypeTable.Update(psSnapinTypes, this._authorizationManager, this._host, preValidated);
            FormatAndTypeDataHelper.ThrowExceptionOnError("ErrorsUpdatingTypes", independentErrors, psSnapinTypes, RunspaceConfigurationCategory.Types);
        }
        private void UpdateFormats(bool preValidated)
        {
            Collection <string> independentErrors               = new Collection <string>();
            Collection <int>    entryIndicesToRemove            = new Collection <int>();
            Collection <PSSnapInTypeAndFormatErrors> mshsnapins = FormatAndTypeDataHelper.GetFormatAndTypesErrors(this, this._host, this.Formats, RunspaceConfigurationCategory.Formats, independentErrors, entryIndicesToRemove);

            if (entryIndicesToRemove.Count > 0)
            {
                this.RemoveNeedlessEntries(RunspaceConfigurationCategory.Formats, entryIndicesToRemove);
            }
            this.FormatDBManager.UpdateDataBase(mshsnapins, this.AuthorizationManager, this._host, preValidated);
            FormatAndTypeDataHelper.ThrowExceptionOnError("ErrorsUpdatingFormats", independentErrors, mshsnapins, RunspaceConfigurationCategory.Formats);
        }