Table of Contents

Interface ITypeSerializationInfo

Namespace
NMF.Serialization
Assembly
NMF.Serialization.dll

Denotes abstract information necessary for serialization

public interface ITypeSerializationInfo

Properties

AttributeProperties

Gets a collection of properties serialized as attributes

IEnumerable<IPropertySerializationInfo> AttributeProperties { get; }

Property Value

IEnumerable<IPropertySerializationInfo>

CollectionItemType

Gets the element type of a collection

ITypeSerializationInfo CollectionItemType { get; }

Property Value

ITypeSerializationInfo

ConstructorProperties

Gets the properties required for constructor calls

IPropertySerializationInfo[] ConstructorProperties { get; }

Property Value

IPropertySerializationInfo[]

DefaultProperty

Gets the default property of this type

IPropertySerializationInfo DefaultProperty { get; }

Property Value

IPropertySerializationInfo

ElementName

Gets the element name of the type

string ElementName { get; }

Property Value

string

ElementProperties

Gets a collection of properties serialized as elements

IEnumerable<IPropertySerializationInfo> ElementProperties { get; }

Property Value

IEnumerable<IPropertySerializationInfo>

IdentifierProperty

Gets the property used as identifier

IPropertySerializationInfo IdentifierProperty { get; }

Property Value

IPropertySerializationInfo

IsCollection

True, if this type is a collection

bool IsCollection { get; }

Property Value

bool

IsIdentified

True, if instances of this type are identified

bool IsIdentified { get; }

Property Value

bool

IsStringConvertible

True, if the items can be converted to string

bool IsStringConvertible { get; }

Property Value

bool

MappedType

Gets the system type this type serialization is mapped to

Type MappedType { get; }

Property Value

Type

Namespace

Gets the namespace of the type or null

string Namespace { get; }

Property Value

string

NamespacePrefix

Gets the namespace prefix of the type or null

string NamespacePrefix { get; }

Property Value

string

Methods

AddToCollection(object, object)

Adds the given item to the collection

void AddToCollection(object collection, object item)

Parameters

collection object

the collection

item object

the item to add

ConvertFromString(string)

Deserializes the given text into an object

object ConvertFromString(string text)

Parameters

text string

the textual representation

Returns

object

The deserialized object

ConvertToString(object)

Serializes the given object into a string

string ConvertToString(object input)

Parameters

input object

the object

Returns

string

a textual representation

CreateObject(object[])

Creates a new instance

object CreateObject(object[] args)

Parameters

args object[]

The constructor parameters

Returns

object

IsAssignableFrom(ITypeSerializationInfo)

Determines whether an instance of the given more concrete type can be assigned to this type

bool IsAssignableFrom(ITypeSerializationInfo specializedType)

Parameters

specializedType ITypeSerializationInfo

the more concrete type

Returns

bool

True, if the type is assignable, otherwise False

IsExplicitTypeInformationRequired(ITypeSerializationInfo)

Determines whether the serializer should render explicit type information

bool IsExplicitTypeInformationRequired(ITypeSerializationInfo itemType)

Parameters

itemType ITypeSerializationInfo

The type of the item

Returns

bool

True, if explicit type information should be rendered, otherwise false

IsInstanceOf(object)

Determines whether the given object is an instance of this type

bool IsInstanceOf(object instance)

Parameters

instance object

the instance

Returns

bool

True, if the object is an instance of the serialization type, otherwise False