Class GenericMethod
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Encapsulates a generic method, inferring the type parameters bases on invocation arguments.
public class GenericMethod : IMethodInheritance
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
GenericMethod(MethodInfo, IMethodFactory)
Initializes a new instance of the GenericMethod class.
public GenericMethod(MethodInfo method, IMethodFactory factory)Parameters
method MethodInfo
The method info.
factory IMethodFactory
The factory to create an IMethod from the MethodInfo
resolved by GenericMethod.
Properties
Factory
Gets information about the factory to create IMethod from
MethodInfo.
public IMethodFactory Factory { get; }Property Value
Method
Gets information about the method.
public MethodInfo Method { get; }Property Value
Parameters
Gets information about the parameters of the method.
public IEnumerable<ParameterInfo> Parameters { get; }Property Value
Methods
Invoke(IEnumerable<object>)
Invokes the method with the supplied parameters.
public object Invoke(IEnumerable<object> parameters)Parameters
parameters IEnumerable<object>
The parameters.
Returns
The result of the method call.