Class ConstructorMethod
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Encapsulates a constructor as a method.
public class ConstructorMethod : IMethod, IEquatable<ConstructorMethod>Inheritance
Implements
IMethod, IEquatable<ConstructorMethod>
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ConstructorMethod(ConstructorInfo)
Initializes a new instance of the ConstructorMethod class.
public ConstructorMethod(ConstructorInfo constructor)Parameters
constructor ConstructorInfo
The constructor.
Properties
Constructor
Gets the constructor.
public ConstructorInfo Constructor { get; }Property Value
Parameters
Gets information about the parameters of the method.
public IEnumerable<ParameterInfo> Parameters { get; }Property Value
Methods
Equals(object)
Determines whether the specified Object is equal to this instance.
public override bool Equals(object obj)Parameters
obj object
The Object to compare with this instance.
Returns
true if the specified Object is equal to this instance;
otherwise, false.
Equals(ConstructorMethod)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ConstructorMethod other)Parameters
other ConstructorMethod
An object to compare with this object.
Returns
true if the current object is equal to the other
parameter; otherwise, false.
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
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.