JsonTypeInfoResolver.WithAddedModifier 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.
Creates a resolver and applies modifications to the metadata generated by the source resolver
.
public:
[System::Runtime::CompilerServices::Extension]
static System::Text::Json::Serialization::Metadata::IJsonTypeInfoResolver ^ WithAddedModifier(System::Text::Json::Serialization::Metadata::IJsonTypeInfoResolver ^ resolver, Action<System::Text::Json::Serialization::Metadata::JsonTypeInfo ^> ^ modifier);
public static System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver WithAddedModifier (this System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver resolver, Action<System.Text.Json.Serialization.Metadata.JsonTypeInfo> modifier);
static member WithAddedModifier : System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver * Action<System.Text.Json.Serialization.Metadata.JsonTypeInfo> -> System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver
<Extension()>
Public Function WithAddedModifier (resolver As IJsonTypeInfoResolver, modifier As Action(Of JsonTypeInfo)) As IJsonTypeInfoResolver
Parameters
- resolver
- IJsonTypeInfoResolver
The source resolver generating JsonTypeInfo metadata.
- modifier
- Action<JsonTypeInfo>
The delegate that modifies non-null
JsonTypeInfo results.
Returns
A new IJsonTypeInfoResolver instance with modifications applied.
Remarks
This method is closely related to the Modifiers property extended to arbitrary IJsonTypeInfoResolver instances.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.