public Layer FindLayer(string layerName) { LayerInstance layerInstance = this.layerInstances .Where(l => l.Model.Name == layerName) .FirstOrDefault(); return(layerInstance); }
public LayerInstance NewInstance(ApplicationInstance applicationInstance, UsedLayersInstance usedLayerInstance) { var moduleInstances = new List<ModuleInstance>(); var layerInstance = new LayerInstance(this, applicationInstance, moduleInstances, usedLayerInstance); foreach (ModuleModel module in this.modules) { ModuleInstance moduleInstance = module.NewInstance(layerInstance); moduleInstances.Add(moduleInstance); } return layerInstance; }
public LayerInstance NewInstance(ApplicationInstance applicationInstance, UsedLayersInstance usedLayerInstance) { var moduleInstances = new List <ModuleInstance>(); var layerInstance = new LayerInstance(this, applicationInstance, moduleInstances, usedLayerInstance); foreach (ModuleModel module in this.modules) { ModuleInstance moduleInstance = module.NewInstance(layerInstance); moduleInstances.Add(moduleInstance); } return(layerInstance); }
public ApplicationInstance NewInstance() { var layerInstances = new List <LayerInstance>(); var applicationInstance = new ApplicationInstance(this, layerInstances); foreach (LayerModel layer in this.layers) { LayerInstance layerInstance = layer.NewInstance(applicationInstance, null); layerInstances.Add(layerInstance); } return(applicationInstance); }
public ModuleInstance(ModuleModel moduleModel, LayerInstance layerInstance, TransientsModel transientsModel, EntitiesModel entitiesModel, ObjectsModel objectsModel, ValuesModel valuesModel, ServicesModel servicesModel, ImportedServicesModel importedServicesModel) { this.Model = moduleModel; this.LayerInstance = layerInstance; this.Transients = new TransientsInstance(transientsModel, this); this.Entities = new EntitiesInstance(entitiesModel, this); this.Objects = new ObjectsInstance(objectsModel, this); this.Values = new ValuesInstance(valuesModel, this); this.Services = servicesModel.NewInstance(this); this.ImportedServices = importedServicesModel.NewInstance(this); this.TransientBuilderFactory = new TransientBuilderFactoryInstance(this); this.ObjectBuilderFactory = new ObjectBuilderFactoryInstance(); this.ValueBuilderFactory = new ValueBuilderFactoryInstance(this); this.UnitOfWorkFactory = new UnitOfWorkFactoryInstance(); this.ServiceFinder = new ServiceFinderInstance(this); this.entityFinders = new Dictionary<Type, EntityFinder>(); this.transientFinders = new Dictionary<Type, TransientFinder>(); this.ObjectFinders = new Dictionary<Type, ObjectFinder>(); this.valueFinders = new Dictionary<Type, ValueFinder>(); }
public ModuleInstance(ModuleModel moduleModel, LayerInstance layerInstance, TransientsModel transientsModel, EntitiesModel entitiesModel, ObjectsModel objectsModel, ValuesModel valuesModel, ServicesModel servicesModel, ImportedServicesModel importedServicesModel) { this.Model = moduleModel; this.LayerInstance = layerInstance; this.Transients = new TransientsInstance(transientsModel, this); this.Entities = new EntitiesInstance(entitiesModel, this); this.Objects = new ObjectsInstance(objectsModel, this); this.Values = new ValuesInstance(valuesModel, this); this.Services = servicesModel.NewInstance(this); this.ImportedServices = importedServicesModel.NewInstance(this); this.TransientBuilderFactory = new TransientBuilderFactoryInstance(this); this.ObjectBuilderFactory = new ObjectBuilderFactoryInstance(); this.ValueBuilderFactory = new ValueBuilderFactoryInstance(this); this.UnitOfWorkFactory = new UnitOfWorkFactoryInstance(); this.ServiceFinder = new ServiceFinderInstance(this); this.entityFinders = new Dictionary <Type, EntityFinder>(); this.transientFinders = new Dictionary <Type, TransientFinder>(); this.ObjectFinders = new Dictionary <Type, ObjectFinder>(); this.valueFinders = new Dictionary <Type, ValueFinder>(); }
public ModuleInstance NewInstance(LayerInstance layerInstance) { return(new ModuleInstance(this, layerInstance, this.Transients, this.entities, this.Objects, this.Values, this.Services, this.ImportedServicesModel)); }
public ModuleInstance NewInstance(LayerInstance layerInstance) { return new ModuleInstance(this, layerInstance, this.Transients, this.entities, this.Objects, this.Values, this.Services, this.ImportedServicesModel); }