Exemplo n.º 1
0
        private bool disposedValue; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // dispose managed state (managed objects).
                }

                // free unmanaged resources (unmanaged objects) and override a finalizer below.
                wService.Dispose();
                disposedValue = true;
            }
        }
Exemplo n.º 2
0
 public void Dispose()
 {
     _watcherService?.Dispose();
     _discordClient?.Dispose();
 }