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
TypeThe type that is read
Properties
AttributeProperties
Gets a collection of properties serialized as attributes
public IEnumerable<IPropertySerializationInfo> AttributeProperties { get; }
Property Value
BaseTypes
public List<ITypeSerializationInfo> BaseTypes { get; }
Property Value
CollectionItemRawType
public Type CollectionItemRawType { get; set; }
Property Value
CollectionItemType
Gets the element type of a collection
public ITypeSerializationInfo CollectionItemType { get; set; }
Property Value
CollectionType
public Type CollectionType { get; set; }
Property Value
Constructor
public ConstructorInfo Constructor { get; set; }
Property Value
ConstructorParameterCount
public int ConstructorParameterCount { get; }
Property Value
ConstructorProperties
Gets the properties required for constructor calls
public IPropertySerializationInfo[] ConstructorProperties { get; set; }
Property Value
DeclaredAttributeProperties
public List<IPropertySerializationInfo> DeclaredAttributeProperties { get; }
Property Value
DeclaredElementProperties
public List<IPropertySerializationInfo> DeclaredElementProperties { get; }
Property Value
DefaultProperty
Gets the default property of this type
public IPropertySerializationInfo DefaultProperty { get; set; }
Property Value
ElementName
Gets the element name of the type
public string ElementName { get; set; }
Property Value
ElementProperties
Gets a collection of properties serialized as elements
public IEnumerable<IPropertySerializationInfo> ElementProperties { get; }
Property Value
HasConstructorParameters
public bool HasConstructorParameters { get; }
Property Value
IdentifierProperty
Gets the property used as identifier
public IPropertySerializationInfo IdentifierProperty { get; set; }
Property Value
IsCollection
True, if this type is a collection
public bool IsCollection { get; }
Property Value
IsIdentified
True, if instances of this type are identified
public bool IsIdentified { get; }
Property Value
IsStaticCollection
public bool IsStaticCollection { get; }
Property Value
IsStringConvertible
True, if the items can be converted to string
public bool IsStringConvertible { get; }
Property Value
MappedType
Gets the system type this type serialization is mapped to
public Type MappedType { get; }
Property Value
Namespace
Gets the namespace of the type or null
public string Namespace { get; set; }
Property Value
NamespacePrefix
Gets the namespace prefix of the type or null
public string NamespacePrefix { get; set; }
Property Value
Type
public Type Type { get; }
Property Value
Methods
AddToCollection(object, object)
Adds the given item to the collection
public void AddToCollection(object collection, object item)
Parameters
ConvertFromString(string)
Deserializes the given text into an object
public object ConvertFromString(string text)
Parameters
text
stringthe textual representation
Returns
- object
The deserialized object
ConvertToString(object)
Serializes the given object into a string
public string ConvertToString(object input)
Parameters
input
objectthe 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
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
ITypeSerializationInfothe 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
ITypeSerializationInfoThe 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
objectthe 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.