Skip to main content

IModelInitializationProvider interface

Namespace: NextDesign.Core.EditingCapabilities

Description

A model instance initializer.
If you want to customize the instance initialization of your model, register an implementation object of this interface in the registry.

Affiliation area

NameDescription
EditingCapabilityAPIs to access EditingCapability.

Inherit Base

NameDescription
IEditingCapabilityProviderThe underlying interface for the provider.

Method

NameDescription
InitializeFieldsInitialize the model.

Be careful not to create a performance bottleneck.
In the implementation of this method, if a model is added to the field, and there is a registered provider corresponding to the added model
IModelInitializationProvider.InitializeFields will be executed at that point.

Your provider implementation should be careful not to make recursive calls.
For example, if you create a child element within the provider for a model with a composite structure
Calling IModelInitializationProvider.InitializeFields will loop infinitely.

If this method throws an exception, the entire process is rolled back as if the creation of the new model itself had failed.
InitializeProviderInitializes this provider.
The provider will be executed when the model is generated by registering the metaclass that enables this provider in the context.

This method is called back when the provider is registered with the IEditingCapabilityProviderRegistry.