当前位置: 首页>>代码示例>>C#>>正文


C# RedmineManager.GetObjectList方法代码示例

本文整理汇总了C#中RedmineManager.GetObjectList方法的典型用法代码示例。如果您正苦于以下问题:C# RedmineManager.GetObjectList方法的具体用法?C# RedmineManager.GetObjectList怎么用?C# RedmineManager.GetObjectList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RedmineManager的用法示例。


在下文中一共展示了RedmineManager.GetObjectList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

        public bool Create()
        {
            try
            {
                RedmineManager manager = new RedmineManager(Configuration.RedmineHost,
                    Configuration.RedmineUser, Configuration.RedminePassword);

                //Create a issue.
                var newIssue = new Issue
                {
                    Subject = Title,
                    Description = Description,
                    Project = new IdentifiableName() { Id = ProjectId },
                    Tracker = new IdentifiableName() { Id = TrackerId }
                };

                User thisuser = (from u in manager.GetObjectList<User>(new System.Collections.Specialized.NameValueCollection())
                                 where u.Login == Configuration.RedmineUser
                                 select u).FirstOrDefault();
                if (thisuser != null)
                    newIssue.AssignedTo = new IdentifiableName() { Id = thisuser.Id };

                manager.CreateObject(newIssue);
            }
            catch { return false; }
            return true;
        }
开发者ID:sumanta-mondal,项目名称:Voice2Redmine,代码行数:27,代码来源:IssueCreating.cs

示例2: GetTrackers

        public static Dictionary<string, int> GetTrackers()
        {
            RedmineManager manager = new RedmineManager(Configuration.RedmineHost,
                Configuration.RedmineUser, Configuration.RedminePassword);
            Dictionary<string, int> Trackers = new Dictionary<string, int>();

            foreach (Tracker track in manager.GetObjectList<Tracker>(new NameValueCollection()))
            {
                Trackers.Add(track.Name, track.Id);
            }
            return Trackers;
        }
开发者ID:sumanta-mondal,项目名称:Voice2Redmine,代码行数:12,代码来源:Host.cs

示例3: GetProjects

        public static Dictionary<string, int> GetProjects()
        {
            RedmineManager manager = new RedmineManager(Configuration.RedmineHost,
                Configuration.RedmineUser, Configuration.RedminePassword);
            Dictionary<string, int> Projects = new Dictionary<string, int>();

            foreach (Project proj in manager.GetObjectList<Project>(new NameValueCollection()))
            {
                Projects.Add(proj.Name, proj.Id);
            }
            return Projects;
        }
开发者ID:sumanta-mondal,项目名称:Voice2Redmine,代码行数:12,代码来源:Host.cs

示例4: button_Click

        private void button_Click(object sender, RoutedEventArgs e)
        {
            JasonInformations info = new JasonInformations();

            var manager = new RedmineManager(info.host, textBoxUser.Text, passwordBox.Password);
            var parameters = new NameValueCollection { { "status_id", "*" }, { "limit", "100" } };

            try
            {
                var test = manager.GetObjectList<Issue>(parameters).ToList();
                MainWindow win2 = new MainWindow();
                win2.manager = manager;
                win2.subject = info.subject;
                win2.list = test;
                win2.info = info.destinatari;
                win2.Show();
                this.Close();
            }
            catch (Exception )
            {
                labelErrore.Visibility = Visibility.Visible;
                this.Show();
            }
        }
开发者ID:Koaleo,项目名称:AutomaticMail,代码行数:24,代码来源:Login.xaml.cs

示例5: connectRedmine

 private Boolean connectRedmine(String url)
 {
     try
     {
         var parameters = new NameValueCollection { { "name", "*" } };
         redmine = new RedmineManager(url, parser.apiKey);
         redmine.GetObjectList<Project>(parameters);
         return true;
     }
     catch (RedmineException error)
     {
         Console.WriteLine(error);
         return false;
     }
 }
开发者ID:wpayen,项目名称:RedmineProjectCreator,代码行数:15,代码来源:Form1.cs


注:本文中的RedmineManager.GetObjectList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。