Class TypeArgumentsCannotBeInferredException
The exception that is thrown when AutoFixture is unable to infer the type parameters of a generic method from its arguments.
Inheritance
Implements
Inherited Members
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
[Serializable]
public class TypeArgumentsCannotBeInferredException : Exception, _Exception, ISerializable
Constructors
| Improve this Doc View SourceTypeArgumentsCannotBeInferredException()
Initializes a new instance of the TypeArgumentsCannotBeInferredException class.
Declaration
public TypeArgumentsCannotBeInferredException()
TypeArgumentsCannotBeInferredException(MethodInfo)
Initializes a new instance of the TypeArgumentsCannotBeInferredException class from a System.Reflection.MethodInfo.
Declaration
public TypeArgumentsCannotBeInferredException(MethodInfo methodInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | methodInfo | The System.Reflection.MethodInfo that cannot have its type arguments inferred. |
TypeArgumentsCannotBeInferredException(SerializationInfo, StreamingContext)
Initializes a new instance of the TypeArgumentsCannotBeInferredException class with serialized data.
Declaration
protected TypeArgumentsCannotBeInferredException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The object that holds the serialized object data. |
System.Runtime.Serialization.StreamingContext | context | The contextual information about the source or destination. |
TypeArgumentsCannotBeInferredException(String)
Initializes a new instance of the TypeArgumentsCannotBeInferredException class with a custom System.Exception.Message.
Declaration
public TypeArgumentsCannotBeInferredException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
TypeArgumentsCannotBeInferredException(String, Exception)
Initializes a new instance of the TypeArgumentsCannotBeInferredException class with a custom System.Exception.Message and System.Exception.InnerException.
Declaration
public TypeArgumentsCannotBeInferredException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
System.Exception | innerException | The exception that is the cause of the current exception. |