Пример #1
0
        public void AddTextTransformConditions(CommentFliteringRepository.CommentTextTransformCondition condition)
        {
            var added = _commentFliteringRepository.AddCommentTextTransformCondition(condition.RegexPattern, condition.ReplaceText, condition.Description);

            _commentTextTransformConditions.Add(added);
            TransformConditionAdded?.Invoke(this, new CommentTextTranformConditionChangedArgs()
            {
                TransformCondition = added
            });
        }
Пример #2
0
 public void RemoveTextTransformConditions(CommentFliteringRepository.CommentTextTransformCondition condition)
 {
     if (_commentFliteringRepository.RemoveCommentTextTransformCondition(condition))
     {
         _commentTextTransformConditions.Remove(condition);
         TransformConditionRemoved?.Invoke(this, new CommentTextTranformConditionChangedArgs()
         {
             TransformCondition = condition
         });
     }
 }
Пример #3
0
        public void UpdateTextTransformConditions(CommentFliteringRepository.CommentTextTransformCondition condition)
        {
            if (condition == null)
            {
                return;
            }

            _commentFliteringRepository.UpdateCommentTextTransformCondition(condition);
            TransformConditionUpdated?.Invoke(this, new CommentTextTranformConditionChangedArgs()
            {
                TransformCondition = condition
            });
        }