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


C# Connection.Authenticate方法代码示例

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


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

示例1: BeginProcessing

        protected override void BeginProcessing()
        {
            // Sample for now...credentials will move out (obviously)
            Connection = new Connection("youtrack.jetbrains.net");

            Connection.Authenticate("youtrackapi", "youtrackapi");
        }
开发者ID:dnolf,项目名称:YouTrackSharp,代码行数:7,代码来源:YouTrackCmdlet.cs

示例2: Main

        static void Main(string[] args)
        {
            var connection = new Connection("youtrack.lamione.cz");
            connection.Authenticate("root", "hop,scotch3");
            var issueManagement = new IssueManagement(connection);

            var issues = issueManagement.GetAllIssuesForProject("HM").ToArray();
            var metaissues = issues.
                Cast<dynamic>().
                ToDictionary(iss => (string) iss.Id, issue => new SyncIssue
                {
                    Id = issue.Id,
                    Summary = issue.Summary,
                    Subtasks = GetSubtasks(issue.Links),
                    Type = issue.Type
                });

            var tree = from issue in metaissues
                       where issue.Value.Type == "Requirement"
                       select new SyncIssue
                       {
                           Id = issue.Key,
                           Summary = issue.Value.Summary,
                           Childs = GetChilds(issue.Value.Subtasks.Select(sub => sub.Value), metaissues),
                           Type = issue.Value.Type
                       };

            Console.WriteLine("END");
        }
开发者ID:bosak,项目名称:KlokTrack,代码行数:29,代码来源:Program.cs

示例3: SetConnection

		private void SetConnection()
		{
			if (!_isAuthenticated)
			{
				UserCredentials creds = new UserCredentials(Username, AccessKey);
				_client = new CF_Client();
				_conn = new CF_Connection(creds, _client);
				_conn.Authenticate();
				CheckContainer();
				_isAuthenticated = true;
			}
		}
开发者ID:evkap,项目名称:DVS,代码行数:12,代码来源:DocumentStorageRackspaceStorage.cs

示例4: DeleteAll

        public void DeleteAll()
        {
            var conn = new Connection("localhost", 2669);
            conn.Authenticate("root", "10Pounds");

            var issueManagement = new IssueManagement(conn);

            foreach (var issueId in issueManagement.GetAllIssuesForProject("EJ").Select(x => x.Id))
            {
                var conn1 = new Connection("localhost", 2669);
                conn1.Authenticate("root", "10Pounds");
                var issueManagement1 = new IssueManagement(conn1);

                issueManagement1.ApplyCommand(issueId, "remove", string.Empty);
            }
        }
开发者ID:timbooker,项目名称:QCToYouTrack,代码行数:16,代码来源:ImportLauncher.cs

示例5: Connect

        public Connection Connect()
        {
            var connection = new Connection(
                this.youTrackSettings.Host,
                this.youTrackSettings.Port,
                this.youTrackSettings.UseSSL);

            if (!string.IsNullOrEmpty(this.youTrackSettings.Username))
            {
                connection.Authenticate(this.youTrackSettings.Username, this.youTrackSettings.Password);

                var projectManagement = new ProjectManagement(connection);

                this.ProjectStates = projectManagement.GetStates();
                this.ResolvedStates = projectManagement.GetResolutions();
                this.ProjectPriorities = projectManagement.GetPriorities();
            }

            return connection;
        }
开发者ID:e-llumin,项目名称:YouTrackForReSharper,代码行数:20,代码来源:YouTrackServer.cs

示例6: Go

        public void Go()
        {
            var rep = new BugRepository();
            foreach (var issue in rep.GetBugs().Select(bug => new Issue()
                                                                {
                                                                    Summary = bug.Summary,
                                                                    Description = PandocHelper.Convert(bug.Description).Replace("<br />", string.Empty),
                                                                    Assignee = "Unassigned",
                                                                    State = MapBugStatus(bug.Status),
                                                                    Type = "Bug",
                                                                    ProjectShortName = "EJ"
                                                                }))
            {
                var conn = new Connection("localhost", 2669);
                conn.Authenticate("root", "10Pounds");

                var issueManagement = new IssueManagement(conn);

                issueManagement.CreateIssue(issue);
            }
        }
开发者ID:timbooker,项目名称:QCToYouTrack,代码行数:21,代码来源:ImportLauncher.cs

示例7: CreateIssueManagement

        private static IssueManagement CreateIssueManagement(Config config)
        {
            var connection = new Connection(config.Host, config.Port, config.UseSsl, config.Path);
            if (!string.IsNullOrEmpty(config.Username) && !string.IsNullOrEmpty(config.Password))
            {
                connection.Authenticate(config.Username, config.Password);
            }

            return new IssueManagement(connection);
        }
开发者ID:Wolfium,项目名称:Elmah.YouTrack,代码行数:10,代码来源:YouTrackErrorModule.cs

示例8: YouTrackGate

 public YouTrackGate(string username,string password, List<IProjectTreeGetter> getterModules)
 {
     GetterModules = getterModules;
     connection = new Connection(YoutrackServerAddress);
     connection.Authenticate(username,password);
 }
开发者ID:bosak,项目名称:KlokTrack,代码行数:6,代码来源:YouTrackGate.cs


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