/// <summary> /// Deletes a room. /// </summary> /// <param name="idToDelete">The identifier.</param> /// <returns>The result.</returns> public ResultDto DeleteRoom(IdDto idToDelete) { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); RoomServerService service = new RoomServerService(); return service.DeleteRoom(idToDelete.Id, accountId); }
/// <summary> /// Updates a room. /// </summary> /// <param name="itemToSave">The item to save.</param> /// <returns>The result.</returns> public ResultDto UpdateRoom(RoomEditDto itemToSave) { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); RoomServerService service = new RoomServerService(); return service.UpdateRoom(itemToSave, accountId); }
public void TestInitialize() { this.service = new RoomServerService(); }
/// <summary> /// Returns the room lookup. /// </summary> /// <returns>The room lookup.</returns> public List<RoomLookupDto> GetRoomLookup() { this.SetResponseHeaderCacheExpiration(); AccountPassword credentials = this.GetCredentialsFromRequest(); AccountServerService accountService = new AccountServerService(); Guid accountId = accountService.GetAccountId(credentials.Account); RoomServerService service = new RoomServerService(); return service.GetRoomLookup(accountId); }
public void TestCleanup() { this.service = null; }