UnsubscribeEvents() private method

private UnsubscribeEvents ( ) : void
return void
 public void DeleteSubscription(LogSubscription logSubscription)
 {
     logSubscription.LogProvider.Dispose();
     logSubscription.UnsubscribeEvents();
     using (var db = new SourceLogContext())
     {
         foreach (var logEntry in logSubscription.Log)
         {
             logEntry.ChangedFiles = null;
             logEntry.LogSubscription = logSubscription;
         }
         db.LogSubscriptions.Attach(logSubscription);
         db.LogSubscriptions.Remove(logSubscription);
         db.SaveChanges();
     }
     _logSubscriptions.Remove(logSubscription);
 }
示例#2
0
 public void DeleteSubscription(LogSubscription logSubscription)
 {
     logSubscription.LogProvider.Dispose();
     logSubscription.UnsubscribeEvents();
     using (var db = new SourceLogContext())
     {
         foreach (var logEntry in logSubscription.Log)
         {
             logEntry.ChangedFiles    = null;
             logEntry.LogSubscription = logSubscription;
         }
         db.LogSubscriptions.Attach(logSubscription);
         db.LogSubscriptions.Remove(logSubscription);
         db.SaveChanges();
     }
     _logSubscriptions.Remove(logSubscription);
 }