public override void ExecuteCmdlet() { Repository repository = GetRepository(Name); if (repository == null) { throw new Exception(Resources.RepositoryNotSetup); } this.Repository = repository; DeploymentChannel = CreateDeploymentChannel(repository); }
protected IDeploymentServiceManagement CreateDeploymentChannel(Repository repository) { // 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 (ShareChannel) { return DeploymentChannel; } return ChannelHelper.CreateServiceManagementChannel<IDeploymentServiceManagement>( new Uri(repository.RepositoryUri), repository.PublishingUsername, repository.PublishingPassword, new HttpRestMessageInspector(WriteDebug)); }
private string GetWebsiteDeploymentHttpConfiguration( string name, out Repository repository, out ICredentials credentials) { name = GetWebsiteName(name); repository = GetRepository(name); credentials = new NetworkCredential( repository.PublishingUsername, repository.PublishingPassword); return name; }