Ejemplo n.º 1
0
 public TeamCityClient(TeamCityAccount account)
 {
     client = new RestClient(account.ServerUrl)
     {
         Authenticator = new HttpBasicAuthenticator(account.User, account.Password)
     };
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            TeamCityAccount account;

            if (args.Length < 3 || args[0] == null || args[1] == null || args[2] == null)
            {
                account = new TeamCityAccount("user", "password", "teamcity:port");
            }
            else
            {
                account = new TeamCityAccount(args[0], args[1], args[2]);
            }

            var client = new TeamCityClient(account);
            var projects = client.GetProjects();
        }