Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 public Change(SerializableChange change)
 {
     Summary     = change.Summary;
     Description = change.Description;
 }