Class MemberDataAttribute
- Namespace
- Xunit
- Assembly
- xunit.v3.core.dll
Provides a data source for a data theory, with the data coming from one of the following sources:
- A public static property
- A public static field
- A public static method (with parameters)
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class MemberDataAttribute : MemberDataAttributeBase, IDataAttribute
- Inheritance
-
MemberDataAttribute
- Implements
- Inherited Members
Remarks
The member must return data in a form that is compatible, which means collections of object?[]
,
ITheoryDataRow
, or tuple values. Those collections may come via IEnumerable<T> or
IAsyncEnumerable<T>, and those collections may optionally be wrapped in either
Task<TResult> or ValueTask<TResult>.
Constructors
- MemberDataAttribute(string, params object?[])
Provides a data source for a data theory, with the data coming from one of the following sources:
- A public static property
- A public static field
- A public static method (with parameters)