Skip to content

Commit

Permalink
MethodCall & MethodCallReturn classes are T4 autogenerated to support…
Browse files Browse the repository at this point in the history
… 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
Show file tree
Hide file tree
Showing 8 changed files with 628 additions and 469 deletions.
6 changes: 6 additions & 0 deletions Source.Silverlight/Moq.Silverlight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,18 @@
<Compile Include="..\Source\MethodCall.cs">
<Link>MethodCall.cs</Link>
</Compile>
<Compile Include="..\Source\MethodCall.Generated.cs">
<Link>MethodCall.Generated.cs</Link>
</Compile>
<Compile Include="..\Source\MethodCall.Legacy.cs">
<Link>MethodCall.Legacy.cs</Link>
</Compile>
<Compile Include="..\Source\MethodCallReturn.cs">
<Link>MethodCallReturn.cs</Link>
</Compile>
<Compile Include="..\Source\MethodCallReturn.Generated.cs">
<Link>MethodCallReturn.Generated.cs</Link>
</Compile>
<Compile Include="..\Source\Microsoft\Delegates.cs">
<Link>Microsoft\Delegates.cs</Link>
<AutoGen>True</AutoGen>
Expand Down
188 changes: 188 additions & 0 deletions Source/MethodCall.Generated.cs
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;
}
}
}
Loading

0 comments on commit 3d82ba9

Please sign in to comment.