/// <summary> /// The Create Virtual Device /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IVirtualDeviceOperations. /// </param> /// <param name='virtualDeviceProvisioningInfo'> /// Required. The Virtual device provisioning info. /// </param> /// <param name='customRequestHeaders'> /// Required. The Custom Request Headers which client must use. /// </param> /// <returns> /// This is the Job Response for all Device Job Related Calls /// </returns> public static JobResponse Create(this IVirtualDeviceOperations operations, VirtualDeviceProvisioningInfo virtualDeviceProvisioningInfo, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IVirtualDeviceOperations)s).CreateAsync(virtualDeviceProvisioningInfo, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the StorSimpleManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public StorSimpleManagementClient(HttpClient httpClient) : base(httpClient) { this._backup = new BackupOperations(this); this._backupPolicy = new BackupPolicyOperations(this); this._cloneVolume = new CloneVolumeOperations(this); this._dataContainer = new DataContainerOperations(this); this._deviceDetails = new DeviceDetailsOperations(this); this._deviceFailover = new DeviceFailoverOperations(this); this._deviceJob = new DeviceJobOperations(this); this._devices = new DeviceOperations(this); this._devicePublicKey = new DevicePublicKeyOperations(this); this._iscsiConnection = new IscsiConnectionDetailsOperations(this); this._resourceEncryptionKeys = new ResourceEncryptionKeyOperations(this); this._serviceConfig = new ServiceConfigurationOperations(this); this._virtualDevice = new VirtualDeviceOperations(this); this._virtualDisk = new VirtualDiskOperations(this); this._apiVersion = "2014-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The Create Virtual Device /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IVirtualDeviceOperations. /// </param> /// <param name='virtualDeviceProvisioningInfo'> /// Required. The Virtual device provisioning info. /// </param> /// <param name='customRequestHeaders'> /// Required. The Custom Request Headers which client must use. /// </param> /// <returns> /// This is the Job Response for all Device Job Related Calls /// </returns> public static Task <JobResponse> CreateAsync(this IVirtualDeviceOperations operations, VirtualDeviceProvisioningInfo virtualDeviceProvisioningInfo, CustomRequestHeaders customRequestHeaders) { return(operations.CreateAsync(virtualDeviceProvisioningInfo, customRequestHeaders, CancellationToken.None)); }