Class XmiArtificialIdAttribute
Denotes an artificially introduced XMI Id attribute
Implements
Inherited Members
Namespace: NMF.Serialization.Xmi
Assembly: NMF.Serialization.dll
Syntax
public class XmiArtificialIdAttribute : IPropertySerializationInfo
Constructors
| Edit this page View SourceXmiArtificialIdAttribute()
Creates a new instance
Declaration
protected XmiArtificialIdAttribute()
Properties
| Edit this page View SourceElementName
The element name that should be serialized
Declaration
public string ElementName { get; }
Property Value
Type | Description |
---|---|
string |
IdentificationMode
Gets the identification mode of the property
Declaration
public XmlIdentificationMode IdentificationMode { get; }
Property Value
Type | Description |
---|---|
XmlIdentificationMode |
Instance
Denotes the default instance
Declaration
public static XmiArtificialIdAttribute Instance { get; }
Property Value
Type | Description |
---|---|
XmiArtificialIdAttribute |
IsIdentifier
True, if the property is an identifier, otherwise False
Declaration
public bool IsIdentifier { get; }
Property Value
Type | Description |
---|---|
bool |
IsReadOnly
True, if the property is read-only, otherwise False
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
IsStringConvertible
True, if the value of this property allows roundtrip-serialization to string
Declaration
public bool IsStringConvertible { get; }
Property Value
Type | Description |
---|---|
bool |
Namespace
The namespace to which the element should be serialized or null
Declaration
public string Namespace { get; }
Property Value
Type | Description |
---|---|
string |
NamespacePrefix
The namespace prefix that should be used for serialization or null
Declaration
public string NamespacePrefix { get; }
Property Value
Type | Description |
---|---|
string |
Opposite
Gets the opposite property or null
Declaration
public IPropertySerializationInfo Opposite { get; }
Property Value
Type | Description |
---|---|
IPropertySerializationInfo |
PropertyMinType
Gets the minimum type system type of the property
Declaration
public Type PropertyMinType { get; }
Property Value
Type | Description |
---|---|
Type |
RequiresInitialization
True, if the property requires initialization, otherwise False
Declaration
public bool RequiresInitialization { get; }
Property Value
Type | Description |
---|---|
bool |
ShallCreateInstance
Determines whether the instance should be created explicitly
Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public virtual 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 |