GitSharp.Core.IgnoreHandler.AddPattern C# (CSharp) Method

AddPattern() private static method

private static AddPattern ( string line, ICollection to ) : void
line string
to ICollection
return void
        private static void AddPattern(string line, ICollection<IPattern> to)
        {
            if (line.Length == 0)
                return;

            // Comment
            if (line.StartsWith("#"))
                return;

            // Negated
            if (line.StartsWith("!"))
            {
                line = line.Substring(1);
                to.Add(new NegatedPattern(new FnMatchPattern(line)));
                return;
            }

            to.Add(new FnMatchPattern(line));
        }