Пример #1
0
 public void AddNamespace(Namespace <T> ns)
 {
     ChildNamespaces = ChildNamespaces.Concat(new[] { ns });
 }
Пример #2
0
        public string GenerateCodeFor(string childNamespace)
        {
            var generator = Collections.FirstOrDefault(x => x.ChildNamespace.EqualsIgnoreCase(childNamespace));

            if (generator == null)
            {
                throw new ArgumentOutOfRangeException($"Unknown {nameof(childNamespace)} '{childNamespace}'. Known code types are {ChildNamespaces.Join(", ")}");
            }

            return(generateCode(generator));
        }