Пример #1
0
 /// <summary>
 /// Gets the status of the call from ResetVpnSharedKey.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='trackingId'>
 /// Required. Tracking ID returned by ResetVpnSharedKey
 /// </param>
 /// <returns>
 /// Current state of a long running operation.
 /// </returns>
 public static VNetOperationStatusResult GetResetVpnSharedKeyOperationStatus(this IVNetOperations operations, string trackingId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVNetOperations)s).GetResetVpnSharedKeyOperationStatusAsync(trackingId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #2
0
 /// <summary>
 /// Deletes the specified RemoteApp virtual network
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <returns>
 /// The response containing the operation tracking id.
 /// </returns>
 public static OperationResultWithTrackingId Delete(this IVNetOperations operations, string vNetName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVNetOperations)s).DeleteAsync(vNetName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #3
0
 /// <summary>
 /// Gets a list of virtual network configurations.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <returns>
 /// List of virtual networks.
 /// </returns>
 public static VNetListResult List(this IVNetOperations operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVNetOperations)s).ListAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 /// Gets details of supported VPN devices
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <returns>
 /// The VPN device information.
 /// </returns>
 public static VNetVpnDeviceResult GetVpnDevices(this IVNetOperations operations, string vNetName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVNetOperations)s).GetVpnDevicesAsync(vNetName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #5
0
 /// <summary>
 /// Gets a configuration script to configure the VPN deviceto connect
 /// to the given virtual network. Run this script on the VPN device.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <param name='vendor'>
 /// Optional. Vendor
 /// </param>
 /// <param name='vpnDevice'>
 /// Optional. Model of the VPN
 /// </param>
 /// <param name='osFamily'>
 /// Optional. OS Family
 /// </param>
 /// <returns>
 /// Script that can be used to set up a VPN device.
 /// </returns>
 public static VNetConfigScriptResult GetVpnDeviceConfigScript(this IVNetOperations operations, string vNetName, string vendor, string vpnDevice, string osFamily)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVNetOperations)s).GetVpnDeviceConfigScriptAsync(vNetName, vendor, vpnDevice, osFamily);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #6
0
 /// <summary>
 /// Gets the specified virtual network's configuration.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <param name='includeSharedKey'>
 /// Required. Set to true to get back the shared key used to configure
 /// the VPN connection
 /// </param>
 /// <returns>
 /// RemoteApp virtual network information.
 /// </returns>
 public static VNetResult Get(this IVNetOperations operations, string vNetName, bool includeSharedKey)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IVNetOperations)s).GetAsync(vNetName, includeSharedKey);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the RemoteAppManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public RemoteAppManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._account          = new AccountsOperations(this);
     this._collections      = new CollectionOperations(this);
     this._operationResults = new OperationResultOperations(this);
     this._principals       = new PrincipalOperations(this);
     this._publishing       = new PublishingOperations(this);
     this._templateImages   = new TemplateImageOperations(this);
     this._vNet             = new VNetOperations(this);
     this._rdfeNamespace    = "remoteapp";
     this._apiVersion       = "2014-09-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Пример #8
0
 /// <summary>
 /// Creates or updates a virtual network.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <param name='vNetDetails'>
 /// Required. Details about the virtual network to create or update.
 /// </param>
 /// <returns>
 /// The response containing the operation tracking id.
 /// </returns>
 public static Task <OperationResultWithTrackingId> CreateOrUpdateAsync(this IVNetOperations operations, string vNetName, VNetParameter vNetDetails)
 {
     return(operations.CreateOrUpdateAsync(vNetName, vNetDetails, CancellationToken.None));
 }
Пример #9
0
 /// <summary>
 /// Posts a request to asynchronously generate a new shared key for the
 /// specified virtual network and returns a tracking ID for the
 /// operation.Use GetResetVpnSharedKeyOperationStatus with this
 /// tracking ID to determine when the operation has completed.  When
 /// the status returns Success,call Get passing the virtual network
 /// name and true for the includeSharedKey parameter. This will return
 /// a VNetResult containing the new key.Call GetVpnConfigScript to get
 /// back the configuration script to configure the VPN device. Run
 /// this script using the new key on the VPN device.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <returns>
 /// The response containing the operation tracking id.
 /// </returns>
 public static Task <OperationResultWithTrackingId> ResetVpnSharedKeyAsync(this IVNetOperations operations, string vNetName)
 {
     return(operations.ResetVpnSharedKeyAsync(vNetName, CancellationToken.None));
 }
Пример #10
0
 /// <summary>
 /// Gets a list of virtual network configurations.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <returns>
 /// List of virtual networks.
 /// </returns>
 public static Task <VNetListResult> ListAsync(this IVNetOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }
Пример #11
0
 /// <summary>
 /// Gets details of supported VPN devices
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <returns>
 /// The VPN device information.
 /// </returns>
 public static Task <VNetVpnDeviceResult> GetVpnDevicesAsync(this IVNetOperations operations, string vNetName)
 {
     return(operations.GetVpnDevicesAsync(vNetName, CancellationToken.None));
 }
Пример #12
0
 /// <summary>
 /// Gets a configuration script to configure the VPN deviceto connect
 /// to the given virtual network. Run this script on the VPN device.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <param name='vendor'>
 /// Optional. Vendor
 /// </param>
 /// <param name='vpnDevice'>
 /// Optional. Model of the VPN
 /// </param>
 /// <param name='osFamily'>
 /// Optional. OS Family
 /// </param>
 /// <returns>
 /// Script that can be used to set up a VPN device.
 /// </returns>
 public static Task <VNetConfigScriptResult> GetVpnDeviceConfigScriptAsync(this IVNetOperations operations, string vNetName, string vendor, string vpnDevice, string osFamily)
 {
     return(operations.GetVpnDeviceConfigScriptAsync(vNetName, vendor, vpnDevice, osFamily, CancellationToken.None));
 }
Пример #13
0
 /// <summary>
 /// Gets the status of the call from ResetVpnSharedKey.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='trackingId'>
 /// Required. Tracking ID returned by ResetVpnSharedKey
 /// </param>
 /// <returns>
 /// Current state of a long running operation.
 /// </returns>
 public static Task <VNetOperationStatusResult> GetResetVpnSharedKeyOperationStatusAsync(this IVNetOperations operations, string trackingId)
 {
     return(operations.GetResetVpnSharedKeyOperationStatusAsync(trackingId, CancellationToken.None));
 }
Пример #14
0
 /// <summary>
 /// Gets the specified virtual network's configuration.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <param name='includeSharedKey'>
 /// Required. Set to true to get back the shared key used to configure
 /// the VPN connection
 /// </param>
 /// <returns>
 /// RemoteApp virtual network information.
 /// </returns>
 public static Task <VNetResult> GetAsync(this IVNetOperations operations, string vNetName, bool includeSharedKey)
 {
     return(operations.GetAsync(vNetName, includeSharedKey, CancellationToken.None));
 }
Пример #15
0
 /// <summary>
 /// Deletes the specified RemoteApp virtual network
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IVNetOperations.
 /// </param>
 /// <param name='vNetName'>
 /// Required. RemoteApp virtual network name.
 /// </param>
 /// <returns>
 /// The response containing the operation tracking id.
 /// </returns>
 public static Task <OperationResultWithTrackingId> DeleteAsync(this IVNetOperations operations, string vNetName)
 {
     return(operations.DeleteAsync(vNetName, CancellationToken.None));
 }