public static void RaiseThemeChanged(string themeName, string controlThemeClassName)
 {
     lock (ThemeResolutionService.syncRoot)
     {
         if (ThemeResolutionService.themeChangeSuspendCounter > 0)
         {
             ThemeResolutionService.ThemeChangeInfo themeChangeInfo = new ThemeResolutionService.ThemeChangeInfo(themeName, controlThemeClassName);
             if (ThemeResolutionService.themesChangeDuringSuspend.Contains(themeChangeInfo))
             {
                 return;
             }
             ThemeResolutionService.themesChangeDuringSuspend.AddLast(themeChangeInfo);
         }
         else
         {
             ThemeChangedEventArgs e = new ThemeChangedEventArgs(themeName);
             foreach (IThemeChangeListener themeChangeListener in ThemeResolutionService.themeChangeListeners)
             {
                 if (string.IsNullOrEmpty(controlThemeClassName) || string.CompareOrdinal(controlThemeClassName, themeChangeListener.ControlThemeClassName) == 0)
                 {
                     themeChangeListener.OnThemeChanged(e);
                 }
             }
         }
     }
 }
 public override bool Equals(object obj)
 {
     ThemeResolutionService.ThemeChangeInfo themeChangeInfo = obj as ThemeResolutionService.ThemeChangeInfo;
     if (themeChangeInfo == null || !(themeChangeInfo.themeName == this.themeName))
     {
         return(false);
     }
     return(themeChangeInfo.targetThemeClassName == this.targetThemeClassName);
 }