ReferenceResolver Class
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.
Defines how the JsonSerializer deals with references on serialization and deserialization. Defines the core behavior of preserving references on serialization and deserialization.
public ref class ReferenceResolver abstract
public abstract class ReferenceResolver
type ReferenceResolver = class
Public MustInherit Class ReferenceResolver
- Inheritance
-
ReferenceResolver
Constructors
ReferenceResolver() |
Initializes a new instance of the ReferenceResolver class. |
Methods
AddReference(String, Object) |
Adds an entry to the bag of references using the specified id and value. This method gets called when an $id metadata property from a JSON object is read. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetReference(Object, Boolean) |
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. |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ResolveReference(String) |
Returns the CLR reference type object related to the specified reference id. This method gets called when $ref metadata property is read. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈