/// <param name='operations'> /// Reference to the DataExportSales.IProfiles. /// </param> /// <param name='registration'> /// Required. Description of the new Profile to be created /// </param> public static object CreateProfile(this IProfiles operations, ProfileDescriptionBase registration) { return(Task.Factory.StartNew((object s) => { return ((IProfiles)s).CreateProfileAsync(registration); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the DataExportSales.IProfiles. /// </param> /// <param name='registration'> /// Required. Description of the new Profile to be created /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <object> ValidateBeforeProfileCreationAsync(this IProfiles operations, ProfileDescriptionBase registration, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <object> result = await operations.ValidateBeforeProfileCreationWithOperationResponseAsync(registration, cancellationToken).ConfigureAwait(false); return(result.Body); }