UnsubscribeEvents() private method

private UnsubscribeEvents ( ) : void
return void
コード例 #1
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);
 }
コード例 #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);
 }