Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
5121 lines (5061 sloc) 285 KB
<?xml version="1.0"?>
<doc>
<assembly>
<name>Moq</name>
</assembly>
<members>
<member name="T:Moq.Language.ISetupConditionResult`1">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="M:Moq.Language.ISetupConditionResult`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
<summary>
The expectation will be considered only in the former condition.
</summary>
<param name="expression"></param>
<returns></returns>
</member>
<member name="M:Moq.Language.ISetupConditionResult`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
<summary>
The expectation will be considered only in the former condition.
</summary>
<typeparam name="TResult"></typeparam>
<param name="expression"></param>
<returns></returns>
</member>
<member name="M:Moq.Language.ISetupConditionResult`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
<summary>
Setups the get.
</summary>
<typeparam name="TProperty">The type of the property.</typeparam>
<param name="expression">The expression.</param>
<returns></returns>
</member>
<member name="M:Moq.Language.ISetupConditionResult`1.SetupSet``1(System.Action{`0})">
<summary>
Setups the set.
</summary>
<typeparam name="TProperty">The type of the property.</typeparam>
<param name="setterExpression">The setter expression.</param>
<returns></returns>
</member>
<member name="M:Moq.Language.ISetupConditionResult`1.SetupSet(System.Action{`0})">
<summary>
Setups the set.
</summary>
<param name="setterExpression">The setter expression.</param>
<returns></returns>
</member>
<member name="T:Moq.Language.ICallback">
<summary>
Defines the <c>Callback</c> verb and overloads.
</summary>
</member>
<member name="T:Moq.IHideObjectMembers">
<summary>
Helper interface used to hide the base <see cref="T:System.Object"/>
members from the fluent API to make it much cleaner
in Visual Studio intellisense.
</summary>
</member>
<member name="M:Moq.IHideObjectMembers.GetType">
<summary/>
</member>
<member name="M:Moq.IHideObjectMembers.GetHashCode">
<summary/>
</member>
<member name="M:Moq.IHideObjectMembers.ToString">
<summary/>
</member>
<member name="M:Moq.IHideObjectMembers.Equals(System.Object)">
<summary/>
</member>
<member name="M:Moq.Language.ICallback.Callback(System.Action)">
<summary>
Specifies a callback to invoke when the method is called.
</summary>
<param name="action">The callback method to invoke.</param>
<example>
The following example specifies a callback to set a boolean
value that can be used later:
<code>
var called = false;
mock.Setup(x => x.Execute())
.Callback(() => called = true);
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``1(System.Action{``0})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T">The argument type of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<example>
Invokes the given callback with the concrete invocation argument value.
<para>
Notice how the specific string argument is retrieved by simply declaring
it as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
.Callback((string command) => Console.WriteLine(command));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``2(System.Action{``0,``1})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2) =&gt; Console.WriteLine(arg1 + arg2));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``3(System.Action{``0,``1,``2})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``4(System.Action{``0,``1,``2,``3})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``5(System.Action{``0,``1,``2,``3,``4})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``15(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback.Callback``16(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
<typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16));
</code>
</example>
</member>
<member name="T:Moq.Language.ICallback`2">
<summary>
Defines the <c>Callback</c> verb and overloads for callbacks on
setups that return a value.
</summary>
<typeparam name="TMock">Mocked type.</typeparam>
<typeparam name="TResult">Type of the return value of the setup.</typeparam>
</member>
<member name="M:Moq.Language.ICallback`2.Callback(System.Action)">
<summary>
Specifies a callback to invoke when the method is called.
</summary>
<param name="action">The callback method to invoke.</param>
<example>
The following example specifies a callback to set a boolean value that can be used later:
<code>
var called = false;
mock.Setup(x => x.Execute())
.Callback(() => called = true)
.Returns(true);
</code>
Note that in the case of value-returning methods, after the <c>Callback</c>
call you can still specify the return value.
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``1(System.Action{``0})">
<summary>
Specifies a callback to invoke when the method is called that receives the original arguments.
</summary>
<typeparam name="T">The type of the argument of the invoked method.</typeparam>
<param name="action">Callback method to invoke.</param>
<example>
Invokes the given callback with the concrete invocation argument value.
<para>
Notice how the specific string argument is retrieved by simply declaring
it as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
.Callback(command => Console.WriteLine(command))
.Returns(true);
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``2(System.Action{``0,``1})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2) =&gt; Console.WriteLine(arg1 + arg2));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``3(System.Action{``0,``1,``2})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``4(System.Action{``0,``1,``2,``3})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``5(System.Action{``0,``1,``2,``3,``4})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``15(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15));
</code>
</example>
</member>
<member name="M:Moq.Language.ICallback`2.Callback``16(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15})">
<summary>
Specifies a callback to invoke when the method is called that receives the original
arguments.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
<typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
<param name="action">The callback method to invoke.</param>
<returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
<example>
Invokes the given callback with the concrete invocation arguments values.
<para>
Notice how the specific arguments are retrieved by simply declaring
them as part of the lambda expression for the callback:
</para>
<code>
mock.Setup(x =&gt; x.Execute(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;(),
It.IsAny&lt;string&gt;()))
.Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16));
</code>
</example>
</member>
<member name="T:Moq.Language.IRaise`1">
<summary>
Defines the <c>Raises</c> verb.
</summary>
</member>
<member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)">
<summary>
Specifies the event that will be raised
when the setup is met.
</summary>
<param name="eventExpression">An expression that represents an event attach or detach action.</param>
<param name="args">The event arguments to pass for the raised event.</param>
<example>
The following example shows how to raise an event when
the setup is met:
<code>
var mock = new Mock&lt;IContainer&gt;();
mock.Setup(add => add.Add(It.IsAny&lt;string&gt;(), It.IsAny&lt;object&gt;()))
.Raises(add => add.Added += null, EventArgs.Empty);
</code>
</example>
</member>
<member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Func{System.EventArgs})">
<summary>
Specifies the event that will be raised
when the setup is matched.
</summary>
<param name="eventExpression">An expression that represents an event attach or detach action.</param>
<param name="func">A function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Object[])">
<summary>
Specifies the custom event that will be raised
when the setup is matched.
</summary>
<param name="eventExpression">An expression that represents an event attach or detach action.</param>
<param name="args">The arguments to pass to the custom delegate (non EventHandler-compatible).</param>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``1(System.Action{`0},System.Func{``0,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``2(System.Action{`0},System.Func{``0,``1,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``3(System.Action{`0},System.Func{``0,``1,``2,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``4(System.Action{`0},System.Func{``0,``1,``2,``3,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``5(System.Action{`0},System.Func{``0,``1,``2,``3,``4,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``6(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``7(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``8(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``9(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``10(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``11(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``12(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
<typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``13(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
<typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
<typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``14(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
<typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
<typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
<typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``15(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
<typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
<typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
<typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
<typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="M:Moq.Language.IRaise`1.Raises``16(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15,System.EventArgs})">
<summary>
Specifies the event that will be raised when the setup is matched.
</summary>
<param name="eventExpression">The expression that represents an event attach or detach action.</param>
<param name="func">The function that will build the <see cref="T:System.EventArgs"/>
to pass when raising the event.</param>
<typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
<typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
<typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
<typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
<typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
<typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
<typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
<typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
<typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
<typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
<typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
<typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
<typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
<typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
<typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
<typeparam name="T16">The type of the sixteenth argument received by the expected invocation.</typeparam>
<seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
</member>
<member name="T:Moq.Language.IReturns`2">
<summary>
Defines the <c>Returns</c> verb.
</summary>
<typeparam name="TMock">Mocked type.</typeparam>
<typeparam name="TResult">Type of the return value from the expression.</typeparam>
</member>
<member name="M:Moq.Language.IReturns`2.Returns(`1)">
<summary>
Specifies the value to return.
</summary>
<param name="value">The value to return, or <see langword="null"/>.</param>
<example>
Return a <c>true</c> value from the method call:
<code>
mock.Setup(x => x.Execute("ping"))
.Returns(true);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns(System.Func{`1})">
<summary>
Specifies a function that will calculate the value to return from the method.
</summary>
<param name="valueFunction">The function that will calculate the return value.</param>
<example group="returns">
Return a calculated value when the method is called:
<code>
mock.Setup(x => x.Execute("ping"))
.Returns(() => returnValues[0]);
</code>
The lambda expression to retrieve the return value is lazy-executed,
meaning that its value may change depending on the moment the method
is executed and the value the <c>returnValues</c> array has at
that moment.
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``1(System.Func{``0,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T">The type of the argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<example group="returns">
Return a calculated value which is evaluated lazily at the time of the invocation.
<para>
The lookup list can change between invocations and the setup
will return different values accordingly. Also, notice how the specific
string argument is retrieved by simply declaring it as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
.Returns((string command) => returnValues[command]);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``2(System.Func{``0,``1,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2) => arg1 + arg2);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``3(System.Func{``0,``1,``2,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``4(System.Func{``0,``1,``2,``3,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``5(System.Func{``0,``1,``2,``3,``4,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``6(System.Func{``0,``1,``2,``3,``4,``5,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``7(System.Func{``0,``1,``2,``3,``4,``5,``6,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``8(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``9(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``10(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``11(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``12(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``13(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``14(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``15(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturns`2.Returns``16(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15,`1})">
<summary>
Specifies a function that will calculate the value to return from the method,
retrieving the arguments for the invocation.
</summary>
<typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
<typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
<typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
<typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
<typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
<typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
<typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
<typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
<typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
<typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
<typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
<typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
<typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
<typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
<typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
<typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
<param name="valueFunction">The function that will calculate the return value.</param>
<return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
<example>
<para>
The return value is calculated from the value of the actual method invocation arguments.
Notice how the arguments are retrieved by simply declaring them as part of the lambda
expression:
</para>
<code>
mock.Setup(x => x.Execute(
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;(),
It.IsAny&lt;int&gt;()))
.Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16);
</code>
</example>
</member>
<member name="T:Moq.Language.ISetupSequentialResult`1">
<summary>
Language for ReturnSequence
</summary>
</member>
<member name="M:Moq.Language.ISetupSequentialResult`1.Returns(`0)">
<summary>
Returns value
</summary>
</member>
<member name="M:Moq.Language.ISetupSequentialResult`1.Throws(System.Exception)">
<summary>
Throws an exception
</summary>
</member>
<member name="M:Moq.Language.ISetupSequentialResult`1.Throws``1">
<summary>
Throws an exception
</summary>
</member>
<member name="F:Moq.Linq.FluentMockVisitor.isFirst">
<summary>
The first method call or member access will be the
last segment of the expression (depth-first traversal),
which is the one we have to Setup rather than FluentMock.
And the last one is the one we have to Mock.Get rather
than FluentMock.
</summary>
</member>
<member name="T:Moq.Mock">
<summary>
Base class for mocks and static helper class with methods that
apply to mocked objects, such as <see cref="M:Moq.Mock.Get``1(``0)"/> to
retrieve a <see cref="T:Moq.Mock`1"/> from an object instance.
</summary>
</member>
<member name="M:Moq.Mock.Of``1">
<summary>
Creates an mock object of the indicated type.
</summary>
<typeparam name="T">The type of the mocked object.</typeparam>
<returns>The mocked object created.</returns>
</member>
<member name="M:Moq.Mock.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
<summary>
Creates an mock object of the indicated type.
</summary>
<param name="predicate">The predicate with the specification of how the mocked object should behave.</param>
<typeparam name="T">The type of the mocked object.</typeparam>
<returns>The mocked object created.</returns>
</member>
<member name="M:Moq.Mock.#ctor">
<summary>
Initializes a new instance of the <see cref="T:Moq.Mock"/> class.
</summary>
</member>
<member name="M:Moq.Mock.Get``1(``0)">
<summary>
Retrieves the mock object for the given object instance.
</summary><typeparam name="T">
Type of the mock to retrieve. Can be omitted as it's inferred
from the object instance passed in as the <paramref name="mocked"/> instance.
</typeparam><param name="mocked">The instance of the mocked object.</param><returns>The mock associated with the mocked object.</returns><exception cref="T:System.ArgumentException">
The received <paramref name="mocked"/> instance
was not created by Moq.
</exception><example group="advanced">
The following example shows how to add a new setup to an object
instance which is not the original <see cref="T:Moq.Mock`1"/> but rather
the object associated with it:
<code>
// Typed instance, not the mock, is retrieved from some test API.
HttpContextBase context = GetMockContext();
// context.Request is the typed object from the "real" API
// so in order to add a setup to it, we need to get
// the mock that "owns" it
Mock&lt;HttpRequestBase&gt; request = Mock.Get(context.Request);
mock.Setup(req =&gt; req.AppRelativeCurrentExecutionFilePath)
.Returns(tempUrl);
</code>
</example>
</member>
<member name="M:Moq.Mock.OnGetObject">
<summary>
Returns the mocked object value.
</summary>
</member>
<member name="M:Moq.Mock.Verify">
<summary>
Verifies that all verifiable expectations have been met.
</summary><example group="verification">
This example sets up an expectation and marks it as verifiable. After
the mock is used, a <c>Verify()</c> call is issued on the mock
to ensure the method in the setup was invoked:
<code>
var mock = new Mock&lt;IWarehouse&gt;();
this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Verifiable().Returns(true);
...
// other test code
...
// Will throw if the test code has didn't call HasInventory.
this.Verify();
</code>
</example><exception cref="T:Moq.MockException">Not all verifiable expectations were met.</exception>
</member>
<member name="M:Moq.Mock.VerifyAll">
<summary>
Verifies all expectations regardless of whether they have
been flagged as verifiable.
</summary><example group="verification">
This example sets up an expectation without marking it as verifiable. After
the mock is used, a <see cref="M:Moq.Mock.VerifyAll"/> call is issued on the mock
to ensure that all expectations are met:
<code>
var mock = new Mock&lt;IWarehouse&gt;();
this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
...
// other test code
...
// Will throw if the test code has didn't call HasInventory, even
// that expectation was not marked as verifiable.
this.VerifyAll();
</code>
</example><exception cref="T:Moq.MockException">At least one expectation was not met.</exception>
</member>
<member name="M:Moq.Mock.GetInterceptor(System.Linq.Expressions.Expression,Moq.Mock)">
<summary>
Gets the interceptor target for the given expression and root mock,
building the intermediate hierarchy of mock objects if necessary.
</summary>
</member>
<member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.EventArgs)">
<summary>
Raises the associated event with the given
event argument data.
</summary>
</member>
<member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.Object[])">
<summary>
Raises the associated event with the given
event argument data.
</summary>
</member>
<member name="M:Moq.Mock.As``1">
<summary>
Adds an interface implementation to the mock,
allowing setups to be specified for it.
</summary><remarks>
This method can only be called before the first use
of the mock <see cref="P:Moq.Mock.Object"/> property, at which
point the runtime type has already been generated
and no more interfaces can be added to it.
<para>
Also, <typeparamref name="TInterface"/> must be an
interface and not a class, which must be specified
when creating the mock instead.
</para>
</remarks><exception cref="T:System.InvalidOperationException">
The mock type
has already been generated by accessing the <see cref="P:Moq.Mock.Object"/> property.
</exception><exception cref="T:System.ArgumentException">
The <typeparamref name="TInterface"/> specified
is not an interface.
</exception><example>
The following example creates a mock for the main interface
and later adds <see cref="T:System.IDisposable"/> to it to verify
it's called by the consumer code:
<code>
var mock = new Mock&lt;IProcessor&gt;();
mock.Setup(x =&gt; x.Execute("ping"));
// add IDisposable interface
var disposable = mock.As&lt;IDisposable&gt;();
disposable.Setup(d =&gt; d.Dispose()).Verifiable();
</code>
</example><typeparam name="TInterface">Type of interface to cast the mock to.</typeparam>
</member>
<member name="M:Moq.Mock.SetReturnsDefault``1(``0)">
<!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for=&quot;Mock.SetReturnDefault{TReturn}&quot;]/*"/>
</member>
<member name="P:Moq.Mock.Behavior">
<summary>
Behavior of the mock, according to the value set in the constructor.
</summary>
</member>
<member name="P:Moq.Mock.CallBase">
<summary>
Whether the base member virtual implementation will be called
for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
</summary>
</member>
<member name="P:Moq.Mock.DefaultValue">
<summary>
Specifies the behavior to use when returning default values for
unexpected invocations on loose mocks.
</summary>
</member>
<member name="P:Moq.Mock.Object">
<summary>
Gets the mocked object instance.
</summary>
</member>
<member name="P:Moq.Mock.MockedType">
<summary>
Retrieves the type of the mocked object, its generic type argument.
This is used in the auto-mocking of hierarchy access.
</summary>
</member>
<member name="P:Moq.Mock.DefaultValueProvider">
<summary>
Specifies the class that will determine the default
value to return when invocations are made that
have no setups and need to return a default
value (for loose mocks).
</summary>
</member>
<member name="P:Moq.Mock.ImplementedInterfaces">
<summary>
Exposes the list of extra interfaces implemented by the mock.
</summary>
</member>
<member name="T:Moq.MockRepository">
<summary>
Utility repository class to use to construct multiple
mocks when consistent verification is
desired for all of them.
</summary>
<remarks>
If multiple mocks will be created during a test, passing
the desired <see cref="T:Moq.MockBehavior"/> (if different than the
<see cref="F:Moq.MockBehavior.Default"/> or the one
passed to the repository constructor) and later verifying each
mock can become repetitive and tedious.
<para>
This repository class helps in that scenario by providing a
simplified creation of multiple mocks with a default
<see cref="T:Moq.MockBehavior"/> (unless overriden by calling
<see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
</para>
</remarks>
<example group="repository">
The following is a straightforward example on how to
create and automatically verify strict mocks using a <see cref="T:Moq.MockRepository"/>:
<code>
var repository = new MockRepository(MockBehavior.Strict);
var foo = repository.Create&lt;IFoo&gt;();
var bar = repository.Create&lt;IBar&gt;();
// no need to call Verifiable() on the setup
// as we'll be validating all of them anyway.
foo.Setup(f =&gt; f.Do());
bar.Setup(b =&gt; b.Redo());
// exercise the mocks here
repository.VerifyAll();
// At this point all setups are already checked
// and an optional MockException might be thrown.
// Note also that because the mocks are strict, any invocation
// that doesn't have a matching setup will also throw a MockException.
</code>
The following examples shows how to setup the repository
to create loose mocks and later verify only verifiable setups:
<code>
var repository = new MockRepository(MockBehavior.Loose);
var foo = repository.Create&lt;IFoo&gt;();
var bar = repository.Create&lt;IBar&gt;();
// this setup will be verified when we verify the repository
foo.Setup(f =&gt; f.Do()).Verifiable();
// this setup will NOT be verified
foo.Setup(f =&gt; f.Calculate());
// this setup will be verified when we verify the repository
bar.Setup(b =&gt; b.Redo()).Verifiable();
// exercise the mocks here
// note that because the mocks are Loose, members
// called in the interfaces for which no matching
// setups exist will NOT throw exceptions,
// and will rather return default values.
repository.Verify();
// At this point verifiable setups are already checked
// and an optional MockException might be thrown.
</code>
The following examples shows how to setup the repository with a
default strict behavior, overriding that default for a
specific mock:
<code>
var repository = new MockRepository(MockBehavior.Strict);
// this particular one we want loose
var foo = repository.Create&lt;IFoo&gt;(MockBehavior.Loose);
var bar = repository.Create&lt;IBar&gt;();
// specify setups
// exercise the mocks here
repository.Verify();
</code>
</example>
<seealso cref="T:Moq.MockBehavior"/>
</member>
<member name="T:Moq.MockFactory">
<summary>
Utility factory class to use to construct multiple
mocks when consistent verification is
desired for all of them.
</summary>
<remarks>
If multiple mocks will be created during a test, passing
the desired <see cref="T:Moq.MockBehavior"/> (if different than the
<see cref="F:Moq.MockBehavior.Default"/> or the one
passed to the factory constructor) and later verifying each
mock can become repetitive and tedious.
<para>
This factory class helps in that scenario by providing a
simplified creation of multiple mocks with a default
<see cref="T:Moq.MockBehavior"/> (unless overriden by calling
<see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
</para>
</remarks>
<example group="factory">
The following is a straightforward example on how to
create and automatically verify strict mocks using a <see cref="T:Moq.MockFactory"/>:
<code>
var factory = new MockFactory(MockBehavior.Strict);
var foo = factory.Create&lt;IFoo&gt;();
var bar = factory.Create&lt;IBar&gt;();
// no need to call Verifiable() on the setup
// as we'll be validating all of them anyway.
foo.Setup(f =&gt; f.Do());
bar.Setup(b =&gt; b.Redo());
// exercise the mocks here
factory.VerifyAll();
// At this point all setups are already checked
// and an optional MockException might be thrown.
// Note also that because the mocks are strict, any invocation
// that doesn't have a matching setup will also throw a MockException.
</code>
The following examples shows how to setup the factory
to create loose mocks and later verify only verifiable setups:
<code>
var factory = new MockFactory(MockBehavior.Loose);
var foo = factory.Create&lt;IFoo&gt;();
var bar = factory.Create&lt;IBar&gt;();
// this setup will be verified when we verify the factory
foo.Setup(f =&gt; f.Do()).Verifiable();
// this setup will NOT be verified
foo.Setup(f =&gt; f.Calculate());
// this setup will be verified when we verify the factory
bar.Setup(b =&gt; b.Redo()).Verifiable();
// exercise the mocks here
// note that because the mocks are Loose, members
// called in the interfaces for which no matching
// setups exist will NOT throw exceptions,
// and will rather return default values.
factory.Verify();
// At this point verifiable setups are already checked
// and an optional MockException might be thrown.
</code>
The following examples shows how to setup the factory with a
default strict behavior, overriding that default for a
specific mock:
<code>
var factory = new MockFactory(MockBehavior.Strict);
// this particular one we want loose
var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
var bar = factory.Create&lt;IBar&gt;();
// specify setups
// exercise the mocks here
factory.Verify();
</code>
</example>
<seealso cref="T:Moq.MockBehavior"/>
</member>
<member name="M:Moq.MockFactory.#ctor(Moq.MockBehavior)">
<summary>
Initializes the factory with the given <paramref name="defaultBehavior"/>
for newly created mocks from the factory.
</summary>
<param name="defaultBehavior">The behavior to use for mocks created
using the <see cref="M:Moq.MockFactory.Create``1"/> factory method if not overriden
by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
</member>
<member name="M:Moq.MockFactory.Create``1">
<summary>
Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
specified at factory construction time.
</summary>
<typeparam name="T">Type to mock.</typeparam>
<returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
<example ignore="true">
<code>
var factory = new MockFactory(MockBehavior.Strict);
var foo = factory.Create&lt;IFoo&gt;();
// use mock on tests
factory.VerifyAll();
</code>
</example>
</member>
<member name="M:Moq.MockFactory.Create``1(System.Object[])">
<summary>
Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
specified at factory construction time and with the
the given constructor arguments for the class.
</summary>
<remarks>
The mock will try to find the best match constructor given the
constructor arguments, and invoke that to initialize the instance.
This applies only to classes, not interfaces.
</remarks>
<typeparam name="T">Type to mock.</typeparam>
<param name="args">Constructor arguments for mocked classes.</param>
<returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
<example ignore="true">
<code>
var factory = new MockFactory(MockBehavior.Default);
var mock = factory.Create&lt;MyBase&gt;("Foo", 25, true);
// use mock on tests
factory.Verify();
</code>
</example>
</member>
<member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior)">
<summary>
Creates a new mock with the given <paramref name="behavior"/>.
</summary>
<typeparam name="T">Type to mock.</typeparam>
<param name="behavior">Behavior to use for the mock, which overrides
the default behavior specified at factory construction time.</param>
<returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
<example group="factory">
The following example shows how to create a mock with a different
behavior to that specified as the default for the factory:
<code>
var factory = new MockFactory(MockBehavior.Strict);
var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
</code>
</example>
</member>
<member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior,System.Object[])">
<summary>
Creates a new mock with the given <paramref name="behavior"/>
and with the the given constructor arguments for the class.
</summary>
<remarks>
The mock will try to find the best match constructor given the
constructor arguments, and invoke that to initialize the instance.
This applies only to classes, not interfaces.
</remarks>
<typeparam name="T">Type to mock.</typeparam>
<param name="behavior">Behavior to use for the mock, which overrides
the default behavior specified at factory construction time.</param>
<param name="args">Constructor arguments for mocked classes.</param>
<returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
<example group="factory">
The following example shows how to create a mock with a different
behavior to that specified as the default for the factory, passing
constructor arguments:
<code>
var factory = new MockFactory(MockBehavior.Default);
var mock = factory.Create&lt;MyBase&gt;(MockBehavior.Strict, "Foo", 25, true);
</code>
</example>
</member>
<member name="M:Moq.MockFactory.CreateMock``1(Moq.MockBehavior,System.Object[])">
<summary>
Implements creation of a new mock within the factory.
</summary>
<typeparam name="T">Type to mock.</typeparam>
<param name="behavior">The behavior for the new mock.</param>
<param name="args">Optional arguments for the construction of the mock.</param>
</member>
<member name="M:Moq.MockFactory.Verify">
<summary>
Verifies all verifiable expectations on all mocks created
by this factory.
</summary>
<seealso cref="M:Moq.Mock.Verify"/>
<exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
</member>
<member name="M:Moq.MockFactory.VerifyAll">
<summary>
Verifies all verifiable expectations on all mocks created
by this factory.
</summary>
<seealso cref="M:Moq.Mock.Verify"/>
<exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
</member>
<member name="M:Moq.MockFactory.VerifyMocks(System.Action{Moq.Mock})">
<summary>
Invokes <paramref name="verifyAction"/> for each mock
in <see cref="P:Moq.MockFactory.Mocks"/>, and accumulates the resulting
<see cref="T:Moq.MockVerificationException"/> that might be
thrown from the action.
</summary>
<param name="verifyAction">The action to execute against
each mock.</param>
</member>
<member name="P:Moq.MockFactory.CallBase">
<summary>
Whether the base member virtual implementation will be called
for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
</summary>
</member>
<member name="P:Moq.MockFactory.DefaultValue">
<summary>
Specifies the behavior to use when returning default values for
unexpected invocations on loose mocks.
</summary>
</member>
<member name="P:Moq.MockFactory.Mocks">
<summary>
Gets the mocks that have been created by this factory and
that will get verified together.
</summary>
</member>
<member name="M:Moq.MockRepository.Of``1">
<summary>
Access the universe of mocks of the given type, to retrieve those
that behave according to the LINQ query specification.
</summary>
<typeparam name="T">The type of the mocked object to query.</typeparam>
</member>
<member name="M:Moq.MockRepository.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
<summary>
Access the universe of mocks of the given type, to retrieve those
that behave according to the LINQ query specification.
</summary>
<param name="specification">The predicate with the setup expressions.</param>
<typeparam name="T">The type of the mocked object to query.</typeparam>
</member>
<member name="M:Moq.MockRepository.OneOf``1">
<summary>
Creates an mock object of the indicated type.
</summary>
<typeparam name="T">The type of the mocked object.</typeparam>
<returns>The mocked object created.</returns>
</member>
<member name="M:Moq.MockRepository.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
<summary>
Creates an mock object of the indicated type.
</summary>
<param name="specification">The predicate with the setup expressions.</param>
<typeparam name="T">The type of the mocked object.</typeparam>
<returns>The mocked object created.</returns>
</member>
<member name="M:Moq.MockRepository.CreateMockQuery``1">
<summary>
Creates the mock query with the underlying queriable implementation.
</summary>
</member>
<member name="M:Moq.MockRepository.CreateQueryable``1">
<summary>
Wraps the enumerator inside a queryable.
</summary>
</member>
<member name="M:Moq.MockRepository.CreateMocks``1">
<summary>
Method that is turned into the actual call from .Query{T}, to
transform the queryable query into a normal enumerable query.
This method is never used directly by consumers.
</summary>
</member>
<member name="M:Moq.MockRepository.#ctor(Moq.MockBehavior)">
<summary>
Initializes the repository with the given <paramref name="defaultBehavior"/>
for newly created mocks from the repository.
</summary>
<param name="defaultBehavior">The behavior to use for mocks created
using the <see cref="M:Moq.MockFactory.Create``1"/> repository method if not overriden
by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
</member>
<member name="T:Moq.EmptyDefaultValueProvider">
<summary>
A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
for invocations that do not have setups or return values, with loose mocks.
This is the default behavior for a mock.
</summary>
</member>
<member name="T:Moq.IDefaultValueProvider">
<summary>
Interface to be implemented by classes that determine the
default value of non-expected invocations.
</summary>
</member>
<member name="M:Moq.IDefaultValueProvider.DefineDefault``1(``0)">
<summary>
Defines the default value to return in all the methods returning <typeparamref name="T"/>.
</summary><typeparam name="T">The type of the return value.</typeparam><param name="value">The value to set as default.</param>
</member>
<member name="M:Moq.IDefaultValueProvider.ProvideDefault(System.Reflection.MethodInfo)">
<summary>
Provides a value for the given member and arguments.
</summary><param name="member">
The member to provide a default value for.
</param>
</member>
<member name="T:Moq.ExpressionStringBuilder">
<summary>
The intention of <see cref="T:Moq.ExpressionStringBuilder"/> is to create a more readable
string representation for the failure message.
</summary>
</member>
<member name="T:Moq.Language.Flow.ICallbackResult">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.Language.IThrows">
<summary>
Defines the <c>Throws</c> verb.
</summary>
</member>
<member name="M:Moq.Language.IThrows.Throws(System.Exception)">
<summary>
Specifies the exception to throw when the method is invoked.
</summary>
<param name="exception">Exception instance to throw.</param>
<example>
This example shows how to throw an exception when the method is
invoked with an empty string argument:
<code>
mock.Setup(x =&gt; x.Execute(""))
.Throws(new ArgumentException());
</code>
</example>
</member>
<member name="M:Moq.Language.IThrows.Throws``1">
<summary>
Specifies the type of exception to throw when the method is invoked.
</summary>
<typeparam name="TException">Type of exception to instantiate and throw when the setup is matched.</typeparam>
<example>
This example shows how to throw an exception when the method is
invoked with an empty string argument:
<code>
mock.Setup(x =&gt; x.Execute(""))
.Throws&lt;ArgumentException&gt;();
</code>
</example>
</member>
<member name="T:Moq.Language.Flow.IThrowsResult">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.Language.IOccurrence">
<summary>
Defines occurrence members to constraint setups.
</summary>
</member>
<member name="M:Moq.Language.IOccurrence.AtMostOnce">
<summary>
The expected invocation can happen at most once.
</summary>
<example>
<code>
var mock = new Mock&lt;ICommand&gt;();
mock.Setup(foo => foo.Execute("ping"))
.AtMostOnce();
</code>
</example>
</member>
<member name="M:Moq.Language.IOccurrence.AtMost(System.Int32)">
<summary>
The expected invocation can happen at most specified number of times.
</summary>
<param name="callCount">The number of times to accept calls.</param>
<example>
<code>
var mock = new Mock&lt;ICommand&gt;();
mock.Setup(foo => foo.Execute("ping"))
.AtMost( 5 );
</code>
</example>
</member>
<member name="T:Moq.Language.IVerifies">
<summary>
Defines the <c>Verifiable</c> verb.
</summary>
</member>
<member name="M:Moq.Language.IVerifies.Verifiable">
<summary>
Marks the expectation as verifiable, meaning that a call
to <see cref="M:Moq.Mock.Verify"/> will check if this particular
expectation was met.
</summary>
<example>
The following example marks the expectation as verifiable:
<code>
mock.Expect(x =&gt; x.Execute("ping"))
.Returns(true)
.Verifiable();
</code>
</example>
</member>
<member name="M:Moq.Language.IVerifies.Verifiable(System.String)">
<summary>
Marks the expectation as verifiable, meaning that a call
to <see cref="M:Moq.Mock.Verify"/> will check if this particular
expectation was met, and specifies a message for failures.
</summary>
<example>
The following example marks the expectation as verifiable:
<code>
mock.Expect(x =&gt; x.Execute("ping"))
.Returns(true)
.Verifiable("Ping should be executed always!");
</code>
</example>
</member>
<member name="T:Moq.Language.Flow.ISetup`1">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.MethodCallReturn">
<devdoc>
We need this non-generics base class so that
we can use <see cref="P:Moq.MethodCallReturn.HasReturnValue"/> from
generic code.
</devdoc>
</member>
<member name="T:Moq.Language.Flow.ISetup`2">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.Language.Flow.IReturnsThrows`2">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.Language.Flow.ISetupGetter`2">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.Language.ICallbackGetter`2">
<summary>
Defines the <c>Callback</c> verb for property getter setups.
</summary>
<seealso cref="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"/>
<typeparam name="TMock">Mocked type.</typeparam>
<typeparam name="TProperty">Type of the property.</typeparam>
</member>
<member name="M:Moq.Language.ICallbackGetter`2.Callback(System.Action)">
<summary>
Specifies a callback to invoke when the property is retrieved.
</summary>
<param name="action">Callback method to invoke.</param>
<example>
Invokes the given callback with the property value being set.
<code>
mock.SetupGet(x => x.Suspended)
.Callback(() => called = true)
.Returns(true);
</code>
</example>
</member>
<member name="T:Moq.Language.Flow.IReturnsThrowsGetter`2">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.Language.IReturnsGetter`2">
<summary>
Defines the <c>Returns</c> verb for property get setups.
</summary>
<typeparam name="TMock">Mocked type.</typeparam>
<typeparam name="TProperty">Type of the property.</typeparam>
</member>
<member name="M:Moq.Language.IReturnsGetter`2.Returns(`1)">
<summary>
Specifies the value to return.
</summary>
<param name="value">The value to return, or <see langword="null"/>.</param>
<example>
Return a <c>true</c> value from the property getter call:
<code>
mock.SetupGet(x => x.Suspended)
.Returns(true);
</code>
</example>
</member>
<member name="M:Moq.Language.IReturnsGetter`2.Returns(System.Func{`1})">
<summary>
Specifies a function that will calculate the value to return for the property.
</summary>
<param name="valueFunction">The function that will calculate the return value.</param>
<example>
Return a calculated value when the property is retrieved:
<code>
mock.SetupGet(x => x.Suspended)
.Returns(() => returnValues[0]);
</code>
The lambda expression to retrieve the return value is lazy-executed,
meaning that its value may change depending on the moment the property
is retrieved and the value the <c>returnValues</c> array has at
that moment.
</example>
</member>
<member name="T:Moq.Language.Flow.IReturnsResult`1">
<summary>
Implements the fluent API.
</summary>
</member>
<member name="T:Moq.MockSequence">
<summary>
Helper class to setup a full trace between many mocks
</summary>
</member>
<member name="M:Moq.MockSequence.#ctor">
<summary>
Initialize a trace setup
</summary>
</member>
<member name="P:Moq.MockSequence.Cyclic">
<summary>
Allow sequence to be repeated
</summary>
</member>
<member name="T:Moq.MockSequenceHelper">
<summary>
define nice api
</summary>
</member>
<member name="M:Moq.MockSequenceHelper.InSequence``1(Moq.Mock{``0},Moq.MockSequence)">
<summary>
Perform an expectation in the trace.
</summary>
</member>
<member name="T:Moq.MatcherAttribute">
<summary>
Marks a method as a matcher, which allows complete replacement
of the built-in <see cref="T:Moq.It"/> class with your own argument
matching rules.
</summary>
<remarks>
<b>This feature has been deprecated in favor of the new
and simpler <see cref="T:Moq.Match`1"/>.
</b>
<para>
The argument matching is used to determine whether a concrete
invocation in the mock matches a given setup. This
matching mechanism is fully extensible.
</para>
<para>
There are two parts of a matcher: the compiler matcher
and the runtime matcher.
<list type="bullet">
<item>
<term>Compiler matcher</term>
<description>Used to satisfy the compiler requirements for the
argument. Needs to be a method optionally receiving any arguments
you might need for the matching, but with a return type that
matches that of the argument.
<para>
Let's say I want to match a lists of orders that contains
a particular one. I might create a compiler matcher like the following:
</para>
<code>
public static class Orders
{
[Matcher]
public static IEnumerable&lt;Order&gt; Contains(Order order)
{
return null;
}
}
</code>
Now we can invoke this static method instead of an argument in an
invocation:
<code>
var order = new Order { ... };
var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
.Throws&lt;ArgumentException&gt;();
</code>
Note that the return value from the compiler matcher is irrelevant.
This method will never be called, and is just used to satisfy the
compiler and to signal Moq that this is not a method that we want
to be invoked at runtime.
</description>
</item>
<item>
<term>Runtime matcher</term>
<description>
The runtime matcher is the one that will actually perform evaluation
when the test is run, and is defined by convention to have the
same signature as the compiler matcher, but where the return
value is the first argument to the call, which contains the
object received by the actual invocation at runtime:
<code>
public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
{
return orders.Contains(order);
}
</code>
At runtime, the mocked method will be invoked with a specific
list of orders. This value will be passed to this runtime
matcher as the first argument, while the second argument is the
one specified in the setup (<c>x.Save(Orders.Contains(order))</c>).
<para>
The boolean returned determines whether the given argument has been
matched. If all arguments to the expected method are matched, then
the setup matches and is evaluated.
</para>
</description>
</item>
</list>
</para>
Using this extensible infrastructure, you can easily replace the entire
<see cref="T:Moq.It"/> set of matchers with your own. You can also avoid the
typical (and annoying) lengthy expressions that result when you have
multiple arguments that use generics.
</remarks>
<example>
The following is the complete example explained above:
<code>
public static class Orders
{
[Matcher]
public static IEnumerable&lt;Order&gt; Contains(Order order)
{
return null;
}
public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
{
return orders.Contains(order);
}
}
</code>
And the concrete test using this matcher:
<code>
var order = new Order { ... };
var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
.Throws&lt;ArgumentException&gt;();
// use mock, invoke Save, and have the matcher filter.
</code>
</example>
</member>
<member name="T:Moq.Mock`1">
<summary>
Provides a mock implementation of <typeparamref name="T"/>.
</summary><remarks>
Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked.
<para>
The behavior of the mock with regards to the setups and the actual calls is determined
by the optional <see cref="T:Moq.MockBehavior"/> that can be passed to the <see cref="M:Moq.Mock`1.#ctor(Moq.MockBehavior)"/>
constructor.
</para>
</remarks><typeparam name="T">Type to mock, which can be an interface or a class.</typeparam><example group="overview" order="0">
The following example shows establishing setups with specific values
for method invocations:
<code>
// Arrange
var order = new Order(TALISKER, 50);
var mock = new Mock&lt;IWarehouse&gt;();
mock.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
// Act
order.Fill(mock.Object);
// Assert
Assert.True(order.IsFilled);
</code>
The following example shows how to use the <see cref="T:Moq.It"/> class
to specify conditions for arguments instead of specific values:
<code>
// Arrange
var order = new Order(TALISKER, 50);
var mock = new Mock&lt;IWarehouse&gt;();
// shows how to expect a value within a range
mock.Setup(x =&gt; x.HasInventory(
It.IsAny&lt;string&gt;(),
It.IsInRange(0, 100, Range.Inclusive)))
.Returns(false);
// shows how to throw for unexpected calls.
mock.Setup(x =&gt; x.Remove(
It.IsAny&lt;string&gt;(),
It.IsAny&lt;int&gt;()))
.Throws(new InvalidOperationException());