public void Apply(NameEvent e, NamesByLetter names)
        {
            if (e.Name.Contains("bad", StringComparison.OrdinalIgnoreCase) && e.Name.StartsWith("J"))
            {
                throw new Exception("Bad name.");
            }

            names.Names.Add(e.Name);
        }
        public NamedDocument Create(NameEvent e)
        {
            if (e.Name.Contains("bad", StringComparison.OrdinalIgnoreCase))
            {
                throw new Exception("Bad name.");
            }

            return(new NamedDocument {
                Name = e.Name
            });
        }