public static KeywordModel AddKeyword(this EventSourceModel that, string keywordName)
        {
            var maxKeywordValue = that.Keywords.Max(k => k.Value) ?? 0;
            var newKeyword      = new KeywordModel()
            {
                Name  = "Error",
                Value = (maxKeywordValue == 0 ? 1 : maxKeywordValue * 2)
            };
            var keywords = new List <KeywordModel>(that.Keywords)
            {
                newKeyword
            };

            that.Keywords = that.Keywords.Add(newKeyword);

            return(newKeyword);
        }
 public static bool Contains(this IEnumerable <KeywordModel> keywords, KeywordModel keyword)
 {
     return(keywords.Any(t => t.Name.Equals(keyword.Name, StringComparison.InvariantCultureIgnoreCase)));
 }
 public static KeywordModel[] AddKeyword(this IEnumerable <KeywordModel> keywords, KeywordModel keyword)
 {
     return(keywords.Add(keyword));
 }