public void RunCommand(CommandHandler sender, List<string> args)
        {
            RetrievalType? type = null;

            if (args.HasItems())
            {
                if (args[0].EqualsIgnoreCase("schema"))
                {
                    type = RetrievalType.Schema;
                }
                else if (args[0].EqualsIgnoreCase("prices"))
                {
                    type = RetrievalType.PriceData;
                }
                else if (args[0].EqualsIgnoreCase("market"))
                {
                    type = RetrievalType.MarketData;
                }
                else if (args[0].EqualsIgnoreCase("backpack"))
                {
                    type = RetrievalType.BackpackContents;
                }
            }

            Refresh(type);
        }
        public void Collections_Are_Determined_To_Contain_No_Items()
        {
            //Arrange
            List<int> testObjects = new List<int>();

            bool result = false;

            //Act
            result = testObjects.HasItems();

            //Assert
            AssertFalse(result);
        }
        public FilterBehaviour IsIgnored(IStatusUpdate update)
        {
            var applicableFilters = new List<Filter>();

            if (update.Parents != null)
                foreach (IMicroblog microblog in update.Parents.ToList())
                {
                    try
                    {
                        foreach (UpdateType updateType in update.Types)
                        {
                            IEnumerable<Filter> matchingUpdates =
                                GetFiltersFor(microblog, updateType).Where(
                                    f => f.IsIncluded != FilterBehaviour.NoBehaviour);
                            applicableFilters.AddRange(matchingUpdates);
                        }
                    }
                    catch (Exception ex)
                    {
                        CompositionManager.Get<IExceptionReporter>().ReportHandledException(ex);
                    }
                }

            // do we have any excludes for these UpdateTypes
            if (applicableFilters.HasItems(f => f.IsIncluded == FilterBehaviour.Exclude))
                return FilterBehaviour.Exclude;

            IEnumerable<ContactFilter> matchingContacts = Filters.OfType<ContactFilter>().Where(f => f.IsMatch(update))
                .Where(f => f.IsIncluded != FilterBehaviour.NoBehaviour);

            applicableFilters.AddRange(matchingContacts);

            // do we have any excludes for this contact
            if (applicableFilters.HasItems(f => f.IsIncluded == FilterBehaviour.Exclude))
                return FilterBehaviour.Exclude;

            IEnumerable<TextFilter> textFilters = Filters.OfType<TextFilter>()
                .Where(filter => filter.IsMatch(update))
                .Where(f => f.IsIncluded != FilterBehaviour.NoBehaviour);
            applicableFilters.AddRange(textFilters);

            #region MahTweets Scripting : ScriptFilters assemblate

            if (_scriptmanager != null && (_scriptmanager.IsScriptEngineActive && ScriptFiltersActivated != null))
            {
                if (ScriptFiltersActivated.Count > 0)
                {
                    foreach (FilterBehaviour fb in from sf in ScriptFiltersActivated
                                                   let fb = FilterBehaviour.NoBehaviour
                                                   select ExecuteFilterScript(sf.ScriptKey, update)
                                                   into fb where fb != FilterBehaviour.NoBehaviour select fb)
                    {
                        if (fb == FilterBehaviour.Include)
                        {
                            // update.ColorARGB = sf.ScriptFilterColor.ToString();
                        }
                        return fb;
                    }
                }
            }

            #endregion

            // do we have any excludes for this text
            if (applicableFilters.HasItems(f => f.IsIncluded == FilterBehaviour.Exclude))
                return FilterBehaviour.Exclude;

            if (applicableFilters.HasItems(f => f.IsIncluded == FilterBehaviour.Include))
                return FilterBehaviour.Include;

            return FilterBehaviour.NoBehaviour;
        }