C# Class Ploeh.AutoFixture.Kernel.FactoryMethodQuery

Selects public factory methods ordered by the modest first.
Inheritance: IMethodQuery
显示文件 Open project: AutoFixture/AutoFixture Class Usage Examples

Public Methods

Method Description
SelectMethods ( Type type ) : IEnumerable

Selects the public factory methods for the supplied type.

The ordering of the returned methods is based on the number of parameters of the method. Methods with fewer parameters are returned before methods with more parameters. This means that if a default parameterless factory methods exists, it will be the first one returned.

In case of two factory methods with an equal number of parameters, the ordering is unspecified.

Factory methods that contain parameters of the requested type are skipped in order to avoid circular references.

Method Details

SelectMethods() public method

Selects the public factory methods for the supplied type.

The ordering of the returned methods is based on the number of parameters of the method. Methods with fewer parameters are returned before methods with more parameters. This means that if a default parameterless factory methods exists, it will be the first one returned.

In case of two factory methods with an equal number of parameters, the ordering is unspecified.

Factory methods that contain parameters of the requested type are skipped in order to avoid circular references.

public SelectMethods ( Type type ) : IEnumerable
type System.Type The type.
return IEnumerable