Table of Contents

Interface IPropertySerializationInfo

Namespace
NMF.Serialization
Assembly
NMF.Serialization.dll

Denotes the serialization information for a property

public interface IPropertySerializationInfo

Properties

DefaultValue

Gets the default value

object DefaultValue { get; }

Property Value

object

ElementName

The element name that should be serialized

string ElementName { get; }

Property Value

string

IdentificationMode

Gets the identification mode of the property

XmlIdentificationMode IdentificationMode { get; }

Property Value

XmlIdentificationMode

IsIdentifier

True, if the property is an identifier, otherwise False

bool IsIdentifier { get; }

Property Value

bool

IsReadOnly

True, if the property is read-only, otherwise False

bool IsReadOnly { get; }

Property Value

bool

IsStringConvertible

True, if the value of this property allows roundtrip-serialization to string

bool IsStringConvertible { get; }

Property Value

bool

Namespace

The namespace to which the element should be serialized or null

string Namespace { get; }

Property Value

string

NamespacePrefix

The namespace prefix that should be used for serialization or null

string NamespacePrefix { get; }

Property Value

string

Opposite

Gets the opposite property or null

IPropertySerializationInfo Opposite { get; }

Property Value

IPropertySerializationInfo

PropertyMinType

Gets the minimum type system type of the property

Type PropertyMinType { get; }

Property Value

Type

PropertyType

Gets the property type

ITypeSerializationInfo PropertyType { get; }

Property Value

ITypeSerializationInfo

RequiresInitialization

True, if the property requires initialization, otherwise False

bool RequiresInitialization { get; }

Property Value

bool

ShallCreateInstance

Determines whether the instance should be created explicitly

bool ShallCreateInstance { get; }

Property Value

bool

Methods

AddToCollection(object, object, XmlSerializationContext)

Adds the given object to the collection

void AddToCollection(object input, object item, XmlSerializationContext context)

Parameters

input object

The context object

item object

The item that should be added

context XmlSerializationContext

The deserialization context

ConvertFromString(string)

Deserializes the provided text

object ConvertFromString(string text)

Parameters

text string

the text

Returns

object

The deserialized value

ConvertToString(object)

Converts the provided object to a string

string ConvertToString(object input)

Parameters

input object

The object to convert

Returns

string

A string representation

GetValue(object, XmlSerializationContext)

Gets the value of this property for the given input object

object GetValue(object input, XmlSerializationContext context)

Parameters

input object

The context object

context XmlSerializationContext

The serialization context

Returns

object

Initialize(object, XmlSerializationContext)

Initializes the property for the given element

void Initialize(object input, XmlSerializationContext context)

Parameters

input object

The object instance for which the property should be initialized

context XmlSerializationContext

The deserialization context

SetValue(object, object, XmlSerializationContext)

Sets the value for the property

void SetValue(object input, object value, XmlSerializationContext context)

Parameters

input object

The context object

value object

The value of the property

context XmlSerializationContext

The deserialization context

ShouldSerializeValue(object, object)

Determines whether the provided value should be serialized

bool ShouldSerializeValue(object obj, object value)

Parameters

obj object

The context object

value object

The value in question

Returns

bool

True, if the value should be serialized, otherwise False