예제 #1
0
        public void AddSection(IDocumentSection section)
        {
            if (_sections.Any(s => string.Equals(s.Name, section.Name, StringComparison.OrdinalIgnoreCase)))
                throw new ArgumentException("Section name must be unique inside document", "section");

            _sections.Add(section);
        }
예제 #2
0
        public void AddSection(IDocumentSection section)
        {
            if (_sections.Any(s => string.Equals(s.Name, section.Name, StringComparison.OrdinalIgnoreCase)))
            {
                throw new ArgumentException("Section name must be unique inside document", "section");
            }

            _sections.Add(section);
        }