BencodeConverter Class
Definition
- Namespace
- Bodu.Text.Bencode.Serialization
- Assembly
- Bodu.Text.Bencode.dll
- Package
- Bodu.Text.Bencode 1.0.0
- Source
- BencodeConverter.cs
Serves as the non-generic base for every Bencode converter. The hierarchy is closed to two extension points: BencodeConverter<T>, which converts a single type, and BencodeConverterFactory, which produces a converter for a family of types.
public abstract class BencodeConverter
- Inheritance
-
BencodeConverter
- 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 BencodeConverter<T> or BencodeConverterFactory 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 |