• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# RedmineManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Should_Connect_With_Username_And_Password

 public void Should_Connect_With_Username_And_Password()
 {
     var a = new RedmineManager(Helper.Uri, Helper.Username, Helper.Password);
     var currentUser = a.GetCurrentUser();
     Assert.NotNull(currentUser);
     Assert.True(currentUser.Login.Equals(Helper.Username), "usernames not equals.");
 }
开发者ID:Jopie64,项目名称:redmine-net-api,代码行数:7,代码来源:RedmineTest.cs


示例2: Should_Connect_With_Api_Key

 public void Should_Connect_With_Api_Key()
 {
     var a = new RedmineManager(Helper.Uri, Helper.ApiKey);
     var currentUser = a.GetCurrentUser();
     Assert.NotNull(currentUser);
     Assert.True(currentUser.ApiKey.Equals(Helper.ApiKey),"api keys not equals.");
 }
开发者ID:Jopie64,项目名称:redmine-net-api,代码行数:7,代码来源:RedmineTest.cs


示例3: 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


示例4: ProjectManagerGateway

        public ProjectManagerGateway(RedmineSettings redmineSettings)
        {
            Require.NotNull(redmineSettings, nameof(redmineSettings));

            _redmineSettings = redmineSettings;
            _redmineManager = new RedmineManager(redmineSettings.RedmineHost, redmineSettings.ApiKey);
        }
开发者ID:LeagueOfDevelopers,项目名称:LodCore,代码行数:7,代码来源:ProjectManagerGateway.cs


示例5: BaseService

        public BaseService()
        {
            const string host = "";
            const string apiKey = "";

            RedmineService = new RedmineManager(host, apiKey);
        }
开发者ID:elpikel,项目名称:Publisher,代码行数:7,代码来源:BaseService.cs


示例6: GetCredentialsIfNeeded

        private static bool GetCredentialsIfNeeded(Configuration configuration)
        {
            if (configuration.OpenTickets)
            {
                // Get use name and password
                Console.Write("Redmine Username: ");
                _user = Console.ReadLine();

                Console.Write("Redmine password: ");
                _password = Console.ReadLine();

                _redmineManager = new RedmineManager(configuration.RedmineUrl, _user, _password);
                try
                {
                    _redmineManager.GetCurrentUser();
                    return true;
                }
                catch (RedmineException)
                {
                    return false;
                }
            }

            return true;
        }
开发者ID:dinazil,项目名称:dump-analyzer,代码行数:25,代码来源:Program.cs


示例7: getManager

		private RedmineManager getManager() {
			if (manager == null) {
				try {
					manager = new RedmineManager(buffer.host, buffer.apikey);
					System.Net.ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(bypassAllCertificateStuff);
				} catch (Redmine.Net.Api.RedmineException e) {
					MessageBox.Show(e.Message,"Connection Error.");
					manager = null;
				}
			}
			return manager;			
		}
开发者ID:lanji,项目名称:GreenshotRedmineUploader,代码行数:12,代码来源:RedmineSettings.cs


示例8: 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


示例9: 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


示例10: Client

 public Client(string login, string password, string host)
 {
     this.login = login;
     this.password = password;
     this.host = host;
     manager = new RedmineManager(host, login, password);
     cacheissue = this.GetTotalIssue();
     totalissue = this.GetTotalIssue();
     totalproject = this.GetTotalProject();
     projects = this.GetProjects();
     _instance = this;
 }
开发者ID:joker946,项目名称:RedmineUpdateClient,代码行数:12,代码来源:Client.cs


示例11: ConnectRMServer

        public static void ConnectRMServer(RMConnectCmdletBase cmdlet)
        {
//            Redmine.Net.Api.RedmineWebClient client =
//                new RedmineWebClient();
//            client.
                
            string host = "";
            string apiKey = "";

            var manager = new RedmineManager(host, apiKey);

//            var parameters = new NameValueCollection {{"status_id", "*"}};
//            foreach (var issue in manager.GetObjectList<Issue>(parameters))
//            {
//                Console.WriteLine("#{0}: {1}", issue.Id, issue.Subject);
//            }
//
//            //Create a issue.
//            var newIssue = new Issue { Subject = "test", Project = new IdentifiableName{Id =  1}};
//            manager.CreateObject(newIssue);
        }
开发者ID:MatkoHanus,项目名称:STUPS,代码行数:21,代码来源:RMHelper.cs


示例12: AddToList

        private void AddToList(RedmineManager manager)
        {
            var textData = textBox.Text;

            foreach (var issue in list)
            {
                var s = issue.Tracker.ToString();
                s = s.Remove(0, 3);

                string vParsed = "";
                var v = issue.FixedVersion;

                if (v != null)
                    vParsed = v.ToString().Remove(0, 3);

                if (string.IsNullOrWhiteSpace(textData))
                    listBox.Items.Add("#" + issue.Id + ": " + s + " - " + issue.Subject + " " + vParsed);
                else
                    if (vParsed.Contains(textData))
                    listBox.Items.Add("#" + issue.Id + ": " + s + " - " + issue.Subject + " " + vParsed);
            }
        }
开发者ID:Koaleo,项目名称:AutomaticMail,代码行数:22,代码来源:MainWindow.xaml.cs


示例13: 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


示例14: SetMimeTypeXML

 private void SetMimeTypeXML()
 {
     redmineManager = new RedmineManager(uri, apiKey, MimeFormat.xml);
 }
开发者ID:ANovitsky,项目名称:redmine-net-api,代码行数:4,代码来源:IssueTests.cs


示例15: SetMimeTypeJSON

 private void SetMimeTypeJSON()
 {
     redmineManager = new RedmineManager(uri, apiKey, MimeFormat.json);
 }
开发者ID:ANovitsky,项目名称:redmine-net-api,代码行数:4,代码来源:IssueTests.cs


示例16: SetMimeTypeXML

 private void SetMimeTypeXML()
 {
     redmineManager = new RedmineManager(Helper.Uri, Helper.ApiKey, MimeFormat.xml);
 }
开发者ID:Enhakiel,项目名称:redmine-net-api,代码行数:4,代码来源:WikiPageTests.cs


示例17: SetMimeTypeJSON

 private void SetMimeTypeJSON()
 {
     redmineManager = new RedmineManager(Helper.Uri, Helper.ApiKey, MimeFormat.json);
 }
开发者ID:Enhakiel,项目名称:redmine-net-api,代码行数:4,代码来源:WikiPageTests.cs


示例18: Initialize

 public void Initialize()
 {
     redmineManager = new RedmineManager(Helper.Uri, Helper.ApiKey);
 }
开发者ID:Enhakiel,项目名称:redmine-net-api,代码行数:4,代码来源:UnitTest1.cs


示例19: LoadLoggerData

        private void LoadLoggerData()
        {
            _manager = new RedmineManager(Settings.HostUrl, Settings.UserApiKey); //, MimeFormat.xml, true, CultureInfo.GetCultureInfo("es-MX"));

            _manager.DownloadCompleted += ManagerDownloadCompleted;

            BusyOperations++;
            _manager.GetCurrentUserAsync();
        }
开发者ID:salvadorhgr,项目名称:redmine-timelogger,代码行数:9,代码来源:RedmineLoggerViewModel.cs


示例20: RedmineLogWriter

 /// <summary>
 /// 
 /// </summary>
 /// <param name="redmineConfiguration"></param>
 public RedmineLogWriter(RedmineConfiguration redmineConfiguration)
 {
     this._redmineConfiguration = redmineConfiguration;
     this._redmineManager = new RedmineManager(this._redmineConfiguration.HostAddress, this._redmineConfiguration.ApiKey);
 }
开发者ID:Fel0ny,项目名称:QuickLog,代码行数:9,代码来源:RedmineLogWriter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ref类代码示例发布时间:2022-05-24
下一篇:
C# RedisValue类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap