/// <summary>
        /// This Operation is called, when the module shall initialize itself.
        /// </summary>
        /// <param name="typeRegistry">The type registry for service requests or registrations.</param>
        /// <inheritdoc/>
        public void Initialize(ITypeRegistry typeRegistry)
        {
            var propertyService               = typeRegistry.GetObject <IPropertyService>();
            var signatureSetInitializer       = typeRegistry.GetObject <ISignatureEntitySetInitializer>();
            var configurationRegistry         = typeRegistry.GetObject <IModelConfigurationRegistry>();
            var entityTypeInitializerRegistry = typeRegistry.GetObject <IEntityTypeInitializerRegistry>();

            var dataTreeSignatureTypeInitializer = new TreeSignatureTypeInitializer(
                signatureSetInitializer,
                propertyService,
                "Tree",
                "DomainSolution");

            entityTypeInitializerRegistry.RegisterEntityTypeInitializer(dataTreeSignatureTypeInitializer);
            configurationRegistry.RegisterSignatureTypeConfiguration(new SignatureTypeConfiguration("Tree", new[] { "treeNode", "rootNode" }));
        }
Esempio n. 2
0
        /// <summary>
        /// This Operation is called, when the module shall initialize itself.
        /// </summary>
        /// <param name="typeRegistry">The type registry for service requests or registrations.</param>
        /// <inheritdoc/>
        public void Initialize(ITypeRegistry typeRegistry)
        {
            var propertyService               = typeRegistry.GetObject <IPropertyService>();
            var signatureSetInitializer       = typeRegistry.GetObject <ISignatureEntitySetInitializer>();
            var configurationRegistry         = typeRegistry.GetObject <IModelConfigurationRegistry>();
            var entityTypeInitializerRegistry = typeRegistry.GetObject <IEntityTypeInitializerRegistry>();

            var dataTreeSignatureTypeInitializer = new TreeSignatureTypeInitializer(
                signatureSetInitializer,
                propertyService,
                "DataTree",
                "BaseMasterData");

            var treeValuePropertyPostProcessor = new SelectionTreeValuePropertyPostProcessor(signatureSetInitializer);

            entityTypeInitializerRegistry.RegisterEntityTypeInitializer(dataTreeSignatureTypeInitializer);
            entityTypeInitializerRegistry.RegisterEntityTypeInitializer(treeValuePropertyPostProcessor);
            configurationRegistry.RegisterSignatureTypeConfiguration(new SignatureTypeConfiguration("DataTree", new[] { "treeNode", "rootNode" }));
        }