Exemplo n.º 1
0
        public void AddDefinition(OptionDefinition od)
        {
            if (string.IsNullOrEmpty(od.LongName))
                throw new Exception("LongName is a required field");

            if (_optionDefinitions.Where(o => string.Compare(o.LongName, od.LongName, true) == 0)
                                  .Count() > 0)
                throw new Exception(od.LongName + " is already defined");

            _optionDefinitions.Add(od);
        }