MsgPack.Rpc.Client.RpcClient.Dispose C# (CSharp) Method

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void
		public void Dispose()
		{
			this._isDisposed = true;
			var transport = Interlocked.CompareExchange( ref this._transport, null, null );
			if ( transport != null )
			{
				transport.Dispose();
			}

			this._transportManager.Dispose();
		}

Usage Example

Example #1
0
 public void TestDispose_Twise_Harmless()
 {
     using (var environment = new InProcTestEnvironment())
     {
         var target = new RpcClient(_loopbackEndPoint, environment.Configuration, null);
         target.Dispose();
         target.Dispose();
     }
 }
All Usage Examples Of MsgPack.Rpc.Client.RpcClient::Dispose