Click or drag to resize

MFIdentiferToIDConverter Class

Converts an structure element reference value in a source JSON structure to an explicit ID in a target JSON structure. A ghost property will be added to the target JSON structure to preserve the original references used for the item. The ghost property will be named using the name of the property that contains the id value, followed by "-OriginalReferences". Typically the ghost properties can be converted back to references by the IDToMFIdentiferConverter. For example the source json: { ObjType: "ObjType1", Classes: [ "Class1", "Class2" ] } might get converted to a target like so: { objTypeID: 110, objTypeID-OriginalReferences: "ObjType1", classIDs: [ 2, 4 ], classIDs-OriginalReferences: [ "Class1", "Class2" ] }
Inheritance Hierarchy
SystemObject
  MFiles.VAF.Configuration.JsonMapping.ConvertersMFIdentiferToIDConverter

Namespace:  MFiles.VAF.Configuration.JsonMapping.Converters
Assembly:  MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 2.1.0.1 (2.1.0.1)
Syntax
C#
public class MFIdentiferToIDConverter : IJsonValueConverter

The MFIdentiferToIDConverter type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyResolver
Used to resolve id's from references.
Public propertyType
The type of structure element being IDed/Referenced.
Public propertyWriteIdAsString
Indicates whether we should write the id values as strings instead of integers.
Top
Methods
  NameDescription
Public methodConvertValue
Ensures that any non-numeric source values are resolved to an explicit id in the target value. Additionally a ghost value may be added to the target value's parent object to retain the original reference.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIdValue
Gets a JSON compatible value from the id.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInvert
Provides a reverse converter, for mapping values in the opposite direction.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also