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