-
-
Notifications
You must be signed in to change notification settings - Fork 810
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MethodCall & MethodCallReturn classes are T4 autogenerated to support…
… the default MS typed delegates (Action & Func). git-svn-id: http://moq.googlecode.com/svn/trunk@638 b33fba48-7441-0410-8d5c-f397f7ceaa6c
- Loading branch information
marianoor
committed
Nov 6, 2009
1 parent
40048d9
commit 3d82ba9
Showing
8 changed files
with
628 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
using System; | ||
using Moq.Language; | ||
using Moq.Language.Flow; | ||
|
||
namespace Moq | ||
{ | ||
internal partial class MethodCall<TMock> | ||
{ | ||
public IVerifies Raises<T>(Action<TMock> eventExpression, Func<T, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2>(Action<TMock> eventExpression, Func<T1, T2, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3>(Action<TMock> eventExpression, Func<T1, T2, T3, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
|
||
public IVerifies Raises<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Action<TMock> eventExpression, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, EventArgs> func) | ||
{ | ||
return RaisesImpl(eventExpression, func); | ||
} | ||
} | ||
|
||
internal partial class MethodCall | ||
{ | ||
public ICallbackResult Callback<T>(Action<T> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2>(Action<T1, T2> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3>(Action<T1, T2, T3> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4>(Action<T1, T2, T3, T4> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8>(Action<T1, T2, T3, T4, T5, T6, T7, T8> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
|
||
public ICallbackResult Callback<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> callback) | ||
{ | ||
this.SetCallbackWithArguments(callback); | ||
return this; | ||
} | ||
} | ||
} |
Oops, something went wrong.