Exemplo n.º 1
0
 /// <summary>
 /// Creates a new peer ASN or updates an existing peer ASN with the specified
 /// name under the given subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='peerAsnName'>
 /// The peer ASN name.
 /// </param>
 /// <param name='peerAsn'>
 /// The peer ASN.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PeerAsn> CreateOrUpdateAsync(this IPeerAsnsOperations operations, string peerAsnName, PeerAsn peerAsn, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(peerAsnName, peerAsn, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Lists all of the peer ASNs under the given subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <PeerAsn> > ListBySubscriptionNextAsync(this IPeerAsnsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new peer ASN or updates an existing peer ASN with the specified
 /// name under the given subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='peerAsnName'>
 /// The peer ASN name.
 /// </param>
 /// <param name='peerAsn'>
 /// The peer ASN.
 /// </param>
 public static PeerAsn CreateOrUpdate(this IPeerAsnsOperations operations, string peerAsnName, PeerAsn peerAsn)
 {
     return(operations.CreateOrUpdateAsync(peerAsnName, peerAsn).GetAwaiter().GetResult());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Gets the peer ASN with the specified name under the given subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='peerAsnName'>
 /// The peer ASN name.
 /// </param>
 public static PeerAsn Get(this IPeerAsnsOperations operations, string peerAsnName)
 {
     return(operations.GetAsync(peerAsnName).GetAwaiter().GetResult());
 }
Exemplo n.º 5
0
 /// <summary>
 /// Lists all of the peer ASNs under the given subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <PeerAsn> ListBySubscriptionNext(this IPeerAsnsOperations operations, string nextPageLink)
 {
     return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Lists all of the peer ASNs under the given subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <PeerAsn> ListBySubscription(this IPeerAsnsOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
Exemplo n.º 7
0
 /// <summary>
 /// Deletes an existing peer ASN with the specified name under the given
 /// subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='peerAsnName'>
 /// The peer ASN name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IPeerAsnsOperations operations, string peerAsnName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(peerAsnName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 8
0
 /// <summary>
 /// Deletes an existing peer ASN with the specified name under the given
 /// subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='peerAsnName'>
 /// The peer ASN name.
 /// </param>
 public static void Delete(this IPeerAsnsOperations operations, string peerAsnName)
 {
     operations.DeleteAsync(peerAsnName).GetAwaiter().GetResult();
 }