Class ConstructorMethod
Encapsulates a constructor as a method.
Inheritance
Inherited Members
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public class ConstructorMethod : IMethod, IEquatable<ConstructorMethod>
Constructors
| Improve this Doc View SourceConstructorMethod(ConstructorInfo)
Initializes a new instance of the ConstructorMethod class.
Declaration
public ConstructorMethod(ConstructorInfo constructor)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ConstructorInfo | constructor | The constructor. |
Properties
| Improve this Doc View SourceConstructor
Gets the constructor.
Declaration
public ConstructorInfo Constructor { get; }
Property Value
Type | Description |
---|---|
System.Reflection.ConstructorInfo |
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(ConstructorMethod)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ConstructorMethod other)
Parameters
Type | Name | Description |
---|---|---|
ConstructorMethod | 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 | true if the specified System.Object is equal to this instance; otherwise, false. |
Overrides
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. |