Class InstanceMethodQuery
Selects a method from an instance.
Inheritance
System.Object
InstanceMethodQuery
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 InstanceMethodQuery : IMethodQuery
Constructors
| Improve this Doc View SourceInstanceMethodQuery(Object, String)
Constructs an instance of an InstanceMethodQuery, used to select a particular method from an instance.
Declaration
public InstanceMethodQuery(object owner, string methodName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | owner | The instance that should be selected from. |
System.String | methodName | The name of the method that should be selected. |
Properties
| Improve this Doc View SourceMethodName
Gets the name of the method that should be selected.
Declaration
public string MethodName { get; }
Property Value
Type | Description |
---|---|
System.String |
Owner
Gets the instance that should be selected from.
Declaration
public object Owner { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this Doc View SourceSelectMethods(Type)
Selects MethodName from Owner.
Declaration
public IEnumerable<IMethod> SelectMethods(Type type = null)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | Discarded. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMethod> | Returns an empty enumerable if MethodName does not belong to Owner; returns an enumerable containing a single InstanceMethod otherwise. |