Class MemberDataSource

Namespace: AutoFixture.Xunit3.Internal
Assembly: AutoFixture.Xunit3.dll

Encapsulates access to a member that provides test data.

public class MemberDataSource : IDataSource

Inheritance

objectMemberDataSource

Implements

IDataSource

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

MemberDataSource(Type, string, params object[])

Creates an instance of type MemberDataSource.

public MemberDataSource(Type type, string name, params object[] arguments)

Parameters

type Type

The containing type of the member.

name string

The name of the member.

arguments object[]

The arguments provided to the member.

Exceptions

ArgumentNullException

Thrown when arguments are <see langref="null"></see>.

Properties

Arguments

Gets the arguments provided to the member.

public IReadOnlyList<object> Arguments { get; }

Property Value

IReadOnlyList<object>

Name

Gets the name of the member.

public string Name { get; }

Property Value

string

Source

Gets the test data source.

protected DataSource Source { get; }

Property Value

DataSource

Type

Gets the containing type of the member.

public Type Type { get; }

Property Value

Type

Methods

GetData(MethodInfo)

Returns the test data provided by the source.

public IEnumerable<object[]> GetData(MethodInfo method)

Parameters

method MethodInfo

The target method for which to provide the arguments.

Returns

IEnumerable<object[]>

Returns a sequence of argument collections.