コード例 #1
0
        public IIssueFilter[] GetFilters()
        {
            List <IIssueFilter> filters = new List <IIssueFilter>();

            try
            {
                foreach (RemoteFilter filter in _service.getSavedFilters(Token))
                {
                    filters.Add(new JiraFilter(this, filter));
                }
            }
            catch (Exception e) { Log.Warning(e); }
            try
            {
                foreach (RemoteFilter filter in _service.getFavouriteFilters(Token))
                {
                    JiraFilter jfilt = new JiraFilter(this, filter);
                    if (!filters.Contains(jfilt))
                    {
                        filters.Add(jfilt);
                    }
                }
            }
            catch (Exception e) { Log.Warning(e); }

            filters.Sort(new NameSorter <IIssueFilter>());

            RemoteServerInfo jiraInfo = _service.getServerInfo(_token);

            //if (new Version(jiraInfo.version) < new Version("4.0"))
            filters.Add(new JiraAllFilter(this));

            return(filters.ToArray());
        }