site/xunit.analyzers/rules/xUnit1052.md
A violation of this rule occurs when creating a data source from TheoryData<...> which includes ITheoryDataRow (or any type which implements it).
ITheoryDataRule (and derived types, like TheoryDataRule<...>) are intended to be used directly from a collection, like IEnumerable<> or List<>.
To fix a violation of this rule, replace TheoryData with IEnumeable (or a standard generic collection).
using Xunit;
public class xUnit1052
{
public static TheoryData<TheoryDataRow<int>> Data => [/*...*/];
}
using System.Collections.Generic;
using Xunit;
public class xUnit1052
{
public static IEnumerable<TheoryDataRow<int>> Data => [/*...*/];
}