Esempio n. 1
0
 public void CleanupEventHandlers()
 {
     if (ThumbnailLoaded != null)
     {
         foreach (Delegate d in ThumbnailLoaded.GetInvocationList())
         {
             ThumbnailLoaded -= (EventHandler)d;
         }
     }
     if (Populated != null)
     {
         foreach (Delegate d in Populated.GetInvocationList())
         {
             Populated -= (EventHandler)d;
         }
     }
     if (Unpopulated != null)
     {
         foreach (Delegate d in Unpopulated.GetInvocationList())
         {
             Unpopulated -= (EventHandler)d;
         }
     }
     if (Renamed != null)
     {
         foreach (Delegate d in Renamed.GetInvocationList())
         {
             Renamed -= (EventHandler)d;
         }
     }
     if (Demoted != null)
     {
         foreach (Delegate d in Demoted.GetInvocationList())
         {
             Demoted -= (EventHandler)d;
         }
     }
     if (Deleted != null)
     {
         foreach (Delegate d in Deleted.GetInvocationList())
         {
             Deleted -= (EventHandler)d;
         }
     }
 }
 public Delegate[] DeletedListeners()
 {
     return(Deleted.GetInvocationList());
 }