protected override void InternalDispose() { base.InternalDispose(); if (this.mgr != null) { this.mgr.Dispose(); this.mgr = null; } }
protected override void InternalDispose() { base.InternalDispose(); if (this.mgr != null) { this.mgr.Dispose(); this.mgr = null; } }
internal override void ProcessRecord() { PSObject so = this.ReadObject(); if ((so != null) && (so != AutomationNull.Value)) { if (this.mgr == null) { this.mgr = new SubPipelineManager(); this.mgr.Initialize(this.lo, this.OuterCmdlet().Context); } this.mgr.Process(so); } }
internal override void ProcessRecord() { PSObject so = this.ReadObject(); if ((so != null) && (so != AutomationNull.Value)) { if (this.mgr == null) { this.mgr = new SubPipelineManager(); this.mgr.Initialize(this.lo, this.OuterCmdlet().Context); } this.mgr.Process(so); } }
/// <summary> /// handler for processing each object coming through the pipeline /// it forwards the call to the pipeline manager object /// </summary> internal override void ProcessRecord() { PSObject so = this.ReadObject(); if (so == null || so == AutomationNull.Value) { return; } // on demand initialization when the first pipeline // object is initialized if (_mgr == null) { _mgr = new SubPipelineManager(); _mgr.Initialize(_lo, this.OuterCmdlet().Context); } #if false // if the object supports IEnumerable, // unpack the object and process each member separately IEnumerable e = PSObjectHelper.GetEnumerable(so); if (e == null) { this.mgr.Process(so); } else { foreach (object obj in e) { this.mgr.Process(PSObjectHelper.AsPSObject(obj)); } } #else _mgr.Process(so); #endif }
/// <summary> /// handler for processing each object coming through the pipeline /// it forwards the call to the pipeline manager object /// </summary> internal override void ProcessRecord() { PSObject so = this.ReadObject(); if (so == null || so == AutomationNull.Value) { return; } // on demand initialization when the first pipeline // object is initialized if (_mgr == null) { _mgr = new SubPipelineManager(); _mgr.Initialize(_lo, this.OuterCmdlet().Context); } #if false // if the object supports IEnumerable, // unpack the object and process each member separately IEnumerable e = PSObjectHelper.GetEnumerable (so); if (e == null) { this.mgr.Process (so); } else { foreach (object obj in e) { this.mgr.Process (PSObjectHelper.AsPSObject (obj)); } } #else _mgr.Process(so); #endif }