/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.ISubscriptionOperations. /// </param> /// <param name='parameters'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static SubscriptionCreateOrUpdateResult CreateOrUpdate(this ISubscriptionOperations operations, SubscriptionCreateOrUpdateParameters parameters) { return Task.Factory.StartNew((object s) => { return ((ISubscriptionOperations)s).CreateOrUpdateAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Performs the API operation(s) against tenant subscriptions. /// </summary> protected override object ExecuteCore() { using (var client = this.GetAzureStackClient()) { this.WriteVerbose(Resources.CreatingNewSubscription.FormatArgs(this.Owner, this.OfferId, this.DisplayName)); var parameters = new SubscriptionCreateOrUpdateParameters(this.GetSubscriptionDefinition()); return client.Subscriptions.CreateOrUpdate(parameters).Subscription; } }
/// <summary> /// Performs the API operation(s) against tenant subscriptions. /// </summary> protected override object ExecuteCore() { using (var client = this.GetAzureStackClient()) { this.WriteVerbose(Resources.UpdatingSubscription.FormatArgs(this.Subscription.SubscriptionId, this.Subscription.Owner)); var parameters = new SubscriptionCreateOrUpdateParameters(this.Subscription); return client.Subscriptions.CreateOrUpdate(parameters).Subscription; } }
/// <summary> /// Your documentation here. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.AzureStack.Management.ISubscriptionOperations. /// </param> /// <param name='parameters'> /// Required. Your documentation here. /// </param> /// <returns> /// Your documentation here. /// </returns> public static Task<SubscriptionCreateOrUpdateResult> CreateOrUpdateAsync(this ISubscriptionOperations operations, SubscriptionCreateOrUpdateParameters parameters) { return operations.CreateOrUpdateAsync(parameters, CancellationToken.None); }