private void bttnClearBlaclistedThumbs_Click(object sender, EventArgs e) { IVideoThumbBlacklist blacklist; if (GlobalServiceProvider.IsRegistered <IVideoThumbBlacklist>()) { blacklist = GlobalServiceProvider.Get <IVideoThumbBlacklist>(); } else { blacklist = new VideoThumbBlacklistDBImpl(); GlobalServiceProvider.Add <IVideoThumbBlacklist>(blacklist); } if (blacklist != null) { blacklist.Clear(); } }
private void ClearBlacklistedThumbs() { IVideoThumbBlacklist blacklist; if (GlobalServiceProvider.IsRegistered <IVideoThumbBlacklist>()) { blacklist = GlobalServiceProvider.Get <IVideoThumbBlacklist>(); } else { blacklist = new VideoThumbBlacklistDBImpl(); GlobalServiceProvider.Add <IVideoThumbBlacklist>(blacklist); } if (blacklist != null) { blacklist.Clear(); } }