Editar

Partilhar via


ReferenceResolver.GetReference(Object, Boolean) Method

Definition

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