/// <summary>
 /// default constructor. constructor class with default values. 
 /// </summary>
 public SmbClient()
 {
     this.capability = new SmbClientCapability();
     this.cifsClient = new CifsClient(new CifsClientConfig());
     ObjectUtility.InvokeMethod(this.cifsClient, "SetContext", new object[] { new SmbClientContext(this) });
 }
        /// <summary>
        /// Release resources. 
        /// </summary>
        /// <param name = "disposing">
        /// If disposing equals true, Managed and unmanaged resources are disposed. if false, Only unmanaged resources 
        /// can be disposed. 
        /// </param>
        protected virtual void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                // If disposing equals true, dispose all managed and unmanaged resources.
                if (disposing)
                {
                    // Free managed resources & other reference types:
                    if (this.transport != null)
                    {
                        this.transport.Dispose();
                        this.transport = null;
                    }
                    if (this.cifsClient != null)
                    {
                        // dispose the gssapi of connection
                        if (this.Context != null && this.Context.Connection != null)
                        {
                            this.Context.Connection.DisposeGssApi();
                        }
                        this.cifsClient.Dispose();
                        this.cifsClient = null;
                    }
                }

                // Call the appropriate methods to clean up unmanaged resources.
                // If disposing is false, only the following code is executed:

                this.disposed = true;
            }
        }
        /// <summary>
        /// Release resources.
        /// </summary>
        /// <param name="disposing">If disposing equals true, Managed and unmanaged resources are disposed.
        /// if false, Only unmanaged resources can be disposed.</param>
        protected override void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                // If disposing equals true, dispose all managed and unmanaged resources.
                if (disposing)
                {
                    // Free managed resources & other reference types:
                }

                // Call the appropriate methods to clean up unmanaged resources.
                if (this.cifsClient != null)
                {
                    this.cifsClient.Dispose();
                    this.cifsClient = null;
                }
                base.Dispose(disposing);
                this.disposed = true;
            }
        }
 /// <summary>
 /// Constructor
 /// </summary>
 public CifsClientTransport(CifsClientConfig config)
 {
     this.config = config;
     this.cifsClient = new CifsClient(this.config);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public CifsClientTransport()
     : base()
 {
     this.config = new CifsClientConfig();
     this.cifsClient = new CifsClient(this.config);
 }