Class XunitSerializer<T>
- Namespace
- Xunit.Sdk
- Assembly
- xunit.v3.common.dll
A helper class that makes implementing IXunitSerializer more type-safe.
public abstract class XunitSerializer<T> : IXunitSerializer where T : notnull
Type Parameters
TThe type of the object being serialized
- Inheritance
-
XunitSerializer<T>
- Implements
- Inherited Members
Remarks
This class is only suitable for implementing a serializer bound to a single type, which must not be nullable (i.e., must be a struct or a non-nullable reference type).
Methods
- Deserialize(Type, string)
Deserializes a value that was obtained from Serialize(T).
- IsSerializable(T, out string?)
Determines if a specific value of data is serializable.
- Serialize(T)
Serializes a value into a string to be later deserialized with Deserialize(Type, string).
- TypeIncompatibleDeserialization(Type)
Gets an error message indicating type incompatbility, usable for Deserialize(Type, string).
- TypeIncompatibleSerialization(Type)
Gets an error message indicating type incompatbility, usable for IsSerializable(T, out string?) and Serialize(T).