ReferenceResolver.GetReference(Object, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the reference identifier of the specified value if exists; otherwise a new id is assigned. This method gets called before a CLR object is written so we can decide whether to write $id and enumerate the rest of its properties or $ref and step into the next object.
public:
abstract System::String ^ GetReference(System::Object ^ value, [Runtime::InteropServices::Out] bool % alreadyExists);
public abstract string GetReference (object value, out bool alreadyExists);
abstract member GetReference : obj * bool -> string
Public MustOverride Function GetReference (value As Object, ByRef alreadyExists As Boolean) As String
Parameters
- value
- Object
The value of the CLR reference type object to get an id for.
- alreadyExists
- Boolean
When this method returns, true
if a reference to value already exists; otherwise, false
.
Returns
The reference id for the specified object.
Applies to
.NET