Class FormComponentPropertiesMapper
Contains mapping methods for conversions between form component properties and form field definition.
[Obsolete("This class was not intented for a public use and will be removed in the next version.")]
public class FormComponentPropertiesMapper : IFormComponentPropertiesMapper
- Inheritance
-
objectFormComponentPropertiesMapper
- Implements
- Extension Methods
Constructors
FormComponentPropertiesMapper(IFormComponentDefinitionProvider, IFormComponentActivator, IEditablePropertiesCollector, IValidationRuleConfigurationsXmlSerializer, IVisibilityConditionConfigurationXmlSerializer)
Initializes a new instance of the FormComponentPropertiesMapper class.
public FormComponentPropertiesMapper(IFormComponentDefinitionProvider formComponentDefinitionProvider, IFormComponentActivator formComponentActivator, IEditablePropertiesCollector editablePropertiesCollector, IValidationRuleConfigurationsXmlSerializer validationRuleConfigurationsXmlSerializer, IVisibilityConditionConfigurationXmlSerializer visibilityConditionConfigurationXmlSerializer)
Parameters
formComponentDefinitionProviderIFormComponentDefinitionProviderProvider for registered form components retrieval.
formComponentActivatorIFormComponentActivatorActivator for form components.
editablePropertiesCollectorIEditablePropertiesCollectorCollects editable properties from a model.
validationRuleConfigurationsXmlSerializerIValidationRuleConfigurationsXmlSerializerSerializer for validation rules stored in ValidationRuleConfigurationsXmlData.
visibilityConditionConfigurationXmlSerializerIVisibilityConditionConfigurationXmlSerializerSerializer for visibility condition stored in VisibilityConditionConfigurationXmlData.
Methods
FromFieldInfo(FormFieldInfo)
Maps an instance of FormFieldInfo to corresponding FormComponentProperties. To extract identifier of corresponding FormComponentDefinition use GetComponentIdentifier(FormFieldInfo).
public virtual FormComponentProperties FromFieldInfo(FormFieldInfo formFieldInfo)
Parameters
formFieldInfoFormFieldInfoForm field to be mapped.
Returns
- FormComponentProperties
Returns an instance of FormComponentProperties which corresponds to given form field.
Exceptions
- ArgumentNullException
Thrown when
formFieldInfois null.- InvalidOperationException
Thrown when
formFieldInfocontains an unknown form component identifier-or-
when corresponding component properties contain a property of type which is not supported by DataTypeManager.
GetComponentIdentifier(FormFieldInfo)
Gets FormComponentDefinition identifier stored in formFieldInfo.
public virtual string GetComponentIdentifier(FormFieldInfo formFieldInfo)
Parameters
formFieldInfoFormFieldInfoForm field info for which to obtain FormComponentDefinition's identifier.
Returns
- string
Return identifier obtained from
formFieldInfo.
Exceptions
- ArgumentNullException
Thrown when
formFieldInfois null.- InvalidOperationException
Thrown when
formFieldInfodoes not specify a form component identifier.
ToFormFieldInfo(FormComponentProperties, string)
Maps an instance of FormComponentProperties to corresponding FormFieldInfo.
public virtual FormFieldInfo ToFormFieldInfo(FormComponentProperties formComponentProperties, string componentIdentifier)
Parameters
formComponentPropertiesFormComponentPropertiesForm component properties to be mapped.
componentIdentifierstringIdentifier of corresponding FormComponentDefinition to be stored along with
formComponentProperties.
Returns
- FormFieldInfo
Returns an instance of FormFieldInfo which corresponds to given properties and type identifier.
Exceptions
- ArgumentNullException
Thrown when
formComponentPropertiesis null.- InvalidOperationException
Thrown when
formComponentPropertiescontain a property of type which is not supported by DataTypeManager.