public static void SetTag(this ITags tags, string tag, bool onOff) { if (onOff) { tags.AddTag(tag); } else { tags.RemoveTag(tag); } }
public static void Parse(this ITags tags, string str) { if (string.IsNullOrEmpty(str)) { return; } var split = str.Split(separators, StringSplitOptions.RemoveEmptyEntries); foreach (var tag in split) { tags.AddTag(tag); } }