TomlConverter Class
Definition
- Namespace
- Bodu.Text.Toml.Serialization
- Assembly
- Bodu.Text.Toml.dll
- Package
- Bodu.Text.Toml 1.0.0
- Source
- TomlConverter.cs
Serves as the non-generic base for every TOML converter. The hierarchy is closed to two extension points: TomlConverter<T>, which converts a single type, and TomlConverterFactory, which produces a converter for a family of types.
public abstract class TomlConverter
- Inheritance
-
TomlConverter
- Derived
- Inherited Members
- Extension Methods
Remarks
For a given type the serializer selects the converter named by a member-level converter attribute first, then a type-level converter attribute, then the first matching converter registered on the options, and finally the built-in converters. A converter factory in any of these positions is asked to create the concrete converter for the requested type.
The constructor is inaccessible outside this assembly, so external code extends the model through TomlConverter<T> or TomlConverterFactory rather than deriving from this type directly.
Methods
CanConvert(Type)
Determines whether the converter can convert the specified type.
public abstract bool CanConvert(Type typeToConvert)
Parameters
typeToConvertTypeThe type to test.
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |