protected override void Dispose(bool disposing) { if (this.Site == null && this.IsDesignMode) { ThemeRepository.Remove(this.ThemeName); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (this.Site != null) { return; } Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (ThemeSource loadedTheme in this.loadedThemes) { if (loadedTheme.theme != null && !string.IsNullOrEmpty(loadedTheme.theme.Name) && !dictionary.ContainsKey(loadedTheme.theme.Name)) { dictionary.Add(loadedTheme.theme.Name, loadedTheme.theme.Name); } } foreach (string themeName in dictionary.Values) { ThemeRepository.Remove(themeName); } base.Dispose(disposing); }
public static void RemoveThemeRegistration(string themeName) { ThemeRepository.Remove(themeName); }