public void AfterPropertiesSet(IBeanContextFactory beanContextFactory) { beanContextFactory.RegisterBean <ThreadPool>("threadPool").Autowireable(typeof(IThreadPool), typeof(IDelayedExecution)); beanContextFactory.RegisterBean <BooleanArrayConverter>("booleanArrayConverter"); DedicatedConverterUtil.BiLink(beanContextFactory, "booleanArrayConverter", typeof(String), typeof(bool[])); beanContextFactory.RegisterBean <ByteArrayConverter>("byteArrayConverter"); DedicatedConverterUtil.BiLink(beanContextFactory, "byteArrayConverter", typeof(String), typeof(byte[])); beanContextFactory.RegisterBean <SByteArrayConverter>("sbyteArrayConverter"); DedicatedConverterUtil.BiLink(beanContextFactory, "sbyteArrayConverter", typeof(String), typeof(sbyte[])); beanContextFactory.RegisterBean <CharArrayConverter>("charArrayConverter"); DedicatedConverterUtil.BiLink(beanContextFactory, "charArrayConverter", typeof(String), typeof(char[])); IBeanConfiguration stringToFileConverter = beanContextFactory.RegisterBean <StringToFileConverter>(); DedicatedConverterUtil.Link(beanContextFactory, stringToFileConverter, typeof(String), typeof(FileInfo)); DedicatedConverterUtil.Link(beanContextFactory, stringToFileConverter, typeof(String), typeof(DirectoryInfo)); IBeanConfiguration stringToClassArrayConverter = beanContextFactory.RegisterBean <StringToClassArrayConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToClassArrayConverter, typeof(String), typeof(Type[])); IBeanConfiguration stringToDoubleArrayConverter = beanContextFactory.RegisterBean <StringToDoubleArrayConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToDoubleArrayConverter, typeof(String), typeof(double[])); IBeanConfiguration stringToFloatArrayConverter = beanContextFactory.RegisterBean <StringToFloatArrayConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToFloatArrayConverter, typeof(String), typeof(float[])); IBeanConfiguration stringToIntArrayConverter = beanContextFactory.RegisterBean <StringToIntArrayConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToIntArrayConverter, typeof(String), typeof(int[])); IBeanConfiguration stringToLongArrayConverter = beanContextFactory.RegisterBean <StringToLongArrayConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToLongArrayConverter, typeof(String), typeof(long[])); IBeanConfiguration stringToPatternConverterBC = beanContextFactory.RegisterBean <StringToPatternConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToPatternConverterBC, typeof(String), typeof(Regex)); DedicatedConverterUtil.BiLink(beanContextFactory, stringToPatternConverterBC, typeof(String), typeof(Regex[])); IBeanConfiguration stringToStringArrayConverter = beanContextFactory.RegisterBean <StringToStringArrayConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, stringToStringArrayConverter, typeof(String), typeof(String[])); beanContextFactory.RegisterBean <InterningFeature>("interningFeature").Autowireable <IInterningFeature>(); beanContextFactory.RegisterBean <GuiThreadHelper>("guiThreadHelper").Autowireable <IGuiThreadHelper>(); beanContextFactory.RegisterBean <MultithreadingHelper>().Autowireable <IMultithreadingHelper>(); }
public virtual void AfterPropertiesSet(IBeanContextFactory beanContextFactory) { beanContextFactory.RegisterAutowireableBean <IMergeController, MergeController>(); beanContextFactory.RegisterAutowireableBean <IMergeProcess, MergeProcess>(); beanContextFactory.RegisterAutowireableBean <ICUDResultApplier, CUDResultApplier>(); beanContextFactory.RegisterAutowireableBean <ICUDResultComparer, CUDResultComparer>(); beanContextFactory.RegisterAutowireableBean <CompositeIdMixin, CompositeIdMixin>(); beanContextFactory.RegisterAutowireableBean <ObjRefMixin, ObjRefMixin>(); beanContextFactory.RegisterBean <SecurityScopeProvider>().Autowireable(typeof(ISecurityScopeProvider), typeof(ISecurityScopeChangeListenerExtendable)); beanContextFactory.RegisterBean <SecurityActivation>().Autowireable <ISecurityActivation>(); beanContextFactory.RegisterBean <CacheModification>().Autowireable <ICacheModification>(); beanContextFactory.RegisterAutowireableBean <IObjRefHelper, ObjRefHelper>(); beanContextFactory.RegisterBean <CUDResultHelper>().Autowireable(typeof(ICUDResultHelper), typeof(ICUDResultExtendable)); beanContextFactory.RegisterBean <EntityMetaDataReader>().Autowireable <IEntityMetaDataReader>(); beanContextFactory.RegisterBean <MergeServiceRegistry>().Autowireable(typeof(IMergeService), typeof(IMergeServiceExtensionExtendable), typeof(IMergeListenerExtendable), typeof(IMergeTimeProvider)); IBeanConfiguration valueObjectMap = beanContextFactory.RegisterBean <ValueObjectMap>(); IBeanConfiguration entityMetaDataProvider = beanContextFactory.RegisterBean <EntityMetaDataProvider>() .PropertyRef("ValueObjectMap", valueObjectMap) .Autowireable <IEntityMetaDataProvider>() .Autowireable <IEntityMetaDataRefresher>() .Autowireable <IValueObjectConfigExtendable>() .Autowireable <IEntityLifecycleExtendable>() .Autowireable <ITechnicalEntityTypeExtendable>() .Autowireable <IEntityMetaDataExtendable>() .Autowireable <IEntityInstantiationExtensionExtendable>(); beanContextFactory.RegisterBean <IndependentEntityMetaDataReader>(INDEPENDENT_META_DATA_READER).Precedence(PrecedenceType.HIGH); if (!IndependentMetaData) { IBeanConfiguration entityMetaDataConverter = beanContextFactory.RegisterBean <EntityMetaDataConverter>(); DedicatedConverterUtil.BiLink(beanContextFactory, entityMetaDataConverter, typeof(EntityMetaData), typeof(EntityMetaDataTransfer)); beanContextFactory.RegisterBean <EntityMetaDataClient>(REMOTE_ENTITY_METADATA_PROVIDER); } else { } IBeanConfiguration ormConfigGroupProvider = beanContextFactory.RegisterBean <OrmConfigGroupProvider>().Autowireable <IOrmConfigGroupProvider>(); beanContextFactory.Link(ormConfigGroupProvider, OrmConfigGroupProvider.handleClearAllCachesEvent).To <IEventListenerExtendable>() .With(typeof(ClearAllCachesEvent)); IBeanConfiguration ormXmlReaderLegathy = beanContextFactory.RegisterBean <OrmXmlReaderLegathy>(); ExtendableBean.RegisterExtendableBean(beanContextFactory, typeof(IOrmXmlReaderRegistry), typeof(IOrmXmlReaderExtendable)) // .PropertyRef(ExtendableBean.P_DEFAULT_BEAN, ormXmlReaderLegathy); IBeanConfiguration ormXmlReader20BC = beanContextFactory.RegisterBean <OrmXmlReader20>(); beanContextFactory.Link(ormXmlReader20BC).To <IOrmXmlReaderExtendable>().With(OrmXmlReader20.ORM_XML_NS); beanContextFactory.RegisterBean <XmlConfigUtil>().Autowireable <IXmlConfigUtil>(); beanContextFactory.RegisterBean <RelationProvider>().Autowireable(typeof(IRelationProvider), typeof(INoEntityTypeExtendable)); beanContextFactory.RegisterBean <MemberTypeProvider>().Autowireable <IMemberTypeProvider>().Autowireable <IIntermediateMemberTypeProvider>(); beanContextFactory.RegisterBean <EmbeddedMemberMixin>().Autowireable <EmbeddedMemberMixin>(); beanContextFactory.RegisterBean <ObjRefFactory>().Autowireable <IObjRefFactory>(); IBeanConfiguration objRefObjectCopierExtension = beanContextFactory.RegisterBean <ObjRefObjectCopierExtension>(); beanContextFactory.Link(objRefObjectCopierExtension).To <IObjectCopierExtendable>().With(typeof(IObjRef)); Type entityFactoryType = this.EntityFactoryType; if (entityFactoryType == null) { entityFactoryType = typeof(EntityFactory); } beanContextFactory.RegisterBean("entityFactory", entityFactoryType).Autowireable <IEntityFactory>(); beanContextFactory.RegisterBean <ObjRefStoreEntryProvider>().Autowireable <IObjRefStoreEntryProvider>(); if (IsNetworkClientMode && IsMergeServiceBeanActive) { IBeanConfiguration remoteMergeServiceExtension = beanContextFactory.RegisterBean <ClientServiceBean>(DEFAULT_MERGE_SERVICE_EXTENSION) .PropertyValue("Interface", typeof(IMergeServiceExtension)) .PropertyValue("SyncRemoteInterface", typeof(IMergeServiceWCF)) .PropertyValue("AsyncRemoteInterface", typeof(IMergeClient)); // register to all entities in a "most-weak" manner beanContextFactory.Link(remoteMergeServiceExtension).To <IMergeServiceExtensionExtendable>().With(typeof(Object)); } }