/// <summary> /// Initializes a new instance of the <see cref="SvnWrapperClient"/> class. /// </summary> /// <param name="credentials">The Subversion server's credentials.</param> public SvnWrapperClient(SvnCredentials credentials) { this.client = new SvnClient(); this.client.Authentication.DefaultCredentials = new NetworkCredential(credentials.Username, credentials.Password); this.credentials = credentials; }
/// <summary> /// Initialize this instance. /// </summary> private void Initialize() { log.Info("Initializing user cache from build server (please be patient)"); SvnCredentials vcsCredentials = new SvnCredentials(Config.GetVcsServerUrl(), Config.GetBuildServerUsername(), Config.GetVcsServerPassword()); IVcsClient svnClient = VcsServerClientFactory.Create<SvnWrapperClient>(vcsCredentials); TeamCityCredentials buildServerCredentials = new TeamCityCredentials(Config.GetBuildServerUrl(), Config.GetBuildServerUsername(), Config.GetBuildServerPassword()); IBuildServerClient teamCityClient = BuildServerClientFactory.Create<TeamCityWrapperClient>(buildServerCredentials, svnClient); // This is supposed to crash this server if the remote servers/services can't be reached this.userCache.Initialize(teamCityClient); }