Пример #1
0
 /// <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);
     }
 }
Пример #2
0
 /// <inheritdoc/>
 public void Dispose()
 {
     if (client != null)
     {
         client.Dispose();
         client = null;
     }
 }
Пример #3
0
        public void Connect()
        {
            JsonClient?.Dispose();

            JsonClient = new JsonServiceClient(HostUrl);

            GetCapabilities();

            CreateAuthenticatedSession();
        }
Пример #4
0
 /// <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;
         }
     }
 }
Пример #5
0
        /// <inheritdoc/>
        public override void Reset()
        {
            if (!IsDisposed)
            {
                JsonClient?.Dispose();
                WebHost?.StopAsync().WaitWithoutAggregate();

                JsonClient = null;
                WebHost    = null;
            }
        }
Пример #6
0
        /// <inheritdoc/>
        public override void Reset()
        {
            if (!IsDisposed)
            {
                JsonClient.Dispose();
                WebHost.StopAsync().Wait();

                JsonClient = null;
                WebHost    = null;
            }
        }
Пример #7
0
        /// <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;
        }
Пример #8
0
 /// <inheritdoc/>
 public void Dispose()
 {
     jsonClient.Dispose();
 }