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