public override void ExecuteCmdlet() { CloudServiceClient = CloudServiceClient ?? new CloudServiceClient( CurrentSubscription, SessionState.Path.CurrentLocation.Path, WriteDebug, WriteVerbose, WriteWarning); Deployment deployment = CloudServiceClient.PublishCloudService( ServiceName, Slot, Location, AffinityGroup, StorageAccountName, DeploymentName, Launch); WriteObject(deployment); }
public override void ExecuteCmdlet() { CloudServiceClient = CloudServiceClient ?? new CloudServiceClient( Profile, Profile.Context.Subscription, SessionState.Path.CurrentLocation.Path, WriteDebug, WriteVerbose, WriteWarning); Deployment deployment; if (!string.IsNullOrEmpty(Package)) { deployment = CloudServiceClient.PublishCloudService( Package, Configuration, Slot, Location, AffinityGroup, StorageAccountName, DeploymentName, Launch, ForceUpgrade); } else { deployment = CloudServiceClient.PublishCloudService( ServiceName, Slot, Location, AffinityGroup, StorageAccountName, DeploymentName, Launch, ForceUpgrade); } WriteObject(deployment); }