Interface ITypeSerializationInfo
Denotes abstract information necessary for serialization
Namespace: NMF.Serialization
Assembly: NMF.Serialization.dll
Syntax
public interface ITypeSerializationInfo
Properties
| Edit this page View SourceAttributeProperties
Gets a collection of properties serialized as attributes
Declaration
IEnumerable<IPropertySerializationInfo> AttributeProperties { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IPropertySerializationInfo> |
CollectionItemType
Gets the element type of a collection
Declaration
ITypeSerializationInfo CollectionItemType { get; }
Property Value
Type | Description |
---|---|
ITypeSerializationInfo |
ConstructorProperties
Gets the properties required for constructor calls
Declaration
IPropertySerializationInfo[] ConstructorProperties { get; }
Property Value
Type | Description |
---|---|
IPropertySerializationInfo[] |
DefaultProperty
Gets the default property of this type
Declaration
IPropertySerializationInfo DefaultProperty { get; }
Property Value
Type | Description |
---|---|
IPropertySerializationInfo |
ElementName
Gets the element name of the type
Declaration
string ElementName { get; }
Property Value
Type | Description |
---|---|
string |
ElementProperties
Gets a collection of properties serialized as elements
Declaration
IEnumerable<IPropertySerializationInfo> ElementProperties { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IPropertySerializationInfo> |
IdentifierProperty
Gets the property used as identifier
Declaration
IPropertySerializationInfo IdentifierProperty { get; }
Property Value
Type | Description |
---|---|
IPropertySerializationInfo |
IsCollection
True, if this type is a collection
Declaration
bool IsCollection { get; }
Property Value
Type | Description |
---|---|
bool |
IsIdentified
True, if instances of this type are identified
Declaration
bool IsIdentified { get; }
Property Value
Type | Description |
---|---|
bool |
IsStringConvertible
True, if the items can be converted to string
Declaration
bool IsStringConvertible { get; }
Property Value
Type | Description |
---|---|
bool |
MappedType
Gets the system type this type serialization is mapped to
Declaration
Type MappedType { get; }
Property Value
Type | Description |
---|---|
Type |
Namespace
Gets the namespace of the type or null
Declaration
string Namespace { get; }
Property Value
Type | Description |
---|---|
string |
NamespacePrefix
Gets the namespace prefix of the type or null
Declaration
string NamespacePrefix { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceAddToCollection(object, object)
Adds the given item to the collection
Declaration
void AddToCollection(object collection, object item)
Parameters
Type | Name | Description |
---|---|---|
object | collection | the collection |
object | item | the item to add |
ConvertFromString(string)
Deserializes the given text into an object
Declaration
object ConvertFromString(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | the textual representation |
Returns
Type | Description |
---|---|
object | The deserialized object |
ConvertToString(object)
Serializes the given object into a string
Declaration
string ConvertToString(object input)
Parameters
Type | Name | Description |
---|---|---|
object | input | the object |
Returns
Type | Description |
---|---|
string | a textual representation |
CreateObject(object[])
Creates a new instance
Declaration
object CreateObject(object[] args)
Parameters
Type | Name | Description |
---|---|---|
object[] | args | The constructor parameters |
Returns
Type | Description |
---|---|
object |
IsAssignableFrom(ITypeSerializationInfo)
Determines whether an instance of the given more concrete type can be assigned to this type
Declaration
bool IsAssignableFrom(ITypeSerializationInfo specializedType)
Parameters
Type | Name | Description |
---|---|---|
ITypeSerializationInfo | specializedType | the more concrete type |
Returns
Type | Description |
---|---|
bool | True, if the type is assignable, otherwise False |
IsExplicitTypeInformationRequired(ITypeSerializationInfo)
Determines whether the serializer should render explicit type information
Declaration
bool IsExplicitTypeInformationRequired(ITypeSerializationInfo itemType)
Parameters
Type | Name | Description |
---|---|---|
ITypeSerializationInfo | itemType | The type of the item |
Returns
Type | Description |
---|---|
bool | True, if explicit type information should be rendered, otherwise false |
IsInstanceOf(object)
Determines whether the given object is an instance of this type
Declaration
bool IsInstanceOf(object instance)
Parameters
Type | Name | Description |
---|---|---|
object | instance | the instance |
Returns
Type | Description |
---|---|
bool | True, if the object is an instance of the serialization type, otherwise False |