/// <summary> /// Releases all associated resources. /// </summary> /// <param name="disposing">Pass <c>true</c> if we're disposing, <c>false</c> if we're finalizing.</param> protected virtual void Dispose(bool disposing) { if (disposing) { JsonClient.Dispose(); GC.SuppressFinalize(this); } }
/// <inheritdoc/> public void Dispose() { if (client != null) { client.Dispose(); client = null; } }
public void Connect() { JsonClient?.Dispose(); JsonClient = new JsonServiceClient(HostUrl); GetCapabilities(); CreateAuthenticatedSession(); }
/// <summary> /// Releases all associated resources. /// </summary> /// <param name="disposing">Pass <c>true</c> if we're disposing, <c>false</c> if we're finalizing.</param> protected virtual void Dispose(bool disposing) { lock (_jsonClient) { if (!_isDisposed) { _jsonClient.Dispose(); _isDisposed = true; } } }
/// <inheritdoc/> public override void Reset() { if (!IsDisposed) { JsonClient?.Dispose(); WebHost?.StopAsync().WaitWithoutAggregate(); JsonClient = null; WebHost = null; } }
/// <inheritdoc/> public override void Reset() { if (!IsDisposed) { JsonClient.Dispose(); WebHost.StopAsync().Wait(); JsonClient = null; WebHost = null; } }
/// <summary> /// Releases all associated resources. /// </summary> /// <param name="disposing">Pass <c>true</c> if we're disposing, <c>false</c> if we're finalizing.</param> protected virtual void Dispose(bool disposing) { if (disposing) { lock (syncLock) { if (jsonClient != null) { jsonClient.Dispose(); jsonClient = null; } } GC.SuppressFinalize(this); } jsonClient = null; }
/// <inheritdoc/> public void Dispose() { jsonClient.Dispose(); }