protected EntityFactoryConstructor GetConstructorEntry(Type entityType) { EntityFactoryConstructor constructor = typeToConstructorMap.Get(entityType); if (constructor == null) { try { EntityFactoryWithArgumentConstructor argumentConstructor = AccessorTypeProvider.GetConstructorType <EntityFactoryWithArgumentConstructor>(entityType); constructor = new EntityFactoryToArgumentConstructor(argumentConstructor, Self); } catch (Exception) { constructor = AccessorTypeProvider.GetConstructorType <EntityFactoryConstructor>(entityType); } typeToConstructorMap.Put(entityType, constructor); } return(constructor); }
public EntityFactoryToArgumentConstructor(EntityFactoryWithArgumentConstructor constructor, IEntityFactory entityFactory) { this.constructor = constructor; this.entityFactory = entityFactory; }