/// <summary>
 /// The Update Dedicated Circuit operation updates an existing
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. Service Key of the circuit being updated
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the update dedicated circuit
 /// operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself.  If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request.  If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static ExpressRouteOperationStatusResponse Update(this IDedicatedCircuitOperations operations, string serviceKey, DedicatedCircuitUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDedicatedCircuitOperations)s).UpdateAsync(serviceKey, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The Get Express Route operation status gets information on the
 /// status of Express Route operations in Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='operationId'>
 /// Required. The id  of the operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself.  If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request.  If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static ExpressRouteOperationStatusResponse GetOperationStatus(this IDedicatedCircuitOperations operations, string operationId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDedicatedCircuitOperations)s).GetOperationStatusAsync(operationId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The New Dedicated Circuit operation creates a new dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the New Dedicated Circuit
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginNew(this IDedicatedCircuitOperations operations, DedicatedCircuitNewParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDedicatedCircuitOperations)s).BeginNewAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The List Dedicated Circuit operation retrieves a list of dedicated
 /// circuits owned by the customer.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <returns>
 /// The List Dedicated Circuit operation response.
 /// </returns>
 public static DedicatedCircuitListResponse List(this IDedicatedCircuitOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDedicatedCircuitOperations)s).ListAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the ExpressRouteManagementClient
 /// class.
 /// </summary>
 private ExpressRouteManagementClient()
     : base()
 {
     this._bgpPeering                      = new BgpPeeringOperations(this);
     this._crossConnection                 = new CrossConnectionOperations(this);
     this._dedicatedCircuitLink            = new DedicatedCircuitLinkOperations(this);
     this._dedicatedCircuit                = new DedicatedCircuitOperations(this);
     this._dedicatedCircuitServiceProvider = new DedicatedCircuitServiceProviderOperations(this);
     this.HttpClient.Timeout               = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the ExpressRouteManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private ExpressRouteManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._borderGatewayProtocolPeerings = new BorderGatewayProtocolPeeringOperations(this);
     this._crossConnections                 = new CrossConnectionOperations(this);
     this._dedicatedCircuitLinks            = new DedicatedCircuitLinkOperations(this);
     this._dedicatedCircuits                = new DedicatedCircuitOperations(this);
     this._dedicatedCircuitServiceProviders = new DedicatedCircuitServiceProviderOperations(this);
     this._apiVersion = "2011-10-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 7
0
 /// <summary>
 /// The List Dedicated Circuit operation retrieves a list of dedicated
 /// circuits owned by the customer.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <returns>
 /// The List Dedicated Circuit operation response.
 /// </returns>
 public static DedicatedCircuitListResponse List(this IDedicatedCircuitOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// The Remove Dedicated Circuit operation deletes an existing
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key representing the dedicated circuit to be deleted.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginRemove(this IDedicatedCircuitOperations operations, string serviceKey)
 {
     try
     {
         return(operations.BeginRemoveAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// The New Dedicated Circuit operation creates a new dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the New Dedicated Circuit operation.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginNew(this IDedicatedCircuitOperations operations, DedicatedCircuitNewParameters parameters)
 {
     try
     {
         return(operations.BeginNewAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// The Get Dedicated Circuit operation retrieves the specified
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the circuit.
 /// </param>
 /// <returns>
 /// The Get Dedicated Circuit operation response.
 /// </returns>
 public static DedicatedCircuitGetResponse Get(this IDedicatedCircuitOperations operations, string serviceKey)
 {
     try
     {
         return(operations.GetAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the ExpressRouteManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public ExpressRouteManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._authorizedDedicatedCircuits   = new AuthorizedDedicatedCircuitOperations(this);
     this._borderGatewayProtocolPeerings = new BorderGatewayProtocolPeeringOperations(this);
     this._crossConnections = new CrossConnectionOperations(this);
     this._dedicatedCircuitLinkAuthorizationMicrosoftIds = new DedicatedCircuitLinkAuthorizationMicrosoftIdOperations(this);
     this._dedicatedCircuitLinkAuthorizations            = new DedicatedCircuitLinkAuthorizationOperations(this);
     this._dedicatedCircuitLinks                    = new DedicatedCircuitLinkOperations(this);
     this._dedicatedCircuits                        = new DedicatedCircuitOperations(this);
     this._dedicatedCircuitPeeringArpInfo           = new DedicatedCircuitPeeringArpInfoOperations(this);
     this._dedicatedCircuitPeeringRouteTableInfo    = new DedicatedCircuitPeeringRouteTableInfoOperations(this);
     this._dedicatedCircuitPeeringRouteTableSummary = new DedicatedCircuitPeeringRouteTableSummaryOperations(this);
     this._dedicatedCircuitServiceProviders         = new DedicatedCircuitServiceProviderOperations(this);
     this._dedicatedCircuitStats                    = new DedicatedCircuitStatsOperations(this);
     this._apiVersion = "2011-10-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// The New Dedicated Circuit operation creates a new dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the New Dedicated Circuit
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <ExpressRouteOperationResponse> BeginNewAsync(this IDedicatedCircuitOperations operations, DedicatedCircuitNewParameters parameters)
 {
     return(operations.BeginNewAsync(parameters, CancellationToken.None));
 }
 /// <summary>
 /// The Get Express Route operation status gets information on the
 /// status of Express Route operations in Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='operationId'>
 /// Required. The id  of the operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself.  If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request.  If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static Task <ExpressRouteOperationStatusResponse> GetOperationStatusAsync(this IDedicatedCircuitOperations operations, string operationId)
 {
     return(operations.GetOperationStatusAsync(operationId, CancellationToken.None));
 }
Exemplo n.º 14
0
 /// <summary>
 /// The New Dedicated Circuit operation creates a new dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Virtual Network Gateway
 /// operation.
 /// </param>
 /// <returns>
 /// The Get Dedicated Circuit operation response.
 /// </returns>
 public static Task <DedicatedCircuitGetResponse> NewAsync(this IDedicatedCircuitOperations operations, DedicatedCircuitNewParameters parameters)
 {
     return(operations.NewAsync(parameters, CancellationToken.None));
 }
 /// <summary>
 /// The Update Dedicated Circuit operation updates an existing
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. Service Key of the circuit being updated
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the update dedicated circuit
 /// operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself.  If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request.  If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static Task <ExpressRouteOperationStatusResponse> UpdateAsync(this IDedicatedCircuitOperations operations, string serviceKey, DedicatedCircuitUpdateParameters parameters)
 {
     return(operations.UpdateAsync(serviceKey, parameters, CancellationToken.None));
 }
 /// <summary>
 /// The Get Dedicated Circuit operation retrieves the specified
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the circuit.
 /// </param>
 /// <returns>
 /// The Get Dedicated Circuit operation response.
 /// </returns>
 public static Task <DedicatedCircuitGetResponse> GetAsync(this IDedicatedCircuitOperations operations, string serviceKey)
 {
     return(operations.GetAsync(serviceKey, CancellationToken.None));
 }
 /// <summary>
 /// The Remove Dedicated Circuit operation deletes an existing
 /// dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. Service Key associated with the dedicated circuit to be
 /// deleted.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself.  If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request.  If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static Task <ExpressRouteOperationStatusResponse> RemoveAsync(this IDedicatedCircuitOperations operations, string serviceKey)
 {
     return(operations.RemoveAsync(serviceKey, CancellationToken.None));
 }
 /// <summary>
 /// The List Dedicated Circuit operation retrieves a list of dedicated
 /// circuits owned by the customer.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.IDedicatedCircuitOperations.
 /// </param>
 /// <returns>
 /// The List Dedicated Circuit operation response.
 /// </returns>
 public static Task <DedicatedCircuitListResponse> ListAsync(this IDedicatedCircuitOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }