예제 #1
0
        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;
                    }
                }
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 public static void DeleteUserLogActivity(int UserLogID)
 {
     SueetieCommon.DeleteUserLogActivity(UserLogID);
 }
예제 #5
0
 public static void LogUserEntry(UserLogEntry entry)
 {
     SueetieCommon.CreateUserLogEntry(entry);
 }
예제 #6
0
 public static void LogSiteEntry(SiteLogEntry entry)
 {
     SueetieCommon.CreateSiteLogEntry(entry);
 }
예제 #7
0
 private void Load()
 {
     this.All    = SueetieCommon.GetSueetieApplicationsList();
     this.Groups = SueetieCommon.GetSueetieGroupList();
 }