public void AddValidation(string message) { if (Advices == null) { Advices = new List <string>(); } Advices.Add(message); }
public AdviceEventViewModel(FestiMSClient client, IEditViewModel <EventViewModel> e) { ShowAddEntityCommand = new RelayCommand(ShowAddEntity); EditCommand = new RelayCommand(ShowEditEntity); DeleteCommand = new RelayCommand(DeleteEntity); _client = client; Advices = client.Advices.GetAdvice(e.Entity.Id); Advices.LoadMoreItemsAsync(); }
/// <summary> /// Adds the advice and returns a new AspectInfo. /// </summary> /// <param name="adviceInfo">The advice information.</param> /// <returns></returns> public AspectInfo AddAdvice(AdviceInfo adviceInfo) { return(new AspectInfo(Advices.Concat(new[] { adviceInfo }), PointcutMethod, PointcutMethodHandle, AdvisedMethod, AdvisedMethodHandle, PointcutProperty, IsPointcutPropertySetter, PointcutEvent, IsPointcutEventAdder)); }
private async void DeleteEntity() { await _client.Advices.DeleteAsync(SelectedAdvice); Advices.Remove(SelectedAdvice); }