Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && this.Client != null)
     {
         this.Client.Dispose();
         this.Client = null;
     }
 }
Example #2
0
        protected override void BeginProcessing()
        {
            // TODO: Debug output
            // TODO: Exception handling
            NetworkCredential netCredential = null;

            if (this.Credential != null)
            {
                // Convert PSCredential to NetworkCredential
                netCredential = this.Credential.GetNetworkCredential();
            }
            this.Client = new AdsiClient(this.Server, netCredential);
        }