private async void ActionLongTap(object param) { const string v1 = "Set rank"; const string v2 = "Delete"; const string v3 = "Multi selection"; const string v4 = "Cancel"; string res = await View.DisplayActionSheet("Select action", null, null, new string[] { v1, v2, v3, v4, }); switch (res) { case v1: CommandSetRank.Execute(param); break; case v2: CommandDeleteUser.Execute(param); break; case v3: CommandMultiSelection.Execute(param); break; } }
public void DeleteUser(int id) { var deleteUser = new CommandDeleteUser(_userRepository.GetById(id), _userRepository); deleteUser.Execute(); }