XamlObjectWriter.Result 属性


获取写入的最后一个对象。Gets the last object that was written. 通常,仅在节点流位于结尾且对象关系图完整时才调用。Typically only called when the node stream is at its end and the object graph is complete.

 virtual property System::Object ^ Result { System::Object ^ get(); };
public virtual object Result { get; }
member this.Result : obj
Public Overridable ReadOnly Property Result As Object


写入的最后一个对象,或者为 nullThe last object written, or null.


Result 的最典型用法是仅当未知节点流时才调用此方法,并且对象图已经完成。The most typical usage of Result is to call it only when the node stream is known to be at its end, and the object graph is complete. 否则,对象图可能是不完整的,在大多数平台方案中都不适用。Otherwise, the object graph is likely to be incomplete, and is not useful for most platform scenarios.

Result 通常仅包含一个非 null 值(如果在调用 WriteEndObject之后立即调用此值),并且当前范围位于对象提供值的成员中。Result typically only contains a non-null value if it is called immediately after a call to WriteEndObject, and if the current scope is in the member where the object provides a value.