示例#1
0
        //public void UpdateUser(Credentials c, UserContents newU) {
        //    //try {
        //    //    //UserManipulator.Update()
        //    //} catch (Exception ex) {
        //    //    throw new ActionException("Unable to update credentials.", ActionType.User,
        //    //        MemeType.Fuuuuu, ex);
        //    //}
        //    //return new ActionResult("Credentials updated.", "",
        //    //    ActionType.User);
        //    throw new ActionException("Updating credentials is not properly handled...",
        //        ActionType.User, MemeType.Fuuuuu);
        //}

        public void DelUser(Credentials c)
        {
            try {
                using (FileSyncModelClient cl = new FileSyncModelClient()) {
                    cl.DelUser(c);
                }
            } catch (Exception ex) {
                throw new ActionException("Unable to delete the user account.", ActionType.User,
                                          MemeType.Fuuuuu, ex);
            }
        }
示例#2
0
 public void Login(Credentials c)
 {
     try {
         using (FileSyncModelClient cl = new FileSyncModelClient()) {
             cl.Login(c);
         }
     } catch (Exception ex) {
         throw new ActionException("Login was not successful.", ActionType.User,
                                   MemeType.AreYouFuckingKiddingMe, ex);
     }
 }
示例#3
0
 public void AddUser(Credentials c, UserContents u)
 {
     try {
         using (FileSyncModelClient cl = new FileSyncModelClient()) {
             cl.AddUser(c, u);
         }
     } catch (Exception ex) {
         throw new ActionException("Unable to create new user account.", ActionType.User,
                                   MemeType.Fuuuuu, ex);
     }
 }
示例#4
0
        //public void Logout() {
        //    throw new ActionException("Logout is not properly handled...", ActionType.User,
        //        MemeType.Fuuuuu);
        //}

        public UserContents GetUser(Credentials c)
        {
            try {
                UserContents u;
                using (FileSyncModelClient cl = new FileSyncModelClient()) {
                    u = cl.GetUser(c);
                }
                return(u);
            } catch (Exception ex) {
                throw new ActionException("Unable to get user details for the given credentials.",
                                          ActionType.User, MemeType.Fuuuuu, ex);
            }
        }