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


C# RedmineManager类代码示例

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


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


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