Class StaticMethod
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Encapsulates a static method.
public class StaticMethod : IMethod, IEquatable<StaticMethod>Inheritance
Implements
IMethod, IEquatable<StaticMethod>
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
StaticMethod(MethodInfo)
Initializes a new instance of the StaticMethod class.
public StaticMethod(MethodInfo methodInfo)Parameters
methodInfo MethodInfo
The methodInfo.
StaticMethod(MethodInfo, ParameterInfo[])
Initializes a new instance of the StaticMethod class.
public StaticMethod(MethodInfo methodInfo, ParameterInfo[] methodParameters)Parameters
methodInfo MethodInfo
The method info.
methodParameters ParameterInfo[]
The method parameters.
Properties
Method
Gets 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
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.
Exceptions
The obj parameter is null.
Equals(StaticMethod)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(StaticMethod other)Parameters
other StaticMethod
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.