private void Load() { var settingsType = this.GetType(); var dic = SueetieCommon.GetSiteSettingsDictionary(); foreach (string key in dic.Keys) { var name = key; var value = dic[key]; foreach (var propertyInformation in settingsType.GetProperties()) { if (propertyInformation.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) { try { if (propertyInformation.CanWrite) { propertyInformation.SetValue(this, Convert.ChangeType(value, propertyInformation.PropertyType, CultureInfo.CurrentCulture), null); } } catch { } break; } } } }
private static List <CrawlerAgent> GetFilteredAgentList() { var key = FilteredAgentListCacheKey(); var crawlerAgents = SueetieCache.Current[key] as List <CrawlerAgent>; if (crawlerAgents == null) { crawlerAgents = SueetieCommon.GetCrawlerAgentList().Where(c => c.IsBlocked == false).ToList(); SueetieCache.Current.Insert(key, crawlerAgents); } return(crawlerAgents); }
public static List <UserLogActivity> GetUserLogActivityList(ContentQuery contentQuery) { // Will extend to filter and retrieve all site activity rather than by group (or top level - group 0) var _userLogActivityList = SueetieCommon.GetUserLogActivityList(contentQuery); var dayCheck = string.Empty; foreach (var _userLogActivity in _userLogActivityList) { if (_userLogActivity.DateTimeActivity.ToShortDateString() != dayCheck) { _userLogActivity.ShowHeader = true; dayCheck = _userLogActivity.DateTimeActivity.ToShortDateString(); } FormatUserLogRow(_userLogActivity); } return(_userLogActivityList); }
public static void DeleteUserLogActivity(int UserLogID) { SueetieCommon.DeleteUserLogActivity(UserLogID); }
public static void LogUserEntry(UserLogEntry entry) { SueetieCommon.CreateUserLogEntry(entry); }
public static void LogSiteEntry(SiteLogEntry entry) { SueetieCommon.CreateSiteLogEntry(entry); }
private void Load() { this.All = SueetieCommon.GetSueetieApplicationsList(); this.Groups = SueetieCommon.GetSueetieGroupList(); }