Mocker..::..AddType<(Of <(<'T>)>)> Method (Func<(Of <(<'Mocker, T>)>)>, Boolean, array<Object>[]()[][])

Adds an interface to Class mapping to the typeMap for easier resolution.

Namespace:  FastMoq
Assembly:  FastMoq.Core (in FastMoq.Core.dll)

Syntax


public void AddType<T>(
	Func<Mocker, T> createFunc,
	bool replace,
	params Object[] args
)
Public Sub AddType(Of T) ( _
	createFunc As Func(Of Mocker, T), _
	replace As Boolean, _
	ParamArray args As Object() _
)
public:
generic<typename T>
void AddType(
	Func<Mocker^, T>^ createFunc, 
	bool^ replace, 
	... array<Object^>^ args
)

Type Parameters

T

Parameters

createFunc
Type: Func<(Of <(<'Mocker, T>)>)>
An optional create function used to create the class.
replace
Type: Boolean
Replace type if already exists. Default: false.
args
Type: array<Object>[]()[][]
arguments needed in model.