Esempio n. 1
0
 protected override void InternalDispose()
 {
     base.InternalDispose();
     if (this.mgr != null)
     {
         this.mgr.Dispose();
         this.mgr = null;
     }
 }
Esempio n. 2
0
 protected override void InternalDispose()
 {
     base.InternalDispose();
     if (this.mgr != null)
     {
         this.mgr.Dispose();
         this.mgr = null;
     }
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
        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);
            }
        }
Esempio n. 5
0
        /// <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
        }
Esempio n. 6
0
        /// <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
        }