public void ReadTags(ITagable item) { if (item.Tags != null && item.Tags.Count > 0) { this.Collection.AddRange(item.Tags); } }
public TagCommand(ITagable tagable, string tag, int duration) { _tagable = tagable; _tag = tag; _duration = duration; }
public TagCommand(ITagable tagable, string tag) { _tagable = tagable; _tag = tag; }
public RemoveTagCommand(ITagable tagable, string tag) { _tagable = tagable; _tag = tag; }
public void WriteTags(ITagable item, bool nullIfEmpty) => item.Tags = this.Collection.Count == 0 && nullIfEmpty ? null : this.Collection.ToList();
public static int PopTag(this ITagable tagable, string tag) { return(tagable.Tags.PopWhere(t => t is BaseTag && ((BaseTag)t).Key == tag)); }
public static void Tag(this ITagable tagable, Tag tag) { tagable.Tags.Add(tag); }
public static bool PopTag(this ITagable tagable, Tag tag) { return(tagable.Tags.Pop(tag)); }
public static bool HasTag(this ITagable tagable, string tag) { return(tagable.Tags.Any(t => t is BaseTag && ((BaseTag)t).Key == tag)); }
public static bool HasTag(this ITagable tagable, Tag tag) { return(tagable.Tags.Contains(tag)); }
public static void Tag(this ITagable tagable, string tag, int duration) { tagable.Tag(new TimerTag(tag, duration)); }
public static void Tag(this ITagable tagable, string tag) { tagable.Tag(new BaseTag(tag)); }