public static void AccountOperation(string userOrEmail, AccountOperationType type) { exceptionHandling(delegate { Instance.AccountOperation(userOrEmail, type); }); }
public void Switch() { this.m_CurrrentOperation = AccountOperationType.Switch; if (Bonjour.IsLogined()) { this.SendSwitchRequest(); } else { NdCenter.Instace.Login(); this.m_IsLogin = true; } }
public static string ConvertToString(this AccountOperationType accountOperationType) { return(AccountOperationTypeConsts.Dict[accountOperationType]); }
public void AccountOperation(string userNameOrEmail, AccountOperationType operationType) { throw new NotImplementedException(); }
public void AccountOperation(string userNameOrEmail, AccountOperationType operationType) { exceptionHandling(null, () => InternalService.AccountOperation(userNameOrEmail, operationType)); }
//public IList<EntryObjectDTO> GetMyTrainingEntries(Token token, MyTrainingDTO myTraining) //{ // var securityinfo=SecurityManager.EnsureAuthentication(token); // var session = Session; // using (var tx = session.BeginTransaction()) // { // MyTraining myTrainingDb = session.Get<MyTraining>(myTraining.GlobalId); // Profile profileDb = session.Load<Profile>(securityinfo.SessionData.Profile.Id); // if (myTrainingDb.Customer!=null && myTrainingDb.Customer.Profile != profileDb) // { // throw new CrossProfileOperationException("This customer doesn't belong to your profile"); // } // if (myTrainingDb == null || (myTrainingDb.Profile != profileDb && (myTrainingDb.Profile.Privacy.CalendarView == Privacy.Private || myTrainingDb.Profile.Privacy.CalendarView == Privacy.FriendsOnly && !myTrainingDb.Profile.Friends.Contains(profileDb)))) // { // tx.Commit(); // return new List<EntryObjectDTO>(); // } // return Mapper.Map<ICollection<EntryObject>, EntryObjectDTO[]>(myTrainingDb.EntryObjects); // } //} //public MapperResult MapExercises(Token token, MapperData data) //{ // var securityInfo = SecurityManager.EnsureAuthentication(token); // Log.WriteWarning("MapExercises:Username={0}", securityInfo.SessionData.Profile.UserName); // var session = Session; // ExercisesMapper mapper = new ExercisesMapper(session,Configuration.TimerService); // return mapper.Run(securityInfo.SessionData.Profile.Id, data); //} public void AccountOperation(string userNameOrEmail, AccountOperationType operationType) { ProfileService profileService = new ProfileService(Session, null, Configuration, SecurityManager, PushNotificationService, EMailService); profileService.AccountOperation(userNameOrEmail, operationType); }
public void Logout() { this.m_CurrrentOperation = AccountOperationType.Logout; this.m_IsLogout = true; NdCenter.Instace.Logout(); }