Table of Contents

Method AddSerializers

Namespace
Xunit.Sdk
Assembly
xunit.v3.common.dll

AddSerializers(IRegisterXunitSerializerAttribute[], List<string>?)

Add serializers to the supported serializer list.

protected void AddSerializers(IRegisterXunitSerializerAttribute[] registrations, List<string>? warnings = null)

Parameters

registrations

The serialization registrations

warnings List<string>

An optional collection to receive warnings generated during the registration

Remarks

The warnings collection will include warnings in the following circumstances:

  • When the serializer type that does not implement IXunitSerializer
  • When the registration contains no support types to serialize
  • When a supported type to serialize is duplicated with another serializer
  • When a supported type is covered by a built-in serializer
  • An exception is thrown while creating the serializer