Table of Contents

Class XmlTypeSerializationInfo

Namespace
NMF.Serialization
Assembly
NMF.Serialization.dll

Denotes the default type serialization info read through reflection

public class XmlTypeSerializationInfo : ITypeSerializationInfo
Inheritance
XmlTypeSerializationInfo
Implements
Inherited Members

Constructors

XmlTypeSerializationInfo(Type)

Creates a new instance

public XmlTypeSerializationInfo(Type type)

Parameters

type Type

The type that is read

Properties

AttributeProperties

Gets a collection of properties serialized as attributes

public IEnumerable<IPropertySerializationInfo> AttributeProperties { get; }

Property Value

IEnumerable<IPropertySerializationInfo>

BaseTypes

public List<ITypeSerializationInfo> BaseTypes { get; }

Property Value

List<ITypeSerializationInfo>

CollectionItemRawType

public Type CollectionItemRawType { get; set; }

Property Value

Type

CollectionItemType

Gets the element type of a collection

public ITypeSerializationInfo CollectionItemType { get; set; }

Property Value

ITypeSerializationInfo

CollectionType

public Type CollectionType { get; set; }

Property Value

Type

Constructor

public ConstructorInfo Constructor { get; set; }

Property Value

ConstructorInfo

ConstructorParameterCount

public int ConstructorParameterCount { get; }

Property Value

int

ConstructorProperties

Gets the properties required for constructor calls

public IPropertySerializationInfo[] ConstructorProperties { get; set; }

Property Value

IPropertySerializationInfo[]

DeclaredAttributeProperties

public List<IPropertySerializationInfo> DeclaredAttributeProperties { get; }

Property Value

List<IPropertySerializationInfo>

DeclaredElementProperties

public List<IPropertySerializationInfo> DeclaredElementProperties { get; }

Property Value

List<IPropertySerializationInfo>

DefaultProperty

Gets the default property of this type

public IPropertySerializationInfo DefaultProperty { get; set; }

Property Value

IPropertySerializationInfo

ElementName

Gets the element name of the type

public string ElementName { get; set; }

Property Value

string

ElementProperties

Gets a collection of properties serialized as elements

public IEnumerable<IPropertySerializationInfo> ElementProperties { get; }

Property Value

IEnumerable<IPropertySerializationInfo>

HasConstructorParameters

public bool HasConstructorParameters { get; }

Property Value

bool

IdentifierProperty

Gets the property used as identifier

public IPropertySerializationInfo IdentifierProperty { get; set; }

Property Value

IPropertySerializationInfo

IsCollection

True, if this type is a collection

public bool IsCollection { get; }

Property Value

bool

IsIdentified

True, if instances of this type are identified

public bool IsIdentified { get; }

Property Value

bool

IsStaticCollection

public bool IsStaticCollection { get; }

Property Value

bool

IsStringConvertible

True, if the items can be converted to string

public bool IsStringConvertible { get; }

Property Value

bool

MappedType

Gets the system type this type serialization is mapped to

public Type MappedType { get; }

Property Value

Type

Namespace

Gets the namespace of the type or null

public string Namespace { get; set; }

Property Value

string

NamespacePrefix

Gets the namespace prefix of the type or null

public string NamespacePrefix { get; set; }

Property Value

string

Type

public Type Type { get; }

Property Value

Type

Methods

AddToCollection(object, object)

Adds the given item to the collection

public 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

public object ConvertFromString(string text)

Parameters

text string

the textual representation

Returns

object

The deserialized object

ConvertToString(object)

Serializes the given object into a string

public string ConvertToString(object input)

Parameters

input object

the object

Returns

string

a textual representation

CreateCollectionAddMethod()

public void CreateCollectionAddMethod()

CreateObject(object[])

Creates a new instance

public 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

public 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

public 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

public bool IsInstanceOf(object instance)

Parameters

instance object

the instance

Returns

bool

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

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.