/// <summary> /// Add a change type. /// </summary> /// <param name="changeType"></param> public void AddChangeType(WatcherChangeTypes changeType) { if (!ChangeTypeList.Contains(changeType)) { ChangeTypeList.Add(changeType); } }
/// <summary> /// Look at all the changes in the list and create /// a /// </summary> /// <returns></returns> public string BuildChangeString() { if (ChangeTypeList != null && ChangeTypeList.Any()) { StringBuilder sb = new StringBuilder(); foreach (WatcherChangeTypes change in this.ChangeTypeList) { sb.Append($"{change},"); } string ss = sb.ToString(); if (ss.EndsWith(",")) { ss = ss.Remove(ss.Length - 1, 1); } return(ss); } else { return(string.Empty); } }