/// <summary> /// Create a connectiontype. (see /// http://aka.ms/azureautomationsdk/connectiontypeoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.IConnectionTypeOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The parameters supplied to the create connectiontype /// operation. /// </param> /// <returns> /// The response model for the create connection type operation. /// </returns> public static Task <ConnectionTypeCreateResponse> CreateAsync(this IConnectionTypeOperations operations, string automationAccount, ConnectionTypeCreateParameters parameters) { return(operations.CreateAsync(automationAccount, parameters, CancellationToken.None)); }
/// <summary> /// Create a connectiontype. (see /// http://aka.ms/azureautomationsdk/connectiontypeoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.IConnectionTypeOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The parameters supplied to the create connectiontype /// operation. /// </param> /// <returns> /// The response model for the create connection type operation. /// </returns> public static ConnectionTypeCreateResponse Create(this IConnectionTypeOperations operations, string automationAccount, ConnectionTypeCreateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IConnectionTypeOperations)s).CreateAsync(automationAccount, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }