/// <summary> /// Uploads a new host license file that was previously generated with Regutil. /// The content of the license is sent as a file embedded in the HTTP request. /// </summary> /// <remarks> /// Host only. Requires authentication. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='file'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <HostLicenseDto> UploadLicenseAsync(this IHostLicenses operations, Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.UploadLicenseWithHttpMessagesAsync(file, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Uploads a new host license file that was previously generated with Regutil. /// The content of the license is sent as a file embedded in the HTTP request. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Administration or /// Administration.Write. /// /// Host only. Requires authentication. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='file'> /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <HostLicenseDto> UploadLicenseAsync(this IHostLicenses operations, Stream file, string expand = default(string), string select = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UploadLicenseWithHttpMessagesAsync(file, expand, select, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }