ReferenceResolver.GetReference(Object, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
若存在,則取得指定值的參考識別碼;否則將重新分配一個 ID。 這個方法會在寫入 CLR 物件之前被呼叫,這樣我們可以決定是寫 \$id 並列舉其其他屬性,還是 \$ref 然後進入下一個物件。
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
參數
- value
- Object
用來取得 ID 的 CLR 參考類型物件值。
- alreadyExists
- Boolean
當此方法回傳時,true若已有對值的參考;否則,。 false
傳回
指定物件的參考 ID。