Example #1
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for as dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. Service key of the dedicated circuit.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginNew(this ICrossConnectionOperations operations, string serviceKey)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICrossConnectionOperations)s).BeginNewAsync(serviceKey);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #2
0
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Required. The service key representing the relationship between
 /// Azure and the customer.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Update(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICrossConnectionOperations)s).UpdateAsync(serviceKey, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #3
0
 /// <summary>
 /// The List Cross Connection operation retrieves a list of cross
 /// connections owned by the provider.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <returns>
 /// The List Cross Connection operation response.
 /// </returns>
 public static CrossConnectionListResponse List(this ICrossConnectionOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICrossConnectionOperations)s).ListAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #4
0
 /// <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.ICrossConnectionOperations.
 /// </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 ICrossConnectionOperations operations, string operationId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICrossConnectionOperations)s).GetOperationStatusAsync(operationId);
     }
                                  , 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);
 }
Example #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);
 }
Example #7
0
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the relationship between Azure and the
 /// customer.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Update(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     try
     {
         return(operations.UpdateAsync(serviceKey, parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #8
0
 /// <summary>
 /// The List Cross Connection operation retrieves a list of cross
 /// connections owned by the provider.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <returns>
 /// The List Cross Connection operation response.
 /// </returns>
 public static CrossConnectionListResponse List(this ICrossConnectionOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #9
0
 /// <summary>
 /// The Get Cross Connection operation retrieves the Cross Connection
 /// information for the Dedicated Circuit with the specified service
 /// key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The servicee key representing the dedicated circuit.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static CrossConnectionGetResponse Get(this ICrossConnectionOperations operations, string serviceKey)
 {
     try
     {
         return(operations.GetAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #10
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for as dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key of the dedicated circuit.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static ExpressRouteOperationResponse BeginNew(this ICrossConnectionOperations operations, string serviceKey)
 {
     try
     {
         return(operations.BeginNewAsync(serviceKey).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #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);
 }
Example #12
0
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the relationship between Azure and the
 /// customer.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Bgp Peering operation.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static Task <CrossConnectionGetResponse> UpdateAsync(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return(operations.UpdateAsync(serviceKey, parameters, CancellationToken.None));
 }
Example #13
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for the given azure circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key of the dedicated circuit.
 /// </param>
 /// <returns>
 /// The Get Cross Connection Operation Response.
 /// </returns>
 public static Task <CrossConnectionGetResponse> NewAsync(this ICrossConnectionOperations operations, string serviceKey)
 {
     return(operations.NewAsync(serviceKey, CancellationToken.None));
 }
Example #14
0
 /// <summary>
 /// The List Cross Connection operation retrieves a list of cross
 /// connections owned by the provider.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <returns>
 /// The List Cross Connection operation response.
 /// </returns>
 public static Task <CrossConnectionListResponse> ListAsync(this ICrossConnectionOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }
Example #15
0
 /// <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.ICrossConnectionOperations.
 /// </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 ICrossConnectionOperations operations, string operationId)
 {
     return(operations.GetOperationStatusAsync(operationId, CancellationToken.None));
 }
Example #16
0
 /// <summary>
 /// The New Cross Connection operation provisions a cross connection
 /// for as dedicated circuit.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// Service key of the dedicated circuit.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static Task <ExpressRouteOperationResponse> BeginNewAsync(this ICrossConnectionOperations operations, string serviceKey)
 {
     return(operations.BeginNewAsync(serviceKey, CancellationToken.None));
 }
Example #17
0
 /// <summary>
 /// The Update Cross Connection operation updates an existing cross
 /// connection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ExpressRoute.ICrossConnectionOperations.
 /// </param>
 /// <param name='serviceKey'>
 /// The service key representing the relationship between Azure and the
 /// customer.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update CrossConnection operation.
 /// </param>
 /// <returns>
 /// A standard express route gateway response including an HTTP status
 /// code and request ID.
 /// </returns>
 public static Task <ExpressRouteOperationResponse> BeginUpdateAsync(this ICrossConnectionOperations operations, string serviceKey, CrossConnectionUpdateParameters parameters)
 {
     return(operations.BeginUpdateAsync(serviceKey, parameters, CancellationToken.None));
 }