Beispiel #1
0
        /// <summary>
        /// Stop
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public Task StopAsync(CancellationToken cancellationToken)
        {
            LogInfo("Stopped!");

            _connection.Dispose();
            _subscription.Dispose();
            return(Task.CompletedTask);
        }
Beispiel #2
0
 public void Stop()
 {
     if (subscription != null)
     {
         subscription.Dispose();
         subscription = null;
     }
     Resource.Service.With(Resource, closeCallback);
 }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (!disposing)
            {
                return;
            }

            subscription.MessageHandler -= OnIncomingMessage;
            subscription.Dispose();
        }
Beispiel #4
0
 public override void Dispose()
 {
     _subscription?.Dispose();
     _connection.Dispose();
     base.Dispose();
 }
Beispiel #5
0
 /// <inheritdoc />
 public void Dispose()
 {
     _subscription?.Unsubscribe();
     _subscription?.Dispose();
     _connection?.Dispose();
 }