C# Class Autodesk.Workspaces.IdReferenceResolver

The IdReferenceResolver class allows us to use the Guid of an object as the reference id during serialization.
Inheritance: IReferenceResolver
Show file Open project: DynamoDS/Dynamo Class Usage Examples

Public Methods

Method Description
AddReference ( object context, string reference, object value ) : void
AddToReferenceMap ( System.Guid oldGuid, object newObject ) : void

Add a reference to a newly created object, referencing an old Guid.

GetReference ( object context, object value ) : string
IsReferenced ( object context, object value ) : bool
ResolveReference ( object context, string reference ) : object
ResolveReferenceFromMap ( object context, string reference ) : object

Resolve a reference to a newly created object, given the original Guid for the object.

Private Methods

Method Description
GetGuidPropertyValue ( object value ) : System.Guid

Method Details

AddReference() public method

public AddReference ( object context, string reference, object value ) : void
context object
reference string
value object
return void

AddToReferenceMap() public method

Add a reference to a newly created object, referencing an old Guid.
public AddToReferenceMap ( System.Guid oldGuid, object newObject ) : void
oldGuid System.Guid The old Guid of the object.
newObject object The new object which maps to the old Guid.
return void

GetReference() public method

public GetReference ( object context, object value ) : string
context object
value object
return string

IsReferenced() public method

public IsReferenced ( object context, object value ) : bool
context object
value object
return bool

ResolveReference() public method

public ResolveReference ( object context, string reference ) : object
context object
reference string
return object

ResolveReferenceFromMap() public method

Resolve a reference to a newly created object, given the original Guid for the object.
public ResolveReferenceFromMap ( object context, string reference ) : object
context object
reference string
return object