コード例 #1
0
        public void AppendTag(Tag queriedTag)
        {
            TagTarget tagTarget = new TagTarget()
            {
                Tag    = queriedTag,
                Target = this
            };

            TagTargets.Add(tagTarget);
        }
コード例 #2
0
        public void AssignToTarget(Target target)
        {
            TagTarget tagTarget = new TagTarget()
            {
                Tag    = this,
                Target = target
            };

            TagTargets.Add(tagTarget);
        }
コード例 #3
0
        public void DismissTarget(Target target)
        {
            TagTarget tagTarget = TagTargets.FirstOrDefault(tt => (tt.Tag == this && tt.Target == target));

            if (tagTarget == null)
            {
                return;
            }

            TagTargets.Remove(tagTarget);
        }
コード例 #4
0
        public void RemoveTag(Tag queriedTag)
        {
            TagTarget tagTarget = TagTargets.SingleOrDefault(tt => tt.Tag == queriedTag);

            TagTargets.Remove(tagTarget);
        }