Interface IPropertySerializationInfo
Denotes the serialization information for a property
Namespace: NMF.Serialization
Assembly: NMF.Serialization.dll
Syntax
public interface IPropertySerializationInfo
Properties
| Edit this page View SourceElementName
The element name that should be serialized
Declaration
string ElementName { get; }
Property Value
Type | Description |
---|---|
string |
IdentificationMode
Gets the identification mode of the property
Declaration
XmlIdentificationMode IdentificationMode { get; }
Property Value
Type | Description |
---|---|
XmlIdentificationMode |
IsIdentifier
True, if the property is an identifier, otherwise False
Declaration
bool IsIdentifier { get; }
Property Value
Type | Description |
---|---|
bool |
IsReadOnly
True, if the property is read-only, otherwise False
Declaration
bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
IsStringConvertible
True, if the value of this property allows roundtrip-serialization to string
Declaration
bool IsStringConvertible { get; }
Property Value
Type | Description |
---|---|
bool |
Namespace
The namespace to which the element should be serialized or null
Declaration
string Namespace { get; }
Property Value
Type | Description |
---|---|
string |
NamespacePrefix
The namespace prefix that should be used for serialization or null
Declaration
string NamespacePrefix { get; }
Property Value
Type | Description |
---|---|
string |
Opposite
Gets the opposite property or null
Declaration
IPropertySerializationInfo Opposite { get; }
Property Value
Type | Description |
---|---|
IPropertySerializationInfo |
PropertyMinType
Gets the minimum type system type of the property
Declaration
Type PropertyMinType { get; }
Property Value
Type | Description |
---|---|
Type |
PropertyType
Gets the property type
Declaration
ITypeSerializationInfo PropertyType { get; }
Property Value
Type | Description |
---|---|
ITypeSerializationInfo |
RequiresInitialization
True, if the property requires initialization, otherwise False
Declaration
bool RequiresInitialization { get; }
Property Value
Type | Description |
---|---|
bool |
ShallCreateInstance
Determines whether the instance should be created explicitly
Declaration
bool ShallCreateInstance { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceAddToCollection(object, object, XmlSerializationContext)
Adds the given object to the collection
Declaration
void AddToCollection(object input, object item, XmlSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
object | input | The context object |
object | item | The item that should be added |
XmlSerializationContext | context | The deserialization context |
ConvertFromString(string)
Deserializes the provided text
Declaration
object ConvertFromString(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | the text |
Returns
Type | Description |
---|---|
object | The deserialized value |
ConvertToString(object)
Converts the provided object to a string
Declaration
string ConvertToString(object input)
Parameters
Type | Name | Description |
---|---|---|
object | input | The object to convert |
Returns
Type | Description |
---|---|
string | A string representation |
GetValue(object, XmlSerializationContext)
Gets the value of this property for the given input object
Declaration
object GetValue(object input, XmlSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
object | input | The context object |
XmlSerializationContext | context | The serialization context |
Returns
Type | Description |
---|---|
object |
Initialize(object, XmlSerializationContext)
Initializes the property for the given element
Declaration
void Initialize(object input, XmlSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
object | input | The object instance for which the property should be initialized |
XmlSerializationContext | context | The deserialization context |
SetValue(object, object, XmlSerializationContext)
Sets the value for the property
Declaration
void SetValue(object input, object value, XmlSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
object | input | The context object |
object | value | The value of the property |
XmlSerializationContext | context | The deserialization context |
ShouldSerializeValue(object, object)
Determines whether the provided value should be serialized
Declaration
bool ShouldSerializeValue(object obj, object value)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The context object |
object | value | The value in question |
Returns
Type | Description |
---|---|
bool | True, if the value should be serialized, otherwise False |