IModel.SetInitField Method
Namespace: NextDesign.Core
Description
Sets the initial value of the field defined in the metamodel to the specified field of this instance.
If the metamodel does not specify an initial value for the field, the default value of the field type is set.
If this method is called for an owned field of a class type, the IModel set as the field value is deleted.
Also, if this method is called for a reference field of a class type, the association with the IModel set as the field value is deleted (the IModel of the field value is not deleted and is maintained).
Arguments
Name | Type | Description |
---|---|---|
fieldName | string | Field name Null or an empty string cannot be specified. |
Return value
- void
Exception
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If null or an empty string is specified for fieldName |
Field not found | ExtensionFieldNotFoundException | If the specified field is not found in the metaclass of this instance |
Invalid operation | ExtensionInvalidOperationException | If this is a deleted model or a temporary proxy If an inoperable field is specified for the field name - Feature assignment field of a product line - Field with the System.Core tag |