Class StaticMethod
Encapsulates a static method.
Inheritance
Inherited Members
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public class StaticMethod : IMethod, IEquatable<StaticMethod>
Constructors
| Improve this Doc View SourceStaticMethod(MethodInfo)
Initializes a new instance of the StaticMethod class.
Declaration
public StaticMethod(MethodInfo methodInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | methodInfo | The methodInfo. |
StaticMethod(MethodInfo, ParameterInfo[])
Initializes a new instance of the StaticMethod class.
Declaration
public StaticMethod(MethodInfo methodInfo, ParameterInfo[] methodParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | methodInfo | The method info. |
System.Reflection.ParameterInfo[] | methodParameters | The method parameters. |
Properties
| Improve this Doc View SourceMethod
Gets 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 SourceEquals(StaticMethod)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(StaticMethod other)
Parameters
Type | Name | Description |
---|---|---|
StaticMethod | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Exceptions
Type | Condition |
---|---|
System.NullReferenceException | The |
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Invoke(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. |