/// <summary> /// Gets the Remote Desktop Protocol file for the specified compute node. /// </summary> /// <remarks> /// Before you can access a node by using the RDP file, you must create a user /// account on the node. This API can only be invoked on pools created with a /// cloud service configuration. For pools created with a virtual machine /// configuration, see the GetRemoteLoginSettings API. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the pool that contains the compute node. /// </param> /// <param name='nodeId'> /// The ID of the compute node for which you want to get the Remote Desktop /// Protocol file. /// </param> /// <param name='computeNodeGetRemoteDesktopOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Stream> GetRemoteDesktopAsync(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeGetRemoteDesktopOptions computeNodeGetRemoteDesktopOptions = default(ComputeNodeGetRemoteDesktopOptions), CancellationToken cancellationToken = default(CancellationToken)) { var _result = await operations.GetRemoteDesktopWithHttpMessagesAsync(poolId, nodeId, computeNodeGetRemoteDesktopOptions, null, cancellationToken).ConfigureAwait(false); _result.Request.Dispose(); return(_result.Body); }
/// <summary> /// Gets the Remote Desktop Protocol file for the specified compute node. /// </summary> /// <remarks> /// Before you can access a node by using the RDP file, you must create a user /// account on the node. This API can only be invoked on pools created with a /// cloud service configuration. For pools created with a virtual machine /// configuration, see the GetRemoteLoginSettings API. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the pool that contains the compute node. /// </param> /// <param name='nodeId'> /// The ID of the compute node for which you want to get the Remote Desktop /// Protocol file. /// </param> /// <param name='computeNodeGetRemoteDesktopOptions'> /// Additional parameters for the operation /// </param> public static Stream GetRemoteDesktop(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeGetRemoteDesktopOptions computeNodeGetRemoteDesktopOptions = default(ComputeNodeGetRemoteDesktopOptions)) { return(operations.GetRemoteDesktopAsync(poolId, nodeId, computeNodeGetRemoteDesktopOptions).GetAwaiter().GetResult()); }
public virtual Response <Stream> GetRemoteDesktop(string poolId, string nodeId, ComputeNodeGetRemoteDesktopOptions computeNodeGetRemoteDesktopOptions, CancellationToken cancellationToken = default) { return(RestClient.GetRemoteDesktop(poolId, nodeId, computeNodeGetRemoteDesktopOptions, cancellationToken)); }
/// <summary> /// Gets the Remote Desktop Protocol file for the specified compute node. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The id of the pool that contains the compute node. /// </param> /// <param name='nodeId'> /// The id of the compute node for which you want to get the Remote Desktop /// Protocol file. /// </param> /// <param name='computeNodeGetRemoteDesktopOptions'> /// Additional parameters for the operation /// </param> public static System.IO.Stream GetRemoteDesktop(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeGetRemoteDesktopOptions computeNodeGetRemoteDesktopOptions = default(ComputeNodeGetRemoteDesktopOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IComputeNodeOperations)s).GetRemoteDesktopAsync(poolId, nodeId, computeNodeGetRemoteDesktopOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public virtual async Task <Response <Stream> > GetRemoteDesktopAsync(string poolId, string nodeId, ComputeNodeGetRemoteDesktopOptions computeNodeGetRemoteDesktopOptions, CancellationToken cancellationToken = default) { return(await RestClient.GetRemoteDesktopAsync(poolId, nodeId, computeNodeGetRemoteDesktopOptions, cancellationToken).ConfigureAwait(false)); }