Interface IHumlTypeInfoResolver
- Namespace
- Huml.Net.Serialization
- Assembly
- Huml.Net.dll
Provides HumlTypeInfo instances for types encountered during HUML (de)serialisation. Implement this interface to supply pre-computed type metadata (e.g. from a source generator) instead of the default reflection path. Returning null from GetTypeInfo(Type, HumlOptions) causes the library to fall through to the built-in reflection path for that type.
public interface IHumlTypeInfoResolver
Methods
GetTypeInfo(Type, HumlOptions)
Returns type metadata for type, or null if this
resolver does not handle that type.
HumlTypeInfo? GetTypeInfo(Type type, HumlOptions options)
Parameters
typeTypeThe CLR type being serialised or deserialised.
optionsHumlOptionsThe active HumlOptions for the current operation.
Returns
- HumlTypeInfo
A HumlTypeInfo instance describing
type, or null to indicate that this resolver does not handle the type and the caller should use the built-in reflection path instead.