Exemple #1
0
        public void RegisterCodeGenerator(MetaCodeGenerator metaCodeGenerator)
        {
            if (metaCodeGenerators.Any(_metaCodeGenerator => _metaCodeGenerator.CodeGeneratorType == metaCodeGenerator.CodeGeneratorType))
                throw new ArgumentException("CodeGenerator already registered " + metaCodeGenerator.Name, "metaCodeGenerator");

            metaCodeGenerators.Add(metaCodeGenerator);
        }
Exemple #2
0
        public void RegisterCodeGenerator(MetaCodeGenerator metaCodeGenerator)
        {
            if (metaCodeGenerators.Any(_metaCodeGenerator => _metaCodeGenerator.CodeGeneratorType == metaCodeGenerator.CodeGeneratorType))
            {
                throw new ArgumentException("CodeGenerator already registered " + metaCodeGenerator.Name, "metaCodeGenerator");
            }

            metaCodeGenerators.Add(metaCodeGenerator);
        }
Exemple #3
0
        public void RegisterCodeGenerators(Assembly assembly)
        {
            var newMetaCodeGenerators = assembly
                                        .GetTypes()
                                        .Where(type => MetaCodeGenerator.IsCodeGeneratorType(type))
                                        .Select(codeGeneratorType => new MetaCodeGenerator(codeGeneratorType));

            foreach (MetaCodeGenerator metaCodeGenerator in newMetaCodeGenerators)
            {
                RegisterCodeGenerator(metaCodeGenerator);
            }
        }
Exemple #4
0
 public void RegisterCodeGenerator(MetaCodeGenerator metaCodeGenerator)
 {
     DomainTypeToMetaDomain(metaCodeGenerator.DomainType).RegisterCodeGenerator(metaCodeGenerator);
 }
 public void RegisterCodeGenerator(MetaCodeGenerator metaCodeGenerator)
 {
     DomainTypeToMetaDomain(metaCodeGenerator.DomainType).RegisterCodeGenerator(metaCodeGenerator);
 }