Class ExplicitIdSerializer
Denotes a serializer that is able to read and understand all model URIs but serializes using XMI IDs
Implements
Inherited Members
Namespace: NMF.Models.Repository.Serialization
Assembly: NMF.Models.dll
Syntax
public class ExplicitIdSerializer : ModelSerializer, IModelSerializer
Constructors
| Edit this page View SourceExplicitIdSerializer()
Declaration
public ExplicitIdSerializer()
ExplicitIdSerializer(XmlSerializationSettings)
Declaration
public ExplicitIdSerializer(XmlSerializationSettings settings)
Parameters
Type | Name | Description |
---|---|---|
XmlSerializationSettings | settings |
ExplicitIdSerializer(XmlSerializationSettings, IEnumerable<Type>)
Declaration
public ExplicitIdSerializer(XmlSerializationSettings settings, IEnumerable<Type> knownTypes)
Parameters
Type | Name | Description |
---|---|---|
XmlSerializationSettings | settings | |
IEnumerable<Type> | knownTypes |
ExplicitIdSerializer(XmlSerializer)
Declaration
public ExplicitIdSerializer(XmlSerializer parent)
Parameters
Type | Name | Description |
---|---|---|
XmlSerializer | parent |
Properties
| Edit this page View SourceIdAttribute
Gets the attribute used for identifiers
Declaration
protected override IPropertySerializationInfo IdAttribute { get; }
Property Value
Type | Description |
---|---|
IPropertySerializationInfo |
Overrides
Methods
| Edit this page View SourceGetAttributeValue(object, ITypeSerializationInfo, bool, XmlSerializationContext)
Gets the serialization of the given attribute value
Declaration
protected override string GetAttributeValue(object value, ITypeSerializationInfo info, bool isCollection, XmlSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
object | value | The value of the attribute |
ITypeSerializationInfo | info | The serialization information of the type |
bool | isCollection | True, if the value is added to a collection, otherwise false |
XmlSerializationContext | context | The serialization context |
Returns
Type | Description |
---|---|
string | The serialized value of the attribute |
Overrides
| Edit this page View SourceWriteIdentifiedObject(XmlWriter, object, XmlIdentificationMode, ITypeSerializationInfo, XmlSerializationContext)
Writes the provided identified object
Declaration
protected override bool WriteIdentifiedObject(XmlWriter writer, object obj, XmlIdentificationMode identificationMode, ITypeSerializationInfo info, XmlSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlWriter | writer | The xml writer to write to |
object | obj | The element |
XmlIdentificationMode | identificationMode | The identification mode for the current object |
ITypeSerializationInfo | info | The serialization information of the objects type |
XmlSerializationContext | context | The serialization context |
Returns
Type | Description |
---|---|
bool | true, if the object could be written as identified object, otherwise false |