Exemple #1
0
        public static IBlacklist CreateFromStreamReader(TextReader reader)
        {
            CommonBlacklist commonBlacklist = new CommonBlacklist();

            commonBlacklist.Append(reader);

            return(commonBlacklist);
        }
Exemple #2
0
        public static IBlacklist CreateFromStreamReader(TextReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }
            CommonBlacklist commonBlacklist = new CommonBlacklist();

            using (reader)
            {
                string line = reader.ReadLine();
                while (line != null)
                {
                    line.Trim();
                    commonBlacklist.Add(line);
                    line = reader.ReadLine();
                }
            }
            return(commonBlacklist);
        }