Example #1
0
        /// <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));
        }
Example #2
0
        /// <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));
        }
Example #3
0
        /// <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;
 }
 public void TestInitialize()
 {
     this.service = new RoomServerService();
 }