/// <summary> /// Updates the switch and places the old version in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='switchPutModel'> /// The switch model. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateSwitchAsync(this ISoftheonSwitchboard operations, int id, string boardId, SwitchPutModel switchPutModel = default(SwitchPutModel), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateSwitchWithHttpMessagesAsync(id, boardId, switchPutModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Updates the switch and places the old version in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='switchPutModel'> /// The switch model. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse UpdateSwitchWithHttpMessages(this ISoftheonSwitchboard operations, int id, string boardId, SwitchPutModel switchPutModel = default(SwitchPutModel), Dictionary <string, List <string> > customHeaders = null) { return(operations.UpdateSwitchWithHttpMessagesAsync(id, boardId, switchPutModel, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Updates the switch and places the old version in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='switchPutModel'> /// The switch model. /// </param> public static void UpdateSwitch(this ISoftheonSwitchboard operations, int id, string boardId, SwitchPutModel switchPutModel = default(SwitchPutModel)) { operations.UpdateSwitchAsync(id, boardId, switchPutModel).GetAwaiter().GetResult(); }