Table of Contents

Class VisibilityConditionConfigurationXmlSerializer

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll
public class VisibilityConditionConfigurationXmlSerializer : ConfigurationsXmlSerializer<VisibilityConditionConfiguration>, IVisibilityConditionConfigurationXmlSerializer
Inheritance
object
VisibilityConditionConfigurationXmlSerializer
Implements
Inherited Members
Extension Methods

Constructors

VisibilityConditionConfigurationXmlSerializer(IVisibilityConditionDefinitionProvider)

Initializes a new instance of the VisibilityConditionConfigurationXmlSerializer class.

public VisibilityConditionConfigurationXmlSerializer(IVisibilityConditionDefinitionProvider conditionDefinitionProvider)

Parameters

conditionDefinitionProvider IVisibilityConditionDefinitionProvider

Provider of visibility condition definitions.

Properties

ConfigurationElementName

Gets the name of the element containing the serialized VisibilityConditionConfiguration.

protected override string ConfigurationElementName { get; }

Property Value

string

ConfiguredObjectElementName

Gets the name of the element containing the serialized VisibilityCondition wrapped by VisibilityConditionConfiguration.

protected override string ConfiguredObjectElementName { get; }

Property Value

string

ConfiguredObjectIdentifierElementName

Gets the name of the element containing type identifier of the serialized VisibilityCondition wrapped by VisibilityConditionConfiguration.

protected override string ConfiguredObjectIdentifierElementName { get; }

Property Value

string

Methods

CreateDeserializedConfiguration(string, object)

Creates a new VisibilityConditionConfiguration based on deserialzed typeIdentifier and configuredObject.

protected override VisibilityConditionConfiguration CreateDeserializedConfiguration(string typeIdentifier, object configuredObject)

Parameters

typeIdentifier string

Type identifier of the configuredObject.

configuredObject object

Deserialized configured object.

Returns

VisibilityConditionConfiguration

Returns deserialized configuration.

Deserialize(string)

Deserializes a visibility condition configuration from an XML string.

public VisibilityConditionConfiguration Deserialize(string visibilityConditionConfigurationXml)

Parameters

visibilityConditionConfigurationXml string

XML representation of the condition configuration to be deserialized, or null.

Returns

VisibilityConditionConfiguration

Returns a visibility condition configuration, or null when null or empty XML is specified.

Exceptions

ArgumentException

Thrown when visibilityConditionConfigurationXml is null or an empty string.

GetConfiguredObjectType(string)

Gets visibility condition type from a typeIdentifier.

protected override Type GetConfiguredObjectType(string typeIdentifier)

Parameters

typeIdentifier string

Returns

Type

Serialize(VisibilityConditionConfiguration)

Serializes a visibility condition configuration to an XML string.

public string Serialize(VisibilityConditionConfiguration visibilityConditionConfiguration)

Parameters

visibilityConditionConfiguration VisibilityConditionConfiguration

Visibility condition configuration to be serialized, or null.

Returns

string

Returns an XML representation of the condition, or an empty string when no condition is specified.