Exemplo n.º 1
0
 public void ReadTags(ITagable item)
 {
     if (item.Tags != null && item.Tags.Count > 0)
     {
         this.Collection.AddRange(item.Tags);
     }
 }
Exemplo n.º 2
0
 public void ReadTags(ITagable item)
 {
     if (item.Tags != null && item.Tags.Count > 0)
     {
         this.Collection.AddRange(item.Tags);
     }
 }
Exemplo n.º 3
0
 public TagCommand(ITagable tagable, string tag, int duration)
 {
     _tagable  = tagable;
     _tag      = tag;
     _duration = duration;
 }
Exemplo n.º 4
0
 public TagCommand(ITagable tagable, string tag)
 {
     _tagable = tagable;
     _tag     = tag;
 }
Exemplo n.º 5
0
 public RemoveTagCommand(ITagable tagable, string tag)
 {
     _tagable = tagable;
     _tag = tag;
 }
Exemplo n.º 6
0
 public void WriteTags(ITagable item, bool nullIfEmpty)
     => item.Tags = this.Collection.Count == 0 && nullIfEmpty ? null : this.Collection.ToList();
Exemplo n.º 7
0
 public TagCommand(ITagable tagable, string tag, int duration)
 {
     _tagable = tagable;
     _tag = tag;
     _duration = duration;
 }
Exemplo n.º 8
0
 public void WriteTags(ITagable item, bool nullIfEmpty)
 => item.Tags = this.Collection.Count == 0 && nullIfEmpty ? null : this.Collection.ToList();
Exemplo n.º 9
0
 public static int PopTag(this ITagable tagable, string tag)
 {
     return(tagable.Tags.PopWhere(t => t is BaseTag && ((BaseTag)t).Key == tag));
 }
Exemplo n.º 10
0
 public static void Tag(this ITagable tagable, Tag tag)
 {
     tagable.Tags.Add(tag);
 }
Exemplo n.º 11
0
 public static bool PopTag(this ITagable tagable, Tag tag)
 {
     return(tagable.Tags.Pop(tag));
 }
Exemplo n.º 12
0
 public static bool HasTag(this ITagable tagable, string tag)
 {
     return(tagable.Tags.Any(t => t is BaseTag && ((BaseTag)t).Key == tag));
 }
Exemplo n.º 13
0
 public static bool HasTag(this ITagable tagable, Tag tag)
 {
     return(tagable.Tags.Contains(tag));
 }
Exemplo n.º 14
0
 public static void Tag(this ITagable tagable, string tag, int duration)
 {
     tagable.Tag(new TimerTag(tag, duration));
 }
Exemplo n.º 15
0
 public static void Tag(this ITagable tagable, string tag)
 {
     tagable.Tag(new BaseTag(tag));
 }