Esempio n. 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _smsservice.Dispose();
     }
     base.Dispose(disposing);
 }
Esempio n. 2
0
        private bool disposed = false;         // To detect redundant calls

        protected override void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects)
                    dbContext.Dispose();
                    smsService.Dispose();
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposed = true;
                base.Dispose(disposing);
            }
        }