bool Microsoft.ActiveDirectory.Management.Commands.IADExceptionFilter.FilterException(Exception e, ref bool isTerminating) { bool flag; List <IADExceptionFilter> .Enumerator enumerator = this._list.GetEnumerator(); try { while (enumerator.MoveNext()) { IADExceptionFilter current = enumerator.Current; if (!current.FilterException(e, ref isTerminating)) { continue; } flag = true; return(flag); } isTerminating = false; return(false); } finally { enumerator.Dispose(); } return(flag); }
public ADCmdletBase() { this._cmdletParameters = Activator.CreateInstance <P>(); this._connectedStore = null; this._recordExceptionHandler = new ADRecordExceptionHandler(); this._beginProcessPipeline = new CmdletSubroutinePipeline(); this._processRecordPipeline = new CmdletSubroutinePipeline(); this._endProcessPipeline = new CmdletSubroutinePipeline(); ADExceptionFilter aDExceptionFilter = new ADExceptionFilter(); aDExceptionFilter.Add(this._recordExceptionHandler); aDExceptionFilter.Add(new ADPipelineExceptionHandler(this)); aDExceptionFilter.Add(new ADSystemExceptionHandler()); this._exceptionFilter = aDExceptionFilter; ADCmdletBase <P> aDCmdletBase = this; this.RegisterDisposeCallback(new ADCmdletBase <P> .CmdletDispose(aDCmdletBase.Dispose)); this._cmdletSessionCache = new ADCmdletCache(); this._warningBuffer = new List <string>(); this._errorBuffer = new List <ErrorRecord>(); }
public void Add(IADExceptionFilter filter) { this.List.Add(filter); }