예제 #1
0
        public void AddValidation(string message)
        {
            if (Advices == null)
            {
                Advices = new List <string>();
            }

            Advices.Add(message);
        }
예제 #2
0
 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();
 }
예제 #3
0
 /// <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));
 }
예제 #4
0
        private async void DeleteEntity()
        {
            await _client.Advices.DeleteAsync(SelectedAdvice);

            Advices.Remove(SelectedAdvice);
        }