コード例 #1
0
 protected override void ProcessRecord()
 {
     if (this.ID != Guid.Empty)
     {
         using (CSObject csobject = this.MAInstance.GetCSObject(this.ID)) {
             this.WriteObject(csobject);
         }
         return;
     }
     else if (!string.IsNullOrWhiteSpace(this.DN))
     {
         if (this.IncludeSubTree.IsPresent)
         {
             using (CSObjectEnumerator csobjects = this.MAInstance.GetCSObjects(this.DN, true)) {
                 this.WriteObject(csobjects, true);
             }
         }
         else
         {
             using (CSObject csobject = this.MAInstance.GetCSObject(this.DN))
             {
                 this.WriteObject(csobject);
             }
         }
         return;
     }
     else if (!string.IsNullOrWhiteSpace(this.Rdn))
     {
         using (CSObjectEnumerator csobjects = this.MAInstance.GetCSObjects(this.Rdn))
         {
             this.WriteObject(csobjects, true);
         }
         return;
     }
 }
コード例 #2
0
 protected override void ProcessRecord()
 {
     using (CSObjectEnumerator pendingImportUpdates = this.MAInstance.GetPendingImports(false, true, false))
         foreach (var item in pendingImportUpdates)
         {
             if (this.Delta.IsPresent)
             {
                 this.WriteObject(item.PendingImportDelta);
             }
             else if (this.Hologram.IsPresent)
             {
                 this.WriteObject(item.PendingImportHologram);
             }
             else
             {
                 this.WriteObject(item);
             }
         }
 }
コード例 #3
0
 protected override void ProcessRecord()
 {
     using (CSObjectEnumerator pendingExportAdds = this.MAInstance.GetPendingExports(true, false, false))
     {
         foreach (var item in pendingExportAdds)
         {
             if (this.Delta.IsPresent)
             {
                 this.WriteObject(item.UnappliedExportDelta);
             }
             else if (this.Hologram.IsPresent)
             {
                 this.WriteObject(item.UnappliedExportHologram);
             }
             else
             {
                 this.WriteObject(item);
             }
         }
     }
 }
コード例 #4
0
        protected override void ProcessRecord()
        {
            IEnumerable <CSObject> results;

            if (this.Type.HasValue)
            {
                using (CSObjectEnumerator disconnectors = this.MAInstance.GetDisconnectors(this.Type.Value))
                {
                    results = disconnectors;
                }
            }
            else
            {
                using (CSObjectEnumerator disconnectors = this.MAInstance.GetDisconnectors()) {
                    results = disconnectors;
                }
            }

            foreach (var item in results)
            {
                this.WriteObject(item);
            }
        }
コード例 #5
0
 protected override void ProcessRecord()
 {
     using (CSObjectEnumerator pendingExportRenames = this.MAInstance.GetPendingExports(false, true, false))
     {
         foreach (var item in pendingExportRenames)
         {
             if (!string.Equals(item.DN, item.UnappliedExportHologram.DN, StringComparison.OrdinalIgnoreCase))
             {
                 if (this.Delta.IsPresent)
                 {
                     this.WriteObject(item.UnappliedExportDelta);
                 }
                 else if (this.Hologram.IsPresent)
                 {
                     this.WriteObject(item.UnappliedExportHologram);
                 }
                 else
                 {
                     this.WriteObject(item);
                 }
             }
         }
     }
 }