/// <summary> /// /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this.disposed) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. this.slaveClients.SendenBeenden(); this.slaveClients.Dispose(); this.slaveClients = null; ChannelServices.UnregisterChannel(this.tcpEmpfangChannel); this.tcpEmpfangChannel = null; } // Call the appropriate methods to clean up // unmanaged resources here. // If disposing is false, // only the following code is executed. // Note disposing has been done. disposed = true; } }
/// <summary> /// /// </summary> public Master(string SystemName) { RemotingConfiguration.ApplicationName = SystemName; LifetimeServices.LeaseTime = TimeSpan.FromSeconds(5); LifetimeServices.RenewOnCallTime = TimeSpan.FromSeconds(5); this.slaveClients = new MoBaKommunikation.SlaveClients(); }
/// <summary> /// /// </summary> public void Stop() { if (this.slaveClients != null) { this.slaveClients.SendenBeenden(); this.slaveClients.Dispose(); this.slaveClients = null; } if (this.tcpEmpfangChannel != null) { ChannelServices.UnregisterChannel(this.tcpEmpfangChannel); this.tcpEmpfangChannel = null; } }