private static bool Matches(SerializableChange serializableChange, string include, string exclude) { if (!string.IsNullOrEmpty(include) && !Matches(serializableChange, include)) { return(false); } if (!string.IsNullOrEmpty(exclude) && Matches(serializableChange, exclude)) { return(false); } return(true); }
private static bool Matches(SerializableChange serializableChange, string phrase) { if (serializableChange.Summary.IndexOf(phrase, StringComparison.InvariantCultureIgnoreCase) != -1) { return(true); } if (string.IsNullOrEmpty(serializableChange.Description)) { return(false); } return(serializableChange.Description.IndexOf(phrase, StringComparison.InvariantCultureIgnoreCase) != -1); }
private static void TryAddChange(string id, string message, SerializableChanges changes) { var split = message.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); if (split.Length > 0) { var change = new SerializableChange { Id = id, Summary = split[0].Trim() }; change.Description = string.Join(Environment.NewLine, split.Skip(1).Select(x => x.Trim())); changes.Changes.Add(change); } }
public Change(SerializableChange change) { Summary = change.Summary; Description = change.Description; }