Class JsonConverterFactoryExtensions
- Namespace
- Nerdbank.Json
- Assembly
- Nerdbank.Json.dll
Extension methods for converter factories.
public static class JsonConverterFactoryExtensions
- Inheritance
-
JsonConverterFactoryExtensions
- Inherited Members
Methods
Invoke<T>(T, ITypeShape, object?)
Invokes a factory with the generic type described by a shape.
public static JsonConverter? Invoke<T>(this T self, ITypeShape shape, object? state = null) where T : IJsonConverterFactory, ITypeShapeFunc
Parameters
selfTThe factory.
shapeITypeShapeThe type shape.
stateobjectOptional state passed to the factory.
Returns
- JsonConverter
The converter, or null when the factory does not apply.
Type Parameters
TThe factory type.