Beispiel #1
0
 public static void SetTag(this ITags tags, string tag, bool onOff)
 {
     if (onOff)
     {
         tags.AddTag(tag);
     }
     else
     {
         tags.RemoveTag(tag);
     }
 }
Beispiel #2
0
        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);
            }
        }