Class GenericMethod
Encapsulates a generic method, inferring the type parameters bases on invocation arguments.
Inheritance
System.Object
GenericMethod
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public class GenericMethod : IMethod
Constructors
| Improve this Doc View SourceGenericMethod(MethodInfo, IMethodFactory)
Initializes a new instance of the GenericMethod class.
Declaration
public GenericMethod(MethodInfo method, IMethodFactory factory)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method info. |
IMethodFactory | factory | The factory to create an IMethod from the System.Reflection.MethodInfo resolved by GenericMethod. |
Properties
| Improve this Doc View SourceFactory
Gets information about the factory to create IMethod from System.Reflection.MethodInfo.
Declaration
public IMethodFactory Factory { get; }
Property Value
Type | Description |
---|---|
IMethodFactory |
Method
Gets information about the method.
Declaration
public MethodInfo Method { get; }
Property Value
Type | Description |
---|---|
System.Reflection.MethodInfo |
Parameters
Gets information about the parameters of the method.
Declaration
public IEnumerable<ParameterInfo> Parameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.ParameterInfo> |
Methods
| Improve this Doc View SourceInvoke(IEnumerable<Object>)
Invokes the method with the supplied parameters.
Declaration
public object Invoke(IEnumerable<object> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Object> | parameters | The parameters. |
Returns
Type | Description |
---|---|
System.Object | The result of the method call. |