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
CollectionItemType
Gets the element type of a collection
ITypeSerializationInfo CollectionItemType { get; }
Property Value
ConstructorProperties
Gets the properties required for constructor calls
IPropertySerializationInfo[] ConstructorProperties { get; }
Property Value
DefaultProperty
Gets the default property of this type
IPropertySerializationInfo DefaultProperty { get; }
Property Value
ElementName
Gets the element name of the type
string ElementName { get; }
Property Value
ElementProperties
Gets a collection of properties serialized as elements
IEnumerable<IPropertySerializationInfo> ElementProperties { get; }
Property Value
IdentifierProperty
Gets the property used as identifier
IPropertySerializationInfo IdentifierProperty { get; }
Property Value
IsCollection
True, if this type is a collection
bool IsCollection { get; }
Property Value
IsIdentified
True, if instances of this type are identified
bool IsIdentified { get; }
Property Value
IsStringConvertible
True, if the items can be converted to string
bool IsStringConvertible { get; }
Property Value
MappedType
Gets the system type this type serialization is mapped to
Type MappedType { get; }
Property Value
Namespace
Gets the namespace of the type or null
string Namespace { get; }
Property Value
NamespacePrefix
Gets the namespace prefix of the type or null
string NamespacePrefix { get; }
Property Value
Methods
AddToCollection(object, object)
Adds the given item to the collection
void AddToCollection(object collection, object item)
Parameters
ConvertFromString(string)
Deserializes the given text into an object
object ConvertFromString(string text)
Parameters
text
stringthe textual representation
Returns
- object
The deserialized object
ConvertToString(object)
Serializes the given object into a string
string ConvertToString(object input)
Parameters
input
objectthe object
Returns
- string
a textual representation
CreateObject(object[])
Creates a new instance
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
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
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
bool IsInstanceOf(object instance)
Parameters
instance
objectthe instance
Returns
- bool
True, if the object is an instance of the serialization type, otherwise False