/// <summary> /// Constructor /// </summary> public SmbServer() { this.context = new SmbServerContext(); }
/// <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; } // dispose the gssapi of all connection if (this.context != null) { foreach (SmbServerConnection connection in this.context.ConnectionList) { if (connection != null) { connection.DisposeGssApi(); } } this.context = null; } } // Call the appropriate methods to clean up unmanaged resources. // If disposing is false, only the following code is executed: this.disposed = true; } }