Esempio n. 1
0
 /// <summary>
 /// Creates a new switch.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 /// <param name='switchPostModel'>
 /// The switch model.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SwitchModel> CreateSwitchAsync(this ISoftheonSwitchboard operations, int boardId, SwitchPostModel switchPostModel = default(SwitchPostModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateSwitchWithHttpMessagesAsync(boardId, switchPostModel, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Gets the users by filter.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <SwitchModel> > GetSwitchesByFilterAsync(this ISoftheonSwitchboard operations, int boardId, SwitchFilterModel model = default(SwitchFilterModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetSwitchesByFilterWithHttpMessagesAsync(boardId, model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Posts the specified model.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BoardModel> CreateBoardAsync(this ISoftheonSwitchboard operations, BoardPostModel model = default(BoardPostModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateBoardWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Gets all boards.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <BoardModel> > GetAllBoardsAsync(this ISoftheonSwitchboard operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllBoardsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Gets a specific previous switch version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 /// <param name='boardId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SwitchHistoryModel> GetSwitchHistoryAsync(this ISoftheonSwitchboard operations, int id, string boardId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetSwitchHistoryWithHttpMessagesAsync(id, boardId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Deletes a switch and place it 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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteSwitchVersionAsync(this ISoftheonSwitchboard operations, int id, string boardId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteSwitchVersionWithHttpMessagesAsync(id, boardId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 7
0
 /// <summary>
 /// Deletes a switch and place it 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>
 public static void DeleteSwitchVersion(this ISoftheonSwitchboard operations, int id, string boardId)
 {
     operations.DeleteSwitchVersionAsync(id, boardId).GetAwaiter().GetResult();
 }
Esempio n. 8
0
 /// <summary>
 /// Deletes the specified identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 public static void DeleteBoard(this ISoftheonSwitchboard operations, int id)
 {
     operations.DeleteBoardAsync(id).GetAwaiter().GetResult();
 }
Esempio n. 9
0
 /// <summary>
 /// Rollback to a previous switch.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='switchId'>
 /// The switch identifier.
 /// </param>
 /// <param name='switchHistoryId'>
 /// The switch history identifier.
 /// </param>
 /// <param name='boardId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RollbackSwitchAsync(this ISoftheonSwitchboard operations, int switchId, int switchHistoryId, string boardId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RollbackSwitchWithHttpMessagesAsync(switchId, switchHistoryId, boardId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 10
0
 /// <summary>
 /// Gets all boards.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <BoardModel> GetAllBoards(this ISoftheonSwitchboard operations)
 {
     return(operations.GetAllBoardsAsync().GetAwaiter().GetResult());
 }
Esempio n. 11
0
 /// <summary>
 /// Gets all of the previous switches for a switch.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='switchId'>
 /// The switch identifier.
 /// </param>
 /// <param name='boardId'>
 /// </param>
 public static IList <SwitchHistoryModel> GetAllSwitchHistoryBySwitch(this ISoftheonSwitchboard operations, int switchId, string boardId)
 {
     return(operations.GetAllSwitchHistoryBySwitchAsync(switchId, boardId).GetAwaiter().GetResult());
 }
Esempio n. 12
0
 /// <summary>
 /// Gets all of the previous switches for a board.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 public static IList <SwitchHistoryModel> GetAllSwitchHistoryByBoard(this ISoftheonSwitchboard operations, int boardId)
 {
     return(operations.GetAllSwitchHistoryByBoardAsync(boardId).GetAwaiter().GetResult());
 }
Esempio n. 13
0
 /// <summary>
 /// Gets the boards by filter.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 public static IList <BoardModel> GetBoardsByFilter(this ISoftheonSwitchboard operations, BoardFilterModel model = default(BoardFilterModel))
 {
     return(operations.GetBoardsByFilterAsync(model).GetAwaiter().GetResult());
 }
Esempio n. 14
0
 /// <summary>
 /// Gets the board history.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 public static BoardHistoryModel GetBoardHistoryById(this ISoftheonSwitchboard operations, int id)
 {
     return(operations.GetBoardHistoryByIdAsync(id).GetAwaiter().GetResult());
 }
Esempio n. 15
0
 /// <summary>
 /// Gets all board history for account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <BoardHistoryModel> GetAllBoardHistoryForTheAccount(this ISoftheonSwitchboard operations)
 {
     return(operations.GetAllBoardHistoryForTheAccountAsync().GetAwaiter().GetResult());
 }
Esempio n. 16
0
 /// <summary>
 /// Posts the specified model.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <BoardModel> CreateBoardWithHttpMessages(this ISoftheonSwitchboard operations, BoardPostModel model = default(BoardPostModel), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.CreateBoardWithHttpMessagesAsync(model, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 17
0
 /// <summary>
 /// Posts the specified model.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 public static BoardModel CreateBoard(this ISoftheonSwitchboard operations, BoardPostModel model = default(BoardPostModel))
 {
     return(operations.CreateBoardAsync(model).GetAwaiter().GetResult());
 }
Esempio n. 18
0
 /// <summary>
 /// Gets a specific previous switch version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 /// <param name='boardId'>
 /// </param>
 public static SwitchHistoryModel GetSwitchHistory(this ISoftheonSwitchboard operations, int id, string boardId)
 {
     return(operations.GetSwitchHistoryAsync(id, boardId).GetAwaiter().GetResult());
 }
Esempio n. 19
0
 /// <summary>
 /// Creates a new switch.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 /// <param name='switchPostModel'>
 /// The switch model.
 /// </param>
 public static SwitchModel CreateSwitch(this ISoftheonSwitchboard operations, int boardId, SwitchPostModel switchPostModel = default(SwitchPostModel))
 {
     return(operations.CreateSwitchAsync(boardId, switchPostModel).GetAwaiter().GetResult());
 }
Esempio n. 20
0
 /// <summary>
 /// Gets the users by filter.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 public static IList <SwitchModel> GetSwitchesByFilter(this ISoftheonSwitchboard operations, int boardId, SwitchFilterModel model = default(SwitchFilterModel))
 {
     return(operations.GetSwitchesByFilterAsync(boardId, model).GetAwaiter().GetResult());
 }
Esempio n. 21
0
 /// <summary>
 /// Gets all of the previous switches for a board.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <IList <SwitchHistoryModel> > GetAllSwitchHistoryByBoardWithHttpMessages(this ISoftheonSwitchboard operations, int boardId, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetAllSwitchHistoryByBoardWithHttpMessagesAsync(boardId, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 22
0
 /// <summary>
 /// Gets the users by filter.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='boardId'>
 /// The board identifier.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <IList <SwitchModel> > GetSwitchesByFilterWithHttpMessages(this ISoftheonSwitchboard operations, int boardId, SwitchFilterModel model = default(SwitchFilterModel), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetSwitchesByFilterWithHttpMessagesAsync(boardId, model, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 23
0
 /// <summary>
 /// Puts the specified model.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 public static void UpdateBoard(this ISoftheonSwitchboard operations, int id, BoardPutModel model = default(BoardPutModel))
 {
     operations.UpdateBoardAsync(id, model).GetAwaiter().GetResult();
 }
Esempio n. 24
0
 /// <summary>
 /// Deletes the specified identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse DeleteBoardWithHttpMessages(this ISoftheonSwitchboard operations, int id, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.DeleteBoardWithHttpMessagesAsync(id, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 25
0
 /// <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();
 }
Esempio n. 26
0
 /// <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();
 }
Esempio n. 27
0
 /// <summary>
 /// Rollback to a previous switch.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='switchId'>
 /// The switch identifier.
 /// </param>
 /// <param name='switchHistoryId'>
 /// The switch history identifier.
 /// </param>
 /// <param name='boardId'>
 /// </param>
 public static void RollbackSwitch(this ISoftheonSwitchboard operations, int switchId, int switchHistoryId, string boardId)
 {
     operations.RollbackSwitchAsync(switchId, switchHistoryId, boardId).GetAwaiter().GetResult();
 }
Esempio n. 28
0
 /// <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());
 }
Esempio n. 29
0
 /// <summary>
 /// Rollback to a previous switch.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='switchId'>
 /// The switch identifier.
 /// </param>
 /// <param name='switchHistoryId'>
 /// The switch history identifier.
 /// </param>
 /// <param name='boardId'>
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse RollbackSwitchWithHttpMessages(this ISoftheonSwitchboard operations, int switchId, int switchHistoryId, string boardId, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.RollbackSwitchWithHttpMessagesAsync(switchId, switchHistoryId, boardId, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 30
0
 /// <summary>
 /// Puts the specified model.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The identifier.
 /// </param>
 /// <param name='model'>
 /// The model.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateBoardAsync(this ISoftheonSwitchboard operations, int id, BoardPutModel model = default(BoardPutModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateBoardWithHttpMessagesAsync(id, model, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }