Ejemplo n.º 1
0
        protected IGithubServiceManagement CreateGithubChannel()
        {
            // If ShareChannel is set by a unit test, use the same channel that
            // was passed into out constructor.  This allows the test to submit
            // a mock that we use for all network calls.
            if (PSCmdlet.ShareChannel)
            {
                return(PSCmdlet.GithubChannel);
            }

            return(CreateServiceManagementChannel(
                       new Uri(GithubEndpoint),
                       Credentials.UserName,
                       Credentials.Password.ConvertToUnsecureString(),
                       PSCmdlet.GetLogger()));
        }