Пример #1
0
        public void AddTag(Tag tag)
        {
            if (Tags.All(t => t.Tag.Text != tag.Text))
            {
                var relTag       = new RelTag(null, tag, Id);
                var relOperation = new RelOperation(null, this, tag.Id);
                Tags.Add(relTag);

                tag.AddOperation(relOperation);
            }
            else
            {
                Tags.First(t => t.Tag.Text == tag.Text).IsMarkForDeletion = false;
            }
            IsDirty = true;
        }
Пример #2
0
 public void RemoveOperation(RelOperation relOperation)
 {
     relOperation.IsMarkForDeletion = true;
 }
Пример #3
0
 public void AddOperation(RelOperation relOperation)
 {
     Operations.Add(relOperation);
 }