public ISubscription GetById(string id) { var inner = Extensions.Synchronize(() => innerCollection.GetAsync(id)); if (inner == null) { return(null); } else { return(new SubscriptionImpl(inner, innerCollection)); } }
/// <summary> /// Gets specific API of the Api Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <returns> /// Get Subscription operation response details. /// </returns> public static Task <SubscriptionGetResponse> GetAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid) { return(operations.GetAsync(resourceGroupName, serviceName, sid, CancellationToken.None)); }
/// <summary> /// Gets details about a specified subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The ID of the target subscription. /// </param> public static SubscriptionModel Get(this ISubscriptionsOperations operations, string subscriptionId) { return(operations.GetAsync(subscriptionId).GetAwaiter().GetResult()); }
/// <summary> /// Returns a subscription description for the specified topic. /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='namespaceName'> /// The namespace name /// </param> /// <param name='topicName'> /// The topic name. /// </param> /// <param name='subscriptionName'> /// The subscription name. /// </param> public static SBSubscription Get(this ISubscriptionsOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName) { return(operations.GetAsync(resourceGroupName, namespaceName, topicName, subscriptionName).GetAwaiter().GetResult()); }