comparison SilverlightValidation/Libs/Moq.Silverlight.xml @ 107:572886951353

Working tests under StatLight
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 16:09:28 +0100
parents
children
comparison
equal deleted inserted replaced
106:62477c2e8837 107:572886951353
1 <?xml version="1.0"?>
2 <doc>
3 <assembly>
4 <name>Moq.Silverlight</name>
5 </assembly>
6 <members>
7 <member name="T:ThisAssembly">
8 <group name="overview" title="Overview" order="0" />
9 <group name="setups" title="Specifying setups" order="1" />
10 <group name="returns" title="Returning values from members" order="2" />
11 <group name="verification" title="Verifying setups" order="3" />
12 <group name="advanced" title="Advanced scenarios" order="99" />
13 <group name="factory" title="Using MockFactory for consistency across mocks" order="4" />
14 </member>
15 <member name="T:Moq.MockBehavior">
16 <summary>
17 Options to customize the behavior of the mock.
18 </summary>
19 </member>
20 <member name="F:Moq.MockBehavior.Strict">
21 <summary>
22 Causes the mock to always throw
23 an exception for invocations that don't have a
24 corresponding setup.
25 </summary>
26 </member>
27 <member name="F:Moq.MockBehavior.Loose">
28 <summary>
29 Will never throw exceptions, returning default
30 values when necessary (null for reference types,
31 zero for value types or empty enumerables and arrays).
32 </summary>
33 </member>
34 <member name="F:Moq.MockBehavior.Default">
35 <summary>
36 Default mock behavior, which equals <see cref="F:Moq.MockBehavior.Loose"/>.
37 </summary>
38 </member>
39 <member name="T:Moq.Mock`1">
40 <summary>
41 Provides a mock implementation of <typeparamref name="T"/>.
42 </summary><remarks>
43 Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked.
44 <para>
45 The behavior of the mock with regards to the setups and the actual calls is determined
46 by the optional <see cref="T:Moq.MockBehavior"/> that can be passed to the <see cref="M:Moq.Mock`1.#ctor(Moq.MockBehavior)"/>
47 constructor.
48 </para>
49 </remarks><typeparam name="T">Type to mock, which can be an interface or a class.</typeparam><example group="overview" order="0">
50 The following example shows establishing setups with specific values
51 for method invocations:
52 <code>
53 // Arrange
54 var order = new Order(TALISKER, 50);
55 var mock = new Mock&lt;IWarehouse&gt;();
56
57 mock.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
58
59 // Act
60 order.Fill(mock.Object);
61
62 // Assert
63 Assert.True(order.IsFilled);
64 </code>
65 The following example shows how to use the <see cref="T:Moq.It"/> class
66 to specify conditions for arguments instead of specific values:
67 <code>
68 // Arrange
69 var order = new Order(TALISKER, 50);
70 var mock = new Mock&lt;IWarehouse&gt;();
71
72 // shows how to expect a value within a range
73 mock.Setup(x =&gt; x.HasInventory(
74 It.IsAny&lt;string&gt;(),
75 It.IsInRange(0, 100, Range.Inclusive)))
76 .Returns(false);
77
78 // shows how to throw for unexpected calls.
79 mock.Setup(x =&gt; x.Remove(
80 It.IsAny&lt;string&gt;(),
81 It.IsAny&lt;int&gt;()))
82 .Throws(new InvalidOperationException());
83
84 // Act
85 order.Fill(mock.Object);
86
87 // Assert
88 Assert.False(order.IsFilled);
89 </code>
90 </example>
91 </member>
92 <member name="T:Moq.Mock">
93 <summary>
94 Base class for mocks and static helper class with methods that
95 apply to mocked objects, such as <see cref="M:Moq.Mock.Get``1(``0)"/> to
96 retrieve a <see cref="T:Moq.Mock`1"/> from an object instance.
97 </summary>
98 </member>
99 <member name="T:Moq.IHideObjectMembers">
100 <summary>
101 Helper interface used to hide the base <see cref="T:System.Object"/>
102 members from the fluent API to make it much cleaner
103 in Visual Studio intellisense.
104 </summary>
105 </member>
106 <member name="M:Moq.IHideObjectMembers.GetType">
107 <summary/>
108 </member>
109 <member name="M:Moq.IHideObjectMembers.GetHashCode">
110 <summary/>
111 </member>
112 <member name="M:Moq.IHideObjectMembers.ToString">
113 <summary/>
114 </member>
115 <member name="M:Moq.IHideObjectMembers.Equals(System.Object)">
116 <summary/>
117 </member>
118 <member name="M:Moq.Mock.#ctor">
119 <summary>
120 Initializes a new instance of the <see cref="T:Moq.Mock"/> class.
121 </summary>
122 </member>
123 <member name="M:Moq.Mock.Get``1(``0)">
124 <summary>
125 Retrieves the mock object for the given object instance.
126 </summary><typeparam name="T">
127 Type of the mock to retrieve. Can be omitted as it's inferred
128 from the object instance passed in as the <paramref name="mocked"/> instance.
129 </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">
130 The received <paramref name="mocked"/> instance
131 was not created by Moq.
132 </exception><example group="advanced">
133 The following example shows how to add a new setup to an object
134 instance which is not the original <see cref="T:Moq.Mock`1"/> but rather
135 the object associated with it:
136 <code>
137 // Typed instance, not the mock, is retrieved from some test API.
138 HttpContextBase context = GetMockContext();
139
140 // context.Request is the typed object from the "real" API
141 // so in order to add a setup to it, we need to get
142 // the mock that "owns" it
143 Mock&lt;HttpRequestBase&gt; request = Mock.Get(context.Request);
144 mock.Setup(req =&gt; req.AppRelativeCurrentExecutionFilePath)
145 .Returns(tempUrl);
146 </code>
147 </example>
148 </member>
149 <member name="M:Moq.Mock.OnGetObject">
150 <summary>
151 Returns the mocked object value.
152 </summary>
153 </member>
154 <member name="M:Moq.Mock.Verify">
155 <summary>
156 Verifies that all verifiable expectations have been met.
157 </summary><example group="verification">
158 This example sets up an expectation and marks it as verifiable. After
159 the mock is used, a <c>Verify()</c> call is issued on the mock
160 to ensure the method in the setup was invoked:
161 <code>
162 var mock = new Mock&lt;IWarehouse&gt;();
163 this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Verifiable().Returns(true);
164 ...
165 // other test code
166 ...
167 // Will throw if the test code has didn't call HasInventory.
168 this.Verify();
169 </code>
170 </example><exception cref="T:Moq.MockException">Not all verifiable expectations were met.</exception>
171 </member>
172 <member name="M:Moq.Mock.VerifyAll">
173 <summary>
174 Verifies all expectations regardless of whether they have
175 been flagged as verifiable.
176 </summary><example group="verification">
177 This example sets up an expectation without marking it as verifiable. After
178 the mock is used, a <see cref="M:Moq.Mock.VerifyAll"/> call is issued on the mock
179 to ensure that all expectations are met:
180 <code>
181 var mock = new Mock&lt;IWarehouse&gt;();
182 this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
183 ...
184 // other test code
185 ...
186 // Will throw if the test code has didn't call HasInventory, even
187 // that expectation was not marked as verifiable.
188 this.VerifyAll();
189 </code>
190 </example><exception cref="T:Moq.MockException">At least one expectation was not met.</exception>
191 </member>
192 <member name="M:Moq.Mock.GetInterceptor(System.Linq.Expressions.Expression,Moq.Mock)">
193 <summary>
194 Gets the interceptor target for the given expression and root mock,
195 building the intermediate hierarchy of mock objects if necessary.
196 </summary>
197 </member>
198 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.EventArgs)">
199 <summary>
200 Raises the associated event with the given
201 event argument data.
202 </summary>
203 </member>
204 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.Object[])">
205 <summary>
206 Raises the associated event with the given
207 event argument data.
208 </summary>
209 </member>
210 <member name="M:Moq.Mock.As``1">
211 <summary>
212 Adds an interface implementation to the mock,
213 allowing setups to be specified for it.
214 </summary><remarks>
215 This method can only be called before the first use
216 of the mock <see cref="P:Moq.Mock.Object"/> property, at which
217 point the runtime type has already been generated
218 and no more interfaces can be added to it.
219 <para>
220 Also, <typeparamref name="TInterface"/> must be an
221 interface and not a class, which must be specified
222 when creating the mock instead.
223 </para>
224 </remarks><exception cref="T:System.InvalidOperationException">
225 The mock type
226 has already been generated by accessing the <see cref="P:Moq.Mock.Object"/> property.
227 </exception><exception cref="T:System.ArgumentException">
228 The <typeparamref name="TInterface"/> specified
229 is not an interface.
230 </exception><example>
231 The following example creates a mock for the main interface
232 and later adds <see cref="T:System.IDisposable"/> to it to verify
233 it's called by the consumer code:
234 <code>
235 var mock = new Mock&lt;IProcessor&gt;();
236 mock.Setup(x =&gt; x.Execute("ping"));
237
238 // add IDisposable interface
239 var disposable = mock.As&lt;IDisposable&gt;();
240 disposable.Setup(d =&gt; d.Dispose()).Verifiable();
241 </code>
242 </example><typeparam name="TInterface">Type of interface to cast the mock to.</typeparam>
243 </member>
244 <member name="M:Moq.Mock.SetReturnsDefault``1(``0)">
245 <!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for=&quot;Mock.SetReturnDefault{TReturn}&quot;]/*"/>
246 </member>
247 <member name="M:Moq.Mock.Of``1">
248 <summary>
249 Creates an mock object of the indicated type.
250 </summary>
251 <typeparam name="T">The type of the mocked object.</typeparam>
252 <returns>The mocked object created.</returns>
253 </member>
254 <member name="M:Moq.Mock.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
255 <summary>
256 Creates an mock object of the indicated type.
257 </summary>
258 <param name="predicate">The predicate with the specification of how the mocked object should behave.</param>
259 <typeparam name="T">The type of the mocked object.</typeparam>
260 <returns>The mocked object created.</returns>
261 </member>
262 <member name="P:Moq.Mock.Behavior">
263 <summary>
264 Behavior of the mock, according to the value set in the constructor.
265 </summary>
266 </member>
267 <member name="P:Moq.Mock.CallBase">
268 <summary>
269 Whether the base member virtual implementation will be called
270 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
271 </summary>
272 </member>
273 <member name="P:Moq.Mock.DefaultValue">
274 <summary>
275 Specifies the behavior to use when returning default values for
276 unexpected invocations on loose mocks.
277 </summary>
278 </member>
279 <member name="P:Moq.Mock.Object">
280 <summary>
281 Gets the mocked object instance.
282 </summary>
283 </member>
284 <member name="P:Moq.Mock.MockedType">
285 <summary>
286 Retrieves the type of the mocked object, its generic type argument.
287 This is used in the auto-mocking of hierarchy access.
288 </summary>
289 </member>
290 <member name="P:Moq.Mock.DefaultValueProvider">
291 <summary>
292 Specifies the class that will determine the default
293 value to return when invocations are made that
294 have no setups and need to return a default
295 value (for loose mocks).
296 </summary>
297 </member>
298 <member name="P:Moq.Mock.ImplementedInterfaces">
299 <summary>
300 Exposes the list of extra interfaces implemented by the mock.
301 </summary>
302 </member>
303 <member name="M:Moq.Mock`1.#ctor(System.Boolean)">
304 <summary>
305 Ctor invoked by AsTInterface exclusively.
306 </summary>
307 </member>
308 <member name="M:Moq.Mock`1.#ctor">
309 <summary>
310 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see>.
311 </summary><example>
312 <code>var mock = new Mock&lt;IFormatProvider&gt;();</code>
313 </example>
314 </member>
315 <member name="M:Moq.Mock`1.#ctor(System.Object[])">
316 <summary>
317 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see> and with
318 the given constructor arguments for the class. (Only valid when <typeparamref name="T"/> is a class)
319 </summary><remarks>
320 The mock will try to find the best match constructor given the constructor arguments, and invoke that
321 to initialize the instance. This applies only for classes, not interfaces.
322 </remarks><example>
323 <code>var mock = new Mock&lt;MyProvider&gt;(someArgument, 25);</code>
324 </example><param name="args">Optional constructor arguments if the mocked type is a class.</param>
325 </member>
326 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior)">
327 <summary>
328 Initializes an instance of the mock with the specified <see cref="T:Moq.MockBehavior">behavior</see>.
329 </summary><example>
330 <code>var mock = new Mock&lt;IFormatProvider&gt;(MockBehavior.Relaxed);</code>
331 </example><param name="behavior">Behavior of the mock.</param>
332 </member>
333 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior,System.Object[])">
334 <summary>
335 Initializes an instance of the mock with a specific <see cref="T:Moq.MockBehavior">behavior</see> with
336 the given constructor arguments for the class.
337 </summary><remarks>
338 The mock will try to find the best match constructor given the constructor arguments, and invoke that
339 to initialize the instance. This applies only to classes, not interfaces.
340 </remarks><example>
341 <code>var mock = new Mock&lt;MyProvider&gt;(someArgument, 25);</code>
342 </example><param name="behavior">Behavior of the mock.</param><param name="args">Optional constructor arguments if the mocked type is a class.</param>
343 </member>
344 <member name="M:Moq.Mock`1.OnGetObject">
345 <summary>
346 Returns the mocked object value.
347 </summary>
348 </member>
349 <member name="M:Moq.Mock`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
350 <summary>
351 Specifies a setup on the mocked type for a call to
352 to a void method.
353 </summary><remarks>
354 If more than one setup is specified for the same method or property,
355 the latest one wins and is the one that will be executed.
356 </remarks><param name="expression">Lambda expression that specifies the expected method invocation.</param><example group="setups">
357 <code>
358 var mock = new Mock&lt;IProcessor&gt;();
359 mock.Setup(x =&gt; x.Execute("ping"));
360 </code>
361 </example>
362 </member>
363 <member name="M:Moq.Mock`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
364 <summary>
365 Specifies a setup on the mocked type for a call to
366 to a value returning method.
367 </summary><typeparam name="TResult">Type of the return value. Typically omitted as it can be inferred from the expression.</typeparam><remarks>
368 If more than one setup is specified for the same method or property,
369 the latest one wins and is the one that will be executed.
370 </remarks><param name="expression">Lambda expression that specifies the method invocation.</param><example group="setups">
371 <code>
372 mock.Setup(x =&gt; x.HasInventory("Talisker", 50)).Returns(true);
373 </code>
374 </example>
375 </member>
376 <member name="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
377 <summary>
378 Specifies a setup on the mocked type for a call to
379 to a property getter.
380 </summary><remarks>
381 If more than one setup is set for the same property getter,
382 the latest one wins and is the one that will be executed.
383 </remarks><typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam><param name="expression">Lambda expression that specifies the property getter.</param><example group="setups">
384 <code>
385 mock.SetupGet(x =&gt; x.Suspended)
386 .Returns(true);
387 </code>
388 </example>
389 </member>
390 <member name="M:Moq.Mock`1.SetupSet``1(System.Action{`0})">
391 <summary>
392 Specifies a setup on the mocked type for a call to
393 to a property setter.
394 </summary><remarks>
395 If more than one setup is set for the same property setter,
396 the latest one wins and is the one that will be executed.
397 <para>
398 This overloads allows the use of a callback already
399 typed for the property type.
400 </para>
401 </remarks><typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam><param name="setterExpression">The Lambda expression that sets a property to a value.</param><example group="setups">
402 <code>
403 mock.SetupSet(x =&gt; x.Suspended = true);
404 </code>
405 </example>
406 </member>
407 <member name="M:Moq.Mock`1.SetupSet(System.Action{`0})">
408 <summary>
409 Specifies a setup on the mocked type for a call to
410 to a property setter.
411 </summary><remarks>
412 If more than one setup is set for the same property setter,
413 the latest one wins and is the one that will be executed.
414 </remarks><param name="setterExpression">Lambda expression that sets a property to a value.</param><example group="setups">
415 <code>
416 mock.SetupSet(x =&gt; x.Suspended = true);
417 </code>
418 </example>
419 </member>
420 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
421 <summary>
422 Specifies that the given property should have "property behavior",
423 meaning that setting its value will cause it to be saved and
424 later returned when the property is requested. (this is also
425 known as "stubbing").
426 </summary><typeparam name="TProperty">
427 Type of the property, inferred from the property
428 expression (does not need to be specified).
429 </typeparam><param name="property">Property expression to stub.</param><example>
430 If you have an interface with an int property <c>Value</c>, you might
431 stub it using the following straightforward call:
432 <code>
433 var mock = new Mock&lt;IHaveValue&gt;();
434 mock.Stub(v =&gt; v.Value);
435 </code>
436 After the <c>Stub</c> call has been issued, setting and
437 retrieving the object value will behave as expected:
438 <code>
439 IHaveValue v = mock.Object;
440
441 v.Value = 5;
442 Assert.Equal(5, v.Value);
443 </code>
444 </example>
445 </member>
446 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)">
447 <summary>
448 Specifies that the given property should have "property behavior",
449 meaning that setting its value will cause it to be saved and
450 later returned when the property is requested. This overload
451 allows setting the initial value for the property. (this is also
452 known as "stubbing").
453 </summary><typeparam name="TProperty">
454 Type of the property, inferred from the property
455 expression (does not need to be specified).
456 </typeparam><param name="property">Property expression to stub.</param><param name="initialValue">Initial value for the property.</param><example>
457 If you have an interface with an int property <c>Value</c>, you might
458 stub it using the following straightforward call:
459 <code>
460 var mock = new Mock&lt;IHaveValue&gt;();
461 mock.SetupProperty(v =&gt; v.Value, 5);
462 </code>
463 After the <c>SetupProperty</c> call has been issued, setting and
464 retrieving the object value will behave as expected:
465 <code>
466 IHaveValue v = mock.Object;
467 // Initial value was stored
468 Assert.Equal(5, v.Value);
469
470 // New value set which changes the initial value
471 v.Value = 6;
472 Assert.Equal(6, v.Value);
473 </code>
474 </example>
475 </member>
476 <member name="M:Moq.Mock`1.SetupAllProperties">
477 <summary>
478 Specifies that the all properties on the mock should have "property behavior",
479 meaning that setting its value will cause it to be saved and
480 later returned when the property is requested. (this is also
481 known as "stubbing"). The default value for each property will be the
482 one generated as specified by the <see cref="P:Moq.Mock.DefaultValue"/> property for the mock.
483 </summary><remarks>
484 If the mock <see cref="P:Moq.Mock.DefaultValue"/> is set to <see cref="F:Moq.DefaultValue.Mock"/>,
485 the mocked default values will also get all properties setup recursively.
486 </remarks>
487 </member>
488 <member name="M:Moq.Mock`1.When(System.Func{System.Boolean})">
489 <!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for=&quot;Mock{T}.When&quot;]/*"/>
490 </member>
491 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}})">
492 <summary>
493 Verifies that a specific invocation matching the given expression was performed on the mock. Use
494 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
495 </summary><example group="verification">
496 This example assumes that the mock has been used, and later we want to verify that a given
497 invocation with specific parameters was performed:
498 <code>
499 var mock = new Mock&lt;IProcessor&gt;();
500 // exercise mock
501 //...
502 // Will throw if the test code didn't call Execute with a "ping" string argument.
503 mock.Verify(proc =&gt; proc.Execute("ping"));
504 </code>
505 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param>
506 </member>
507 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times)">
508 <summary>
509 Verifies that a specific invocation matching the given expression was performed on the mock. Use
510 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
511 </summary><exception cref="T:Moq.MockException">
512 The invocation was not call the times specified by
513 <paramref name="times"/>.
514 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param>
515 </member>
516 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},System.String)">
517 <summary>
518 Verifies that a specific invocation matching the given expression was performed on the mock,
519 specifying a failure error message. Use in conjuntion with the default
520 <see cref="F:Moq.MockBehavior.Loose"/>.
521 </summary><example group="verification">
522 This example assumes that the mock has been used, and later we want to verify that a given
523 invocation with specific parameters was performed:
524 <code>
525 var mock = new Mock&lt;IProcessor&gt;();
526 // exercise mock
527 //...
528 // Will throw if the test code didn't call Execute with a "ping" string argument.
529 mock.Verify(proc =&gt; proc.Execute("ping"));
530 </code>
531 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
532 </member>
533 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times,System.String)">
534 <summary>
535 Verifies that a specific invocation matching the given expression was performed on the mock,
536 specifying a failure error message. Use in conjuntion with the default
537 <see cref="F:Moq.MockBehavior.Loose"/>.
538 </summary><exception cref="T:Moq.MockException">
539 The invocation was not call the times specified by
540 <paramref name="times"/>.
541 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param>
542 </member>
543 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
544 <summary>
545 Verifies that a specific invocation matching the given expression was performed on the mock. Use
546 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
547 </summary><example group="verification">
548 This example assumes that the mock has been used, and later we want to verify that a given
549 invocation with specific parameters was performed:
550 <code>
551 var mock = new Mock&lt;IWarehouse&gt;();
552 // exercise mock
553 //...
554 // Will throw if the test code didn't call HasInventory.
555 mock.Verify(warehouse =&gt; warehouse.HasInventory(TALISKER, 50));
556 </code>
557 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
558 </member>
559 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times)">
560 <summary>
561 Verifies that a specific invocation matching the given
562 expression was performed on the mock. Use in conjuntion
563 with the default <see cref="F:Moq.MockBehavior.Loose"/>.
564 </summary><exception cref="T:Moq.MockException">
565 The invocation was not call the times specified by
566 <paramref name="times"/>.
567 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
568 </member>
569 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String)">
570 <summary>
571 Verifies that a specific invocation matching the given
572 expression was performed on the mock, specifying a failure
573 error message.
574 </summary><example group="verification">
575 This example assumes that the mock has been used,
576 and later we want to verify that a given invocation
577 with specific parameters was performed:
578 <code>
579 var mock = new Mock&lt;IWarehouse&gt;();
580 // exercise mock
581 //...
582 // Will throw if the test code didn't call HasInventory.
583 mock.Verify(warehouse =&gt; warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked");
584 </code>
585 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
586 </member>
587 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times,System.String)">
588 <summary>
589 Verifies that a specific invocation matching the given
590 expression was performed on the mock, specifying a failure
591 error message.
592 </summary><exception cref="T:Moq.MockException">
593 The invocation was not call the times specified by
594 <paramref name="times"/>.
595 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
596 </member>
597 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
598 <summary>
599 Verifies that a property was read on the mock.
600 </summary><example group="verification">
601 This example assumes that the mock has been used,
602 and later we want to verify that a given property
603 was retrieved from it:
604 <code>
605 var mock = new Mock&lt;IWarehouse&gt;();
606 // exercise mock
607 //...
608 // Will throw if the test code didn't retrieve the IsClosed property.
609 mock.VerifyGet(warehouse =&gt; warehouse.IsClosed);
610 </code>
611 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><typeparam name="TProperty">
612 Type of the property to verify. Typically omitted as it can
613 be inferred from the expression's return type.
614 </typeparam>
615 </member>
616 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times)">
617 <summary>
618 Verifies that a property was read on the mock.
619 </summary><exception cref="T:Moq.MockException">
620 The invocation was not call the times specified by
621 <paramref name="times"/>.
622 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><typeparam name="TProperty">
623 Type of the property to verify. Typically omitted as it can
624 be inferred from the expression's return type.
625 </typeparam>
626 </member>
627 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String)">
628 <summary>
629 Verifies that a property was read on the mock, specifying a failure
630 error message.
631 </summary><example group="verification">
632 This example assumes that the mock has been used,
633 and later we want to verify that a given property
634 was retrieved from it:
635 <code>
636 var mock = new Mock&lt;IWarehouse&gt;();
637 // exercise mock
638 //...
639 // Will throw if the test code didn't retrieve the IsClosed property.
640 mock.VerifyGet(warehouse =&gt; warehouse.IsClosed);
641 </code>
642 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty">
643 Type of the property to verify. Typically omitted as it can
644 be inferred from the expression's return type.
645 </typeparam>
646 </member>
647 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times,System.String)">
648 <summary>
649 Verifies that a property was read on the mock, specifying a failure
650 error message.
651 </summary><exception cref="T:Moq.MockException">
652 The invocation was not call the times specified by
653 <paramref name="times"/>.
654 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty">
655 Type of the property to verify. Typically omitted as it can
656 be inferred from the expression's return type.
657 </typeparam>
658 </member>
659 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0})">
660 <summary>
661 Verifies that a property was set on the mock.
662 </summary><example group="verification">
663 This example assumes that the mock has been used,
664 and later we want to verify that a given property
665 was set on it:
666 <code>
667 var mock = new Mock&lt;IWarehouse&gt;();
668 // exercise mock
669 //...
670 // Will throw if the test code didn't set the IsClosed property.
671 mock.VerifySet(warehouse =&gt; warehouse.IsClosed = true);
672 </code>
673 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="setterExpression">Expression to verify.</param>
674 </member>
675 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times)">
676 <summary>
677 Verifies that a property was set on the mock.
678 </summary><exception cref="T:Moq.MockException">
679 The invocation was not call the times specified by
680 <paramref name="times"/>.
681 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param>
682 </member>
683 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.String)">
684 <summary>
685 Verifies that a property was set on the mock, specifying
686 a failure message.
687 </summary><example group="verification">
688 This example assumes that the mock has been used,
689 and later we want to verify that a given property
690 was set on it:
691 <code>
692 var mock = new Mock&lt;IWarehouse&gt;();
693 // exercise mock
694 //...
695 // Will throw if the test code didn't set the IsClosed property.
696 mock.VerifySet(warehouse =&gt; warehouse.IsClosed = true, "Warehouse should always be closed after the action");
697 </code>
698 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
699 </member>
700 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times,System.String)">
701 <summary>
702 Verifies that a property was set on the mock, specifying
703 a failure message.
704 </summary><exception cref="T:Moq.MockException">
705 The invocation was not call the times specified by
706 <paramref name="times"/>.
707 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
708 </member>
709 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.EventArgs)">
710 <summary>
711 Raises the event referenced in <paramref name="eventExpression"/> using
712 the given <paramref name="args"/> argument.
713 </summary><exception cref="T:System.ArgumentException">
714 The <paramref name="args"/> argument is
715 invalid for the target event invocation, or the <paramref name="eventExpression"/> is
716 not an event attach or detach expression.
717 </exception><example>
718 The following example shows how to raise a <see cref="E:System.ComponentModel.INotifyPropertyChanged.PropertyChanged"/> event:
719 <code>
720 var mock = new Mock&lt;IViewModel&gt;();
721
722 mock.Raise(x =&gt; x.PropertyChanged -= null, new PropertyChangedEventArgs("Name"));
723 </code>
724 </example><example>
725 This example shows how to invoke an event with a custom event arguments
726 class in a view that will cause its corresponding presenter to
727 react by changing its state:
728 <code>
729 var mockView = new Mock&lt;IOrdersView&gt;();
730 var presenter = new OrdersPresenter(mockView.Object);
731
732 // Check that the presenter has no selection by default
733 Assert.Null(presenter.SelectedOrder);
734
735 // Raise the event with a specific arguments data
736 mockView.Raise(v =&gt; v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) });
737
738 // Now the presenter reacted to the event, and we have a selected order
739 Assert.NotNull(presenter.SelectedOrder);
740 Assert.Equal("moq", presenter.SelectedOrder.ProductName);
741 </code>
742 </example>
743 </member>
744 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.Object[])">
745 <summary>
746 Raises the event referenced in <paramref name="eventExpression"/> using
747 the given <paramref name="args"/> argument for a non-EventHandler typed event.
748 </summary><exception cref="T:System.ArgumentException">
749 The <paramref name="args"/> arguments are
750 invalid for the target event invocation, or the <paramref name="eventExpression"/> is
751 not an event attach or detach expression.
752 </exception><example>
753 The following example shows how to raise a custom event that does not adhere to
754 the standard <c>EventHandler</c>:
755 <code>
756 var mock = new Mock&lt;IViewModel&gt;();
757
758 mock.Raise(x =&gt; x.MyEvent -= null, "Name", bool, 25);
759 </code>
760 </example>
761 </member>
762 <member name="M:Moq.Mock`1.Expect(System.Linq.Expressions.Expression{System.Action{`0}})">
763 <summary>
764 Obsolete.
765 </summary>
766 </member>
767 <member name="M:Moq.Mock`1.Expect``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
768 <summary>
769 Obsolete.
770 </summary>
771 </member>
772 <member name="M:Moq.Mock`1.ExpectGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
773 <summary>
774 Obsolete.
775 </summary>
776 </member>
777 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
778 <summary>
779 Obsolete.
780 </summary>
781 </member>
782 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)">
783 <summary>
784 Obsolete.
785 </summary>
786 </member>
787 <member name="P:Moq.Mock`1.Object">
788 <summary>
789 Exposes the mocked object instance.
790 </summary>
791 </member>
792 <member name="T:Moq.Matchers.MatcherAttributeMatcher">
793 <summary>
794 Matcher to treat static functions as matchers.
795
796 mock.Setup(x => x.StringMethod(A.MagicString()));
797
798 public static class A
799 {
800 [Matcher]
801 public static string MagicString() { return null; }
802 public static bool MagicString(string arg)
803 {
804 return arg == "magic";
805 }
806 }
807
808 Will succeed if: mock.Object.StringMethod("magic");
809 and fail with any other call.
810 </summary>
811 </member>
812 <member name="T:Moq.Language.IRaise`1">
813 <summary>
814 Defines the <c>Raises</c> verb.
815 </summary>
816 </member>
817 <member name="M:Moq.Language.IRaise`1.Raises``1(System.Action{`0},System.Func{``0,System.EventArgs})">
818 <summary>
819 Specifies the event that will be raised when the setup is matched.
820 </summary>
821 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
822 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
823 to pass when raising the event.</param>
824 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
825 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
826 </member>
827 <member name="M:Moq.Language.IRaise`1.Raises``2(System.Action{`0},System.Func{``0,``1,System.EventArgs})">
828 <summary>
829 Specifies the event that will be raised when the setup is matched.
830 </summary>
831 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
832 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
833 to pass when raising the event.</param>
834 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
835 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
836 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
837 </member>
838 <member name="M:Moq.Language.IRaise`1.Raises``3(System.Action{`0},System.Func{``0,``1,``2,System.EventArgs})">
839 <summary>
840 Specifies the event that will be raised when the setup is matched.
841 </summary>
842 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
843 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
844 to pass when raising the event.</param>
845 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
846 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
847 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
848 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
849 </member>
850 <member name="M:Moq.Language.IRaise`1.Raises``4(System.Action{`0},System.Func{``0,``1,``2,``3,System.EventArgs})">
851 <summary>
852 Specifies the event that will be raised when the setup is matched.
853 </summary>
854 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
855 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
856 to pass when raising the event.</param>
857 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
858 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
859 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
860 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
861 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
862 </member>
863 <member name="M:Moq.Language.IRaise`1.Raises``5(System.Action{`0},System.Func{``0,``1,``2,``3,``4,System.EventArgs})">
864 <summary>
865 Specifies the event that will be raised when the setup is matched.
866 </summary>
867 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
868 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
869 to pass when raising the event.</param>
870 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
871 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
872 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
873 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
874 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
875 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
876 </member>
877 <member name="M:Moq.Language.IRaise`1.Raises``6(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,System.EventArgs})">
878 <summary>
879 Specifies the event that will be raised when the setup is matched.
880 </summary>
881 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
882 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
883 to pass when raising the event.</param>
884 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
885 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
886 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
887 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
888 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
889 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
890 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
891 </member>
892 <member name="M:Moq.Language.IRaise`1.Raises``7(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,System.EventArgs})">
893 <summary>
894 Specifies the event that will be raised when the setup is matched.
895 </summary>
896 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
897 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
898 to pass when raising the event.</param>
899 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
900 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
901 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
902 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
903 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
904 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
905 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
906 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
907 </member>
908 <member name="M:Moq.Language.IRaise`1.Raises``8(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,System.EventArgs})">
909 <summary>
910 Specifies the event that will be raised when the setup is matched.
911 </summary>
912 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
913 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
914 to pass when raising the event.</param>
915 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
916 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
917 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
918 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
919 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
920 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
921 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
922 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
923 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
924 </member>
925 <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})">
926 <summary>
927 Specifies the event that will be raised when the setup is matched.
928 </summary>
929 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
930 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
931 to pass when raising the event.</param>
932 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
933 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
934 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
935 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
936 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
937 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
938 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
939 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
940 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
941 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
942 </member>
943 <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})">
944 <summary>
945 Specifies the event that will be raised when the setup is matched.
946 </summary>
947 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
948 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
949 to pass when raising the event.</param>
950 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
951 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
952 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
953 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
954 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
955 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
956 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
957 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
958 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
959 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
960 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
961 </member>
962 <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})">
963 <summary>
964 Specifies the event that will be raised when the setup is matched.
965 </summary>
966 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
967 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
968 to pass when raising the event.</param>
969 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
970 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
971 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
972 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
973 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
974 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
975 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
976 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
977 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
978 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
979 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
980 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
981 </member>
982 <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})">
983 <summary>
984 Specifies the event that will be raised when the setup is matched.
985 </summary>
986 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
987 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
988 to pass when raising the event.</param>
989 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
990 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
991 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
992 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
993 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
994 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
995 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
996 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
997 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
998 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
999 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
1000 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
1001 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
1002 </member>
1003 <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})">
1004 <summary>
1005 Specifies the event that will be raised when the setup is matched.
1006 </summary>
1007 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
1008 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
1009 to pass when raising the event.</param>
1010 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
1011 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
1012 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
1013 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
1014 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
1015 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
1016 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
1017 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
1018 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
1019 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
1020 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
1021 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
1022 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
1023 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
1024 </member>
1025 <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})">
1026 <summary>
1027 Specifies the event that will be raised when the setup is matched.
1028 </summary>
1029 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
1030 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
1031 to pass when raising the event.</param>
1032 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
1033 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
1034 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
1035 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
1036 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
1037 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
1038 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
1039 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
1040 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
1041 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
1042 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
1043 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
1044 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
1045 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
1046 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
1047 </member>
1048 <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})">
1049 <summary>
1050 Specifies the event that will be raised when the setup is matched.
1051 </summary>
1052 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
1053 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
1054 to pass when raising the event.</param>
1055 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
1056 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
1057 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
1058 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
1059 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
1060 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
1061 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
1062 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
1063 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
1064 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
1065 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
1066 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
1067 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
1068 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
1069 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
1070 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
1071 </member>
1072 <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})">
1073 <summary>
1074 Specifies the event that will be raised when the setup is matched.
1075 </summary>
1076 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
1077 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
1078 to pass when raising the event.</param>
1079 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
1080 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
1081 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
1082 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
1083 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
1084 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
1085 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
1086 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
1087 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
1088 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
1089 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
1090 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
1091 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
1092 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
1093 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
1094 <typeparam name="T16">The type of the sixteenth argument received by the expected invocation.</typeparam>
1095 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
1096 </member>
1097 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)">
1098 <summary>
1099 Specifies the event that will be raised
1100 when the setup is met.
1101 </summary>
1102 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
1103 <param name="args">The event arguments to pass for the raised event.</param>
1104 <example>
1105 The following example shows how to raise an event when
1106 the setup is met:
1107 <code>
1108 var mock = new Mock&lt;IContainer&gt;();
1109
1110 mock.Setup(add => add.Add(It.IsAny&lt;string&gt;(), It.IsAny&lt;object&gt;()))
1111 .Raises(add => add.Added += null, EventArgs.Empty);
1112 </code>
1113 </example>
1114 </member>
1115 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Func{System.EventArgs})">
1116 <summary>
1117 Specifies the event that will be raised
1118 when the setup is matched.
1119 </summary>
1120 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
1121 <param name="func">A function that will build the <see cref="T:System.EventArgs"/>
1122 to pass when raising the event.</param>
1123 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
1124 </member>
1125 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Object[])">
1126 <summary>
1127 Specifies the custom event that will be raised
1128 when the setup is matched.
1129 </summary>
1130 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
1131 <param name="args">The arguments to pass to the custom delegate (non EventHandler-compatible).</param>
1132 </member>
1133 <member name="T:Moq.Evaluator">
1134 <summary>
1135 Provides partial evaluation of subtrees, whenever they can be evaluated locally.
1136 </summary>
1137 <author>Matt Warren: http://blogs.msdn.com/mattwar</author>
1138 <contributor>Documented by InSTEDD: http://www.instedd.org</contributor>
1139 </member>
1140 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression,System.Func{System.Linq.Expressions.Expression,System.Boolean})">
1141 <summary>
1142 Performs evaluation and replacement of independent sub-trees
1143 </summary>
1144 <param name="expression">The root of the expression tree.</param>
1145 <param name="fnCanBeEvaluated">A function that decides whether a given expression
1146 node can be part of the local function.</param>
1147 <returns>A new tree with sub-trees evaluated and replaced.</returns>
1148 </member>
1149 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression)">
1150 <summary>
1151 Performs evaluation and replacement of independent sub-trees
1152 </summary>
1153 <param name="expression">The root of the expression tree.</param>
1154 <returns>A new tree with sub-trees evaluated and replaced.</returns>
1155 </member>
1156 <member name="T:Moq.Evaluator.SubtreeEvaluator">
1157 <summary>
1158 Evaluates and replaces sub-trees when first candidate is reached (top-down)
1159 </summary>
1160 </member>
1161 <member name="T:Moq.Evaluator.Nominator">
1162 <summary>
1163 Performs bottom-up analysis to determine which nodes can possibly
1164 be part of an evaluated sub-tree.
1165 </summary>
1166 </member>
1167 <member name="T:Moq.Protected.IProtectedMock`1">
1168 <summary>
1169 Allows setups to be specified for protected members by using their
1170 name as a string, rather than strong-typing them which is not possible
1171 due to their visibility.
1172 </summary>
1173 </member>
1174 <member name="M:Moq.Protected.IProtectedMock`1.Setup(System.String,System.Object[])">
1175 <summary>
1176 Specifies a setup for a void method invocation with the given
1177 <paramref name="voidMethodName"/>, optionally specifying arguments for the method call.
1178 </summary>
1179 <param name="voidMethodName">The name of the void method to be invoked.</param>
1180 <param name="args">The optional arguments for the invocation. If argument matchers are used,
1181 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
1182 </member>
1183 <member name="M:Moq.Protected.IProtectedMock`1.Setup``1(System.String,System.Object[])">
1184 <summary>
1185 Specifies a setup for an invocation on a property or a non void method with the given
1186 <paramref name="methodOrPropertyName"/>, optionally specifying arguments for the method call.
1187 </summary>
1188 <param name="methodOrPropertyName">The name of the method or property to be invoked.</param>
1189 <param name="args">The optional arguments for the invocation. If argument matchers are used,
1190 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
1191 <typeparam name="TResult">The return type of the method or property.</typeparam>
1192 </member>
1193 <member name="M:Moq.Protected.IProtectedMock`1.SetupGet``1(System.String)">
1194 <summary>
1195 Specifies a setup for an invocation on a property getter with the given
1196 <paramref name="propertyName"/>.
1197 </summary>
1198 <param name="propertyName">The name of the property.</param>
1199 <typeparam name="TProperty">The type of the property.</typeparam>
1200 </member>
1201 <member name="M:Moq.Protected.IProtectedMock`1.SetupSet``1(System.String,System.Object)">
1202 <summary>
1203 Specifies a setup for an invocation on a property setter with the given
1204 <paramref name="propertyName"/>.
1205 </summary>
1206 <param name="propertyName">The name of the property.</param>
1207 <param name="value">The property value. If argument matchers are used,
1208 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
1209 <typeparam name="TProperty">The type of the property.</typeparam>
1210 </member>
1211 <member name="M:Moq.Protected.IProtectedMock`1.Verify(System.String,Moq.Times,System.Object[])">
1212 <summary>
1213 Specifies a verify for a void method with the given <paramref name="methodName"/>,
1214 optionally specifying arguments for the method call. Use in conjuntion with the default
1215 <see cref="F:Moq.MockBehavior.Loose"/>.
1216 </summary>
1217 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
1218 <paramref name="times"/>.</exception>
1219 <param name="methodName">The name of the void method to be verified.</param>
1220 <param name="times">The number of times a method is allowed to be called.</param>
1221 <param name="args">The optional arguments for the invocation. If argument matchers are used,
1222 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
1223 </member>
1224 <member name="M:Moq.Protected.IProtectedMock`1.Verify``1(System.String,Moq.Times,System.Object[])">
1225 <summary>
1226 Specifies a verify for an invocation on a property or a non void method with the given
1227 <paramref name="methodName"/>, optionally specifying arguments for the method call.
1228 </summary>
1229 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
1230 <paramref name="times"/>.</exception>
1231 <param name="methodName">The name of the method or property to be invoked.</param>
1232 <param name="args">The optional arguments for the invocation. If argument matchers are used,
1233 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
1234 <param name="times">The number of times a method is allowed to be called.</param>
1235 <typeparam name="TResult">The type of return value from the expression.</typeparam>
1236 </member>
1237 <member name="M:Moq.Protected.IProtectedMock`1.VerifyGet``1(System.String,Moq.Times)">
1238 <summary>
1239 Specifies a verify for an invocation on a property getter with the given
1240 <paramref name="propertyName"/>.
1241 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
1242 <paramref name="times"/>.</exception>
1243 </summary>
1244 <param name="propertyName">The name of the property.</param>
1245 <param name="times">The number of times a method is allowed to be called.</param>
1246 <typeparam name="TProperty">The type of the property.</typeparam>
1247 </member>
1248 <member name="M:Moq.Protected.IProtectedMock`1.VerifySet``1(System.String,Moq.Times,System.Object)">
1249 <summary>
1250 Specifies a setup for an invocation on a property setter with the given
1251 <paramref name="propertyName"/>.
1252 </summary>
1253 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
1254 <paramref name="times"/>.</exception>
1255 <param name="propertyName">The name of the property.</param>
1256 <param name="times">The number of times a method is allowed to be called.</param>
1257 <param name="value">The property value.</param>
1258 <typeparam name="TProperty">The type of the property. If argument matchers are used,
1259 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</typeparam>
1260 </member>
1261 <member name="T:Moq.MatcherAttribute">
1262 <summary>
1263 Marks a method as a matcher, which allows complete replacement
1264 of the built-in <see cref="T:Moq.It"/> class with your own argument
1265 matching rules.
1266 </summary>
1267 <remarks>
1268 <b>This feature has been deprecated in favor of the new
1269 and simpler <see cref="T:Moq.Match`1"/>.
1270 </b>
1271 <para>
1272 The argument matching is used to determine whether a concrete
1273 invocation in the mock matches a given setup. This
1274 matching mechanism is fully extensible.
1275 </para>
1276 <para>
1277 There are two parts of a matcher: the compiler matcher
1278 and the runtime matcher.
1279 <list type="bullet">
1280 <item>
1281 <term>Compiler matcher</term>
1282 <description>Used to satisfy the compiler requirements for the
1283 argument. Needs to be a method optionally receiving any arguments
1284 you might need for the matching, but with a return type that
1285 matches that of the argument.
1286 <para>
1287 Let's say I want to match a lists of orders that contains
1288 a particular one. I might create a compiler matcher like the following:
1289 </para>
1290 <code>
1291 public static class Orders
1292 {
1293 [Matcher]
1294 public static IEnumerable&lt;Order&gt; Contains(Order order)
1295 {
1296 return null;
1297 }
1298 }
1299 </code>
1300 Now we can invoke this static method instead of an argument in an
1301 invocation:
1302 <code>
1303 var order = new Order { ... };
1304 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
1305
1306 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
1307 .Throws&lt;ArgumentException&gt;();
1308 </code>
1309 Note that the return value from the compiler matcher is irrelevant.
1310 This method will never be called, and is just used to satisfy the
1311 compiler and to signal Moq that this is not a method that we want
1312 to be invoked at runtime.
1313 </description>
1314 </item>
1315 <item>
1316 <term>Runtime matcher</term>
1317 <description>
1318 The runtime matcher is the one that will actually perform evaluation
1319 when the test is run, and is defined by convention to have the
1320 same signature as the compiler matcher, but where the return
1321 value is the first argument to the call, which contains the
1322 object received by the actual invocation at runtime:
1323 <code>
1324 public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
1325 {
1326 return orders.Contains(order);
1327 }
1328 </code>
1329 At runtime, the mocked method will be invoked with a specific
1330 list of orders. This value will be passed to this runtime
1331 matcher as the first argument, while the second argument is the
1332 one specified in the setup (<c>x.Save(Orders.Contains(order))</c>).
1333 <para>
1334 The boolean returned determines whether the given argument has been
1335 matched. If all arguments to the expected method are matched, then
1336 the setup matches and is evaluated.
1337 </para>
1338 </description>
1339 </item>
1340 </list>
1341 </para>
1342 Using this extensible infrastructure, you can easily replace the entire
1343 <see cref="T:Moq.It"/> set of matchers with your own. You can also avoid the
1344 typical (and annoying) lengthy expressions that result when you have
1345 multiple arguments that use generics.
1346 </remarks>
1347 <example>
1348 The following is the complete example explained above:
1349 <code>
1350 public static class Orders
1351 {
1352 [Matcher]
1353 public static IEnumerable&lt;Order&gt; Contains(Order order)
1354 {
1355 return null;
1356 }
1357
1358 public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
1359 {
1360 return orders.Contains(order);
1361 }
1362 }
1363 </code>
1364 And the concrete test using this matcher:
1365 <code>
1366 var order = new Order { ... };
1367 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
1368
1369 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
1370 .Throws&lt;ArgumentException&gt;();
1371
1372 // use mock, invoke Save, and have the matcher filter.
1373 </code>
1374 </example>
1375 </member>
1376 <member name="T:Moq.Language.ICallbackGetter`2">
1377 <summary>
1378 Defines the <c>Callback</c> verb for property getter setups.
1379 </summary>
1380 <seealso cref="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"/>
1381 <typeparam name="TMock">Mocked type.</typeparam>
1382 <typeparam name="TProperty">Type of the property.</typeparam>
1383 </member>
1384 <member name="M:Moq.Language.ICallbackGetter`2.Callback(System.Action)">
1385 <summary>
1386 Specifies a callback to invoke when the property is retrieved.
1387 </summary>
1388 <param name="action">Callback method to invoke.</param>
1389 <example>
1390 Invokes the given callback with the property value being set.
1391 <code>
1392 mock.SetupGet(x => x.Suspended)
1393 .Callback(() => called = true)
1394 .Returns(true);
1395 </code>
1396 </example>
1397 </member>
1398 <member name="T:Moq.It">
1399 <summary>
1400 Allows the specification of a matching condition for an
1401 argument in a method invocation, rather than a specific
1402 argument value. "It" refers to the argument being matched.
1403 </summary><remarks>
1404 This class allows the setup to match a method invocation
1405 with an arbitrary value, with a value in a specified range, or
1406 even one that matches a given predicate.
1407 </remarks>
1408 </member>
1409 <member name="M:Moq.It.IsAny``1">
1410 <summary>
1411 Matches any value of the given <typeparamref name="TValue"/> type.
1412 </summary><remarks>
1413 Typically used when the actual argument value for a method
1414 call is not relevant.
1415 </remarks><example>
1416 <code>
1417 // Throws an exception for a call to Remove with any string value.
1418 mock.Setup(x =&gt; x.Remove(It.IsAny&lt;string&gt;())).Throws(new InvalidOperationException());
1419 </code>
1420 </example><typeparam name="TValue">Type of the value.</typeparam>
1421 </member>
1422 <member name="M:Moq.It.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
1423 <summary>
1424 Matches any value that satisfies the given predicate.
1425 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="match">The predicate used to match the method argument.</param><remarks>
1426 Allows the specification of a predicate to perform matching
1427 of method call arguments.
1428 </remarks><example>
1429 This example shows how to return the value <c>1</c> whenever the argument to the
1430 <c>Do</c> method is an even number.
1431 <code>
1432 mock.Setup(x =&gt; x.Do(It.Is&lt;int&gt;(i =&gt; i % 2 == 0)))
1433 .Returns(1);
1434 </code>
1435 This example shows how to throw an exception if the argument to the
1436 method is a negative number:
1437 <code>
1438 mock.Setup(x =&gt; x.GetUser(It.Is&lt;int&gt;(i =&gt; i &lt; 0)))
1439 .Throws(new ArgumentException());
1440 </code>
1441 </example>
1442 </member>
1443 <member name="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)">
1444 <summary>
1445 Matches any value that is in the range specified.
1446 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="from">The lower bound of the range.</param><param name="to">The upper bound of the range.</param><param name="rangeKind">
1447 The kind of range. See <see cref="T:Moq.Range"/>.
1448 </param><example>
1449 The following example shows how to expect a method call
1450 with an integer argument within the 0..100 range.
1451 <code>
1452 mock.Setup(x =&gt; x.HasInventory(
1453 It.IsAny&lt;string&gt;(),
1454 It.IsInRange(0, 100, Range.Inclusive)))
1455 .Returns(false);
1456 </code>
1457 </example>
1458 </member>
1459 <member name="M:Moq.It.IsRegex(System.String)">
1460 <summary>
1461 Matches a string argument if it matches the given regular expression pattern.
1462 </summary><param name="regex">The pattern to use to match the string argument value.</param><example>
1463 The following example shows how to expect a call to a method where the
1464 string argument matches the given regular expression:
1465 <code>
1466 mock.Setup(x =&gt; x.Check(It.IsRegex("[a-z]+"))).Returns(1);
1467 </code>
1468 </example>
1469 </member>
1470 <member name="M:Moq.It.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)">
1471 <summary>
1472 Matches a string argument if it matches the given regular expression pattern.
1473 </summary><param name="regex">The pattern to use to match the string argument value.</param><param name="options">The options used to interpret the pattern.</param><example>
1474 The following example shows how to expect a call to a method where the
1475 string argument matches the given regular expression, in a case insensitive way:
1476 <code>
1477 mock.Setup(x =&gt; x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1);
1478 </code>
1479 </example>
1480 </member>
1481 <member name="T:Moq.MethodCallReturn">
1482 <devdoc>
1483 We need this non-generics base class so that
1484 we can use <see cref="P:Moq.MethodCallReturn.HasReturnValue"/> from
1485 generic code.
1486 </devdoc>
1487 </member>
1488 <member name="T:Moq.Language.Flow.ICallbackResult">
1489 <summary>
1490 Implements the fluent API.
1491 </summary>
1492 </member>
1493 <member name="T:Moq.Language.IThrows">
1494 <summary>
1495 Defines the <c>Throws</c> verb.
1496 </summary>
1497 </member>
1498 <member name="M:Moq.Language.IThrows.Throws(System.Exception)">
1499 <summary>
1500 Specifies the exception to throw when the method is invoked.
1501 </summary>
1502 <param name="exception">Exception instance to throw.</param>
1503 <example>
1504 This example shows how to throw an exception when the method is
1505 invoked with an empty string argument:
1506 <code>
1507 mock.Setup(x =&gt; x.Execute(""))
1508 .Throws(new ArgumentException());
1509 </code>
1510 </example>
1511 </member>
1512 <member name="M:Moq.Language.IThrows.Throws``1">
1513 <summary>
1514 Specifies the type of exception to throw when the method is invoked.
1515 </summary>
1516 <typeparam name="TException">Type of exception to instantiate and throw when the setup is matched.</typeparam>
1517 <example>
1518 This example shows how to throw an exception when the method is
1519 invoked with an empty string argument:
1520 <code>
1521 mock.Setup(x =&gt; x.Execute(""))
1522 .Throws&lt;ArgumentException&gt;();
1523 </code>
1524 </example>
1525 </member>
1526 <member name="T:Moq.Language.Flow.IThrowsResult">
1527 <summary>
1528 Implements the fluent API.
1529 </summary>
1530 </member>
1531 <member name="T:Moq.Language.IOccurrence">
1532 <summary>
1533 Defines occurrence members to constraint setups.
1534 </summary>
1535 </member>
1536 <member name="M:Moq.Language.IOccurrence.AtMostOnce">
1537 <summary>
1538 The expected invocation can happen at most once.
1539 </summary>
1540 <example>
1541 <code>
1542 var mock = new Mock&lt;ICommand&gt;();
1543 mock.Setup(foo => foo.Execute("ping"))
1544 .AtMostOnce();
1545 </code>
1546 </example>
1547 </member>
1548 <member name="M:Moq.Language.IOccurrence.AtMost(System.Int32)">
1549 <summary>
1550 The expected invocation can happen at most specified number of times.
1551 </summary>
1552 <param name="callCount">The number of times to accept calls.</param>
1553 <example>
1554 <code>
1555 var mock = new Mock&lt;ICommand&gt;();
1556 mock.Setup(foo => foo.Execute("ping"))
1557 .AtMost( 5 );
1558 </code>
1559 </example>
1560 </member>
1561 <member name="T:Moq.Language.IVerifies">
1562 <summary>
1563 Defines the <c>Verifiable</c> verb.
1564 </summary>
1565 </member>
1566 <member name="M:Moq.Language.IVerifies.Verifiable">
1567 <summary>
1568 Marks the expectation as verifiable, meaning that a call
1569 to <see cref="M:Moq.Mock.Verify"/> will check if this particular
1570 expectation was met.
1571 </summary>
1572 <example>
1573 The following example marks the expectation as verifiable:
1574 <code>
1575 mock.Expect(x =&gt; x.Execute("ping"))
1576 .Returns(true)
1577 .Verifiable();
1578 </code>
1579 </example>
1580 </member>
1581 <member name="M:Moq.Language.IVerifies.Verifiable(System.String)">
1582 <summary>
1583 Marks the expectation as verifiable, meaning that a call
1584 to <see cref="M:Moq.Mock.Verify"/> will check if this particular
1585 expectation was met, and specifies a message for failures.
1586 </summary>
1587 <example>
1588 The following example marks the expectation as verifiable:
1589 <code>
1590 mock.Expect(x =&gt; x.Execute("ping"))
1591 .Returns(true)
1592 .Verifiable("Ping should be executed always!");
1593 </code>
1594 </example>
1595 </member>
1596 <member name="T:Moq.Language.Flow.ISetup`2">
1597 <summary>
1598 Implements the fluent API.
1599 </summary>
1600 </member>
1601 <member name="T:Moq.Language.ICallback`2">
1602 <summary>
1603 Defines the <c>Callback</c> verb and overloads for callbacks on
1604 setups that return a value.
1605 </summary>
1606 <typeparam name="TMock">Mocked type.</typeparam>
1607 <typeparam name="TResult">Type of the return value of the setup.</typeparam>
1608 </member>
1609 <member name="M:Moq.Language.ICallback`2.Callback``2(System.Action{``0,``1})">
1610 <summary>
1611 Specifies a callback to invoke when the method is called that receives the original
1612 arguments.
1613 </summary>
1614 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1615 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1616 <param name="action">The callback method to invoke.</param>
1617 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1618 <example>
1619 Invokes the given callback with the concrete invocation arguments values.
1620 <para>
1621 Notice how the specific arguments are retrieved by simply declaring
1622 them as part of the lambda expression for the callback:
1623 </para>
1624 <code>
1625 mock.Setup(x =&gt; x.Execute(
1626 It.IsAny&lt;string&gt;(),
1627 It.IsAny&lt;string&gt;()))
1628 .Callback((arg1, arg2) =&gt; Console.WriteLine(arg1 + arg2));
1629 </code>
1630 </example>
1631 </member>
1632 <member name="M:Moq.Language.ICallback`2.Callback``3(System.Action{``0,``1,``2})">
1633 <summary>
1634 Specifies a callback to invoke when the method is called that receives the original
1635 arguments.
1636 </summary>
1637 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1638 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1639 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1640 <param name="action">The callback method to invoke.</param>
1641 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1642 <example>
1643 Invokes the given callback with the concrete invocation arguments values.
1644 <para>
1645 Notice how the specific arguments are retrieved by simply declaring
1646 them as part of the lambda expression for the callback:
1647 </para>
1648 <code>
1649 mock.Setup(x =&gt; x.Execute(
1650 It.IsAny&lt;string&gt;(),
1651 It.IsAny&lt;string&gt;(),
1652 It.IsAny&lt;string&gt;()))
1653 .Callback((arg1, arg2, arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
1654 </code>
1655 </example>
1656 </member>
1657 <member name="M:Moq.Language.ICallback`2.Callback``4(System.Action{``0,``1,``2,``3})">
1658 <summary>
1659 Specifies a callback to invoke when the method is called that receives the original
1660 arguments.
1661 </summary>
1662 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1663 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1664 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1665 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1666 <param name="action">The callback method to invoke.</param>
1667 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1668 <example>
1669 Invokes the given callback with the concrete invocation arguments values.
1670 <para>
1671 Notice how the specific arguments are retrieved by simply declaring
1672 them as part of the lambda expression for the callback:
1673 </para>
1674 <code>
1675 mock.Setup(x =&gt; x.Execute(
1676 It.IsAny&lt;string&gt;(),
1677 It.IsAny&lt;string&gt;(),
1678 It.IsAny&lt;string&gt;(),
1679 It.IsAny&lt;string&gt;()))
1680 .Callback((arg1, arg2, arg3, arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
1681 </code>
1682 </example>
1683 </member>
1684 <member name="M:Moq.Language.ICallback`2.Callback``5(System.Action{``0,``1,``2,``3,``4})">
1685 <summary>
1686 Specifies a callback to invoke when the method is called that receives the original
1687 arguments.
1688 </summary>
1689 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1690 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1691 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1692 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1693 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1694 <param name="action">The callback method to invoke.</param>
1695 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1696 <example>
1697 Invokes the given callback with the concrete invocation arguments values.
1698 <para>
1699 Notice how the specific arguments are retrieved by simply declaring
1700 them as part of the lambda expression for the callback:
1701 </para>
1702 <code>
1703 mock.Setup(x =&gt; x.Execute(
1704 It.IsAny&lt;string&gt;(),
1705 It.IsAny&lt;string&gt;(),
1706 It.IsAny&lt;string&gt;(),
1707 It.IsAny&lt;string&gt;(),
1708 It.IsAny&lt;string&gt;()))
1709 .Callback((arg1, arg2, arg3, arg4, arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
1710 </code>
1711 </example>
1712 </member>
1713 <member name="M:Moq.Language.ICallback`2.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
1714 <summary>
1715 Specifies a callback to invoke when the method is called that receives the original
1716 arguments.
1717 </summary>
1718 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1719 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1720 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1721 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1722 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1723 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1724 <param name="action">The callback method to invoke.</param>
1725 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1726 <example>
1727 Invokes the given callback with the concrete invocation arguments values.
1728 <para>
1729 Notice how the specific arguments are retrieved by simply declaring
1730 them as part of the lambda expression for the callback:
1731 </para>
1732 <code>
1733 mock.Setup(x =&gt; x.Execute(
1734 It.IsAny&lt;string&gt;(),
1735 It.IsAny&lt;string&gt;(),
1736 It.IsAny&lt;string&gt;(),
1737 It.IsAny&lt;string&gt;(),
1738 It.IsAny&lt;string&gt;(),
1739 It.IsAny&lt;string&gt;()))
1740 .Callback((arg1, arg2, arg3, arg4, arg5, arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
1741 </code>
1742 </example>
1743 </member>
1744 <member name="M:Moq.Language.ICallback`2.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
1745 <summary>
1746 Specifies a callback to invoke when the method is called that receives the original
1747 arguments.
1748 </summary>
1749 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1750 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1751 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1752 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1753 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1754 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1755 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1756 <param name="action">The callback method to invoke.</param>
1757 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1758 <example>
1759 Invokes the given callback with the concrete invocation arguments values.
1760 <para>
1761 Notice how the specific arguments are retrieved by simply declaring
1762 them as part of the lambda expression for the callback:
1763 </para>
1764 <code>
1765 mock.Setup(x =&gt; x.Execute(
1766 It.IsAny&lt;string&gt;(),
1767 It.IsAny&lt;string&gt;(),
1768 It.IsAny&lt;string&gt;(),
1769 It.IsAny&lt;string&gt;(),
1770 It.IsAny&lt;string&gt;(),
1771 It.IsAny&lt;string&gt;(),
1772 It.IsAny&lt;string&gt;()))
1773 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7));
1774 </code>
1775 </example>
1776 </member>
1777 <member name="M:Moq.Language.ICallback`2.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})">
1778 <summary>
1779 Specifies a callback to invoke when the method is called that receives the original
1780 arguments.
1781 </summary>
1782 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1783 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1784 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1785 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1786 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1787 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1788 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1789 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
1790 <param name="action">The callback method to invoke.</param>
1791 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1792 <example>
1793 Invokes the given callback with the concrete invocation arguments values.
1794 <para>
1795 Notice how the specific arguments are retrieved by simply declaring
1796 them as part of the lambda expression for the callback:
1797 </para>
1798 <code>
1799 mock.Setup(x =&gt; x.Execute(
1800 It.IsAny&lt;string&gt;(),
1801 It.IsAny&lt;string&gt;(),
1802 It.IsAny&lt;string&gt;(),
1803 It.IsAny&lt;string&gt;(),
1804 It.IsAny&lt;string&gt;(),
1805 It.IsAny&lt;string&gt;(),
1806 It.IsAny&lt;string&gt;(),
1807 It.IsAny&lt;string&gt;()))
1808 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8));
1809 </code>
1810 </example>
1811 </member>
1812 <member name="M:Moq.Language.ICallback`2.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})">
1813 <summary>
1814 Specifies a callback to invoke when the method is called that receives the original
1815 arguments.
1816 </summary>
1817 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1818 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1819 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1820 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1821 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1822 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1823 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1824 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
1825 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
1826 <param name="action">The callback method to invoke.</param>
1827 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1828 <example>
1829 Invokes the given callback with the concrete invocation arguments values.
1830 <para>
1831 Notice how the specific arguments are retrieved by simply declaring
1832 them as part of the lambda expression for the callback:
1833 </para>
1834 <code>
1835 mock.Setup(x =&gt; x.Execute(
1836 It.IsAny&lt;string&gt;(),
1837 It.IsAny&lt;string&gt;(),
1838 It.IsAny&lt;string&gt;(),
1839 It.IsAny&lt;string&gt;(),
1840 It.IsAny&lt;string&gt;(),
1841 It.IsAny&lt;string&gt;(),
1842 It.IsAny&lt;string&gt;(),
1843 It.IsAny&lt;string&gt;(),
1844 It.IsAny&lt;string&gt;()))
1845 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9));
1846 </code>
1847 </example>
1848 </member>
1849 <member name="M:Moq.Language.ICallback`2.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})">
1850 <summary>
1851 Specifies a callback to invoke when the method is called that receives the original
1852 arguments.
1853 </summary>
1854 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1855 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1856 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1857 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1858 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1859 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1860 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1861 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
1862 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
1863 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
1864 <param name="action">The callback method to invoke.</param>
1865 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1866 <example>
1867 Invokes the given callback with the concrete invocation arguments values.
1868 <para>
1869 Notice how the specific arguments are retrieved by simply declaring
1870 them as part of the lambda expression for the callback:
1871 </para>
1872 <code>
1873 mock.Setup(x =&gt; x.Execute(
1874 It.IsAny&lt;string&gt;(),
1875 It.IsAny&lt;string&gt;(),
1876 It.IsAny&lt;string&gt;(),
1877 It.IsAny&lt;string&gt;(),
1878 It.IsAny&lt;string&gt;(),
1879 It.IsAny&lt;string&gt;(),
1880 It.IsAny&lt;string&gt;(),
1881 It.IsAny&lt;string&gt;(),
1882 It.IsAny&lt;string&gt;(),
1883 It.IsAny&lt;string&gt;()))
1884 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10));
1885 </code>
1886 </example>
1887 </member>
1888 <member name="M:Moq.Language.ICallback`2.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})">
1889 <summary>
1890 Specifies a callback to invoke when the method is called that receives the original
1891 arguments.
1892 </summary>
1893 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1894 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1895 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1896 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1897 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1898 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1899 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1900 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
1901 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
1902 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
1903 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
1904 <param name="action">The callback method to invoke.</param>
1905 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1906 <example>
1907 Invokes the given callback with the concrete invocation arguments values.
1908 <para>
1909 Notice how the specific arguments are retrieved by simply declaring
1910 them as part of the lambda expression for the callback:
1911 </para>
1912 <code>
1913 mock.Setup(x =&gt; x.Execute(
1914 It.IsAny&lt;string&gt;(),
1915 It.IsAny&lt;string&gt;(),
1916 It.IsAny&lt;string&gt;(),
1917 It.IsAny&lt;string&gt;(),
1918 It.IsAny&lt;string&gt;(),
1919 It.IsAny&lt;string&gt;(),
1920 It.IsAny&lt;string&gt;(),
1921 It.IsAny&lt;string&gt;(),
1922 It.IsAny&lt;string&gt;(),
1923 It.IsAny&lt;string&gt;(),
1924 It.IsAny&lt;string&gt;()))
1925 .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));
1926 </code>
1927 </example>
1928 </member>
1929 <member name="M:Moq.Language.ICallback`2.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})">
1930 <summary>
1931 Specifies a callback to invoke when the method is called that receives the original
1932 arguments.
1933 </summary>
1934 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1935 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1936 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1937 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1938 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1939 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1940 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1941 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
1942 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
1943 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
1944 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
1945 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
1946 <param name="action">The callback method to invoke.</param>
1947 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1948 <example>
1949 Invokes the given callback with the concrete invocation arguments values.
1950 <para>
1951 Notice how the specific arguments are retrieved by simply declaring
1952 them as part of the lambda expression for the callback:
1953 </para>
1954 <code>
1955 mock.Setup(x =&gt; x.Execute(
1956 It.IsAny&lt;string&gt;(),
1957 It.IsAny&lt;string&gt;(),
1958 It.IsAny&lt;string&gt;(),
1959 It.IsAny&lt;string&gt;(),
1960 It.IsAny&lt;string&gt;(),
1961 It.IsAny&lt;string&gt;(),
1962 It.IsAny&lt;string&gt;(),
1963 It.IsAny&lt;string&gt;(),
1964 It.IsAny&lt;string&gt;(),
1965 It.IsAny&lt;string&gt;(),
1966 It.IsAny&lt;string&gt;(),
1967 It.IsAny&lt;string&gt;()))
1968 .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));
1969 </code>
1970 </example>
1971 </member>
1972 <member name="M:Moq.Language.ICallback`2.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
1973 <summary>
1974 Specifies a callback to invoke when the method is called that receives the original
1975 arguments.
1976 </summary>
1977 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
1978 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
1979 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
1980 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
1981 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
1982 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
1983 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
1984 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
1985 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
1986 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
1987 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
1988 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
1989 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
1990 <param name="action">The callback method to invoke.</param>
1991 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
1992 <example>
1993 Invokes the given callback with the concrete invocation arguments values.
1994 <para>
1995 Notice how the specific arguments are retrieved by simply declaring
1996 them as part of the lambda expression for the callback:
1997 </para>
1998 <code>
1999 mock.Setup(x =&gt; x.Execute(
2000 It.IsAny&lt;string&gt;(),
2001 It.IsAny&lt;string&gt;(),
2002 It.IsAny&lt;string&gt;(),
2003 It.IsAny&lt;string&gt;(),
2004 It.IsAny&lt;string&gt;(),
2005 It.IsAny&lt;string&gt;(),
2006 It.IsAny&lt;string&gt;(),
2007 It.IsAny&lt;string&gt;(),
2008 It.IsAny&lt;string&gt;(),
2009 It.IsAny&lt;string&gt;(),
2010 It.IsAny&lt;string&gt;(),
2011 It.IsAny&lt;string&gt;(),
2012 It.IsAny&lt;string&gt;()))
2013 .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));
2014 </code>
2015 </example>
2016 </member>
2017 <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})">
2018 <summary>
2019 Specifies a callback to invoke when the method is called that receives the original
2020 arguments.
2021 </summary>
2022 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2023 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2024 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2025 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2026 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2027 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2028 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2029 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2030 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2031 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2032 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2033 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2034 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2035 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
2036 <param name="action">The callback method to invoke.</param>
2037 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
2038 <example>
2039 Invokes the given callback with the concrete invocation arguments values.
2040 <para>
2041 Notice how the specific arguments are retrieved by simply declaring
2042 them as part of the lambda expression for the callback:
2043 </para>
2044 <code>
2045 mock.Setup(x =&gt; x.Execute(
2046 It.IsAny&lt;string&gt;(),
2047 It.IsAny&lt;string&gt;(),
2048 It.IsAny&lt;string&gt;(),
2049 It.IsAny&lt;string&gt;(),
2050 It.IsAny&lt;string&gt;(),
2051 It.IsAny&lt;string&gt;(),
2052 It.IsAny&lt;string&gt;(),
2053 It.IsAny&lt;string&gt;(),
2054 It.IsAny&lt;string&gt;(),
2055 It.IsAny&lt;string&gt;(),
2056 It.IsAny&lt;string&gt;(),
2057 It.IsAny&lt;string&gt;(),
2058 It.IsAny&lt;string&gt;(),
2059 It.IsAny&lt;string&gt;()))
2060 .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));
2061 </code>
2062 </example>
2063 </member>
2064 <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})">
2065 <summary>
2066 Specifies a callback to invoke when the method is called that receives the original
2067 arguments.
2068 </summary>
2069 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2070 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2071 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2072 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2073 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2074 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2075 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2076 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2077 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2078 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2079 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2080 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2081 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2082 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
2083 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
2084 <param name="action">The callback method to invoke.</param>
2085 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
2086 <example>
2087 Invokes the given callback with the concrete invocation arguments values.
2088 <para>
2089 Notice how the specific arguments are retrieved by simply declaring
2090 them as part of the lambda expression for the callback:
2091 </para>
2092 <code>
2093 mock.Setup(x =&gt; x.Execute(
2094 It.IsAny&lt;string&gt;(),
2095 It.IsAny&lt;string&gt;(),
2096 It.IsAny&lt;string&gt;(),
2097 It.IsAny&lt;string&gt;(),
2098 It.IsAny&lt;string&gt;(),
2099 It.IsAny&lt;string&gt;(),
2100 It.IsAny&lt;string&gt;(),
2101 It.IsAny&lt;string&gt;(),
2102 It.IsAny&lt;string&gt;(),
2103 It.IsAny&lt;string&gt;(),
2104 It.IsAny&lt;string&gt;(),
2105 It.IsAny&lt;string&gt;(),
2106 It.IsAny&lt;string&gt;(),
2107 It.IsAny&lt;string&gt;(),
2108 It.IsAny&lt;string&gt;()))
2109 .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));
2110 </code>
2111 </example>
2112 </member>
2113 <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})">
2114 <summary>
2115 Specifies a callback to invoke when the method is called that receives the original
2116 arguments.
2117 </summary>
2118 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2119 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2120 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2121 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2122 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2123 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2124 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2125 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2126 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2127 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2128 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2129 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2130 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2131 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
2132 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
2133 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
2134 <param name="action">The callback method to invoke.</param>
2135 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
2136 <example>
2137 Invokes the given callback with the concrete invocation arguments values.
2138 <para>
2139 Notice how the specific arguments are retrieved by simply declaring
2140 them as part of the lambda expression for the callback:
2141 </para>
2142 <code>
2143 mock.Setup(x =&gt; x.Execute(
2144 It.IsAny&lt;string&gt;(),
2145 It.IsAny&lt;string&gt;(),
2146 It.IsAny&lt;string&gt;(),
2147 It.IsAny&lt;string&gt;(),
2148 It.IsAny&lt;string&gt;(),
2149 It.IsAny&lt;string&gt;(),
2150 It.IsAny&lt;string&gt;(),
2151 It.IsAny&lt;string&gt;(),
2152 It.IsAny&lt;string&gt;(),
2153 It.IsAny&lt;string&gt;(),
2154 It.IsAny&lt;string&gt;(),
2155 It.IsAny&lt;string&gt;(),
2156 It.IsAny&lt;string&gt;(),
2157 It.IsAny&lt;string&gt;(),
2158 It.IsAny&lt;string&gt;(),
2159 It.IsAny&lt;string&gt;()))
2160 .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));
2161 </code>
2162 </example>
2163 </member>
2164 <member name="M:Moq.Language.ICallback`2.Callback(System.Action)">
2165 <summary>
2166 Specifies a callback to invoke when the method is called.
2167 </summary>
2168 <param name="action">The callback method to invoke.</param>
2169 <example>
2170 The following example specifies a callback to set a boolean value that can be used later:
2171 <code>
2172 var called = false;
2173 mock.Setup(x => x.Execute())
2174 .Callback(() => called = true)
2175 .Returns(true);
2176 </code>
2177 Note that in the case of value-returning methods, after the <c>Callback</c>
2178 call you can still specify the return value.
2179 </example>
2180 </member>
2181 <member name="M:Moq.Language.ICallback`2.Callback``1(System.Action{``0})">
2182 <summary>
2183 Specifies a callback to invoke when the method is called that receives the original arguments.
2184 </summary>
2185 <typeparam name="T">The type of the argument of the invoked method.</typeparam>
2186 <param name="action">Callback method to invoke.</param>
2187 <example>
2188 Invokes the given callback with the concrete invocation argument value.
2189 <para>
2190 Notice how the specific string argument is retrieved by simply declaring
2191 it as part of the lambda expression for the callback:
2192 </para>
2193 <code>
2194 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
2195 .Callback(command => Console.WriteLine(command))
2196 .Returns(true);
2197 </code>
2198 </example>
2199 </member>
2200 <member name="T:Moq.Language.Flow.IReturnsThrows`2">
2201 <summary>
2202 Implements the fluent API.
2203 </summary>
2204 </member>
2205 <member name="T:Moq.Language.IReturns`2">
2206 <summary>
2207 Defines the <c>Returns</c> verb.
2208 </summary>
2209 <typeparam name="TMock">Mocked type.</typeparam>
2210 <typeparam name="TResult">Type of the return value from the expression.</typeparam>
2211 </member>
2212 <member name="M:Moq.Language.IReturns`2.Returns(`1)">
2213 <summary>
2214 Specifies the value to return.
2215 </summary>
2216 <param name="value">The value to return, or <see langword="null"/>.</param>
2217 <example>
2218 Return a <c>true</c> value from the method call:
2219 <code>
2220 mock.Setup(x => x.Execute("ping"))
2221 .Returns(true);
2222 </code>
2223 </example>
2224 </member>
2225 <member name="M:Moq.Language.IReturns`2.Returns(System.Func{`1})">
2226 <summary>
2227 Specifies a function that will calculate the value to return from the method.
2228 </summary>
2229 <param name="valueFunction">The function that will calculate the return value.</param>
2230 <example group="returns">
2231 Return a calculated value when the method is called:
2232 <code>
2233 mock.Setup(x => x.Execute("ping"))
2234 .Returns(() => returnValues[0]);
2235 </code>
2236 The lambda expression to retrieve the return value is lazy-executed,
2237 meaning that its value may change depending on the moment the method
2238 is executed and the value the <c>returnValues</c> array has at
2239 that moment.
2240 </example>
2241 </member>
2242 <member name="M:Moq.Language.IReturns`2.Returns``1(System.Func{``0,`1})">
2243 <summary>
2244 Specifies a function that will calculate the value to return from the method,
2245 retrieving the arguments for the invocation.
2246 </summary>
2247 <typeparam name="T">The type of the argument of the invoked method.</typeparam>
2248 <param name="valueFunction">The function that will calculate the return value.</param>
2249 <example group="returns">
2250 Return a calculated value which is evaluated lazily at the time of the invocation.
2251 <para>
2252 The lookup list can change between invocations and the setup
2253 will return different values accordingly. Also, notice how the specific
2254 string argument is retrieved by simply declaring it as part of the lambda
2255 expression:
2256 </para>
2257 <code>
2258 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
2259 .Returns((string command) => returnValues[command]);
2260 </code>
2261 </example>
2262 </member>
2263 <member name="M:Moq.Language.IReturns`2.Returns``2(System.Func{``0,``1,`1})">
2264 <summary>
2265 Specifies a function that will calculate the value to return from the method,
2266 retrieving the arguments for the invocation.
2267 </summary>
2268 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2269 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2270 <param name="valueFunction">The function that will calculate the return value.</param>
2271 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2272 <example>
2273 <para>
2274 The return value is calculated from the value of the actual method invocation arguments.
2275 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2276 expression:
2277 </para>
2278 <code>
2279 mock.Setup(x => x.Execute(
2280 It.IsAny&lt;int&gt;(),
2281 It.IsAny&lt;int&gt;()))
2282 .Returns((string arg1, string arg2) => arg1 + arg2);
2283 </code>
2284 </example>
2285 </member>
2286 <member name="M:Moq.Language.IReturns`2.Returns``3(System.Func{``0,``1,``2,`1})">
2287 <summary>
2288 Specifies a function that will calculate the value to return from the method,
2289 retrieving the arguments for the invocation.
2290 </summary>
2291 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2292 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2293 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2294 <param name="valueFunction">The function that will calculate the return value.</param>
2295 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2296 <example>
2297 <para>
2298 The return value is calculated from the value of the actual method invocation arguments.
2299 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2300 expression:
2301 </para>
2302 <code>
2303 mock.Setup(x => x.Execute(
2304 It.IsAny&lt;int&gt;(),
2305 It.IsAny&lt;int&gt;(),
2306 It.IsAny&lt;int&gt;()))
2307 .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3);
2308 </code>
2309 </example>
2310 </member>
2311 <member name="M:Moq.Language.IReturns`2.Returns``4(System.Func{``0,``1,``2,``3,`1})">
2312 <summary>
2313 Specifies a function that will calculate the value to return from the method,
2314 retrieving the arguments for the invocation.
2315 </summary>
2316 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2317 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2318 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2319 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2320 <param name="valueFunction">The function that will calculate the return value.</param>
2321 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2322 <example>
2323 <para>
2324 The return value is calculated from the value of the actual method invocation arguments.
2325 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2326 expression:
2327 </para>
2328 <code>
2329 mock.Setup(x => x.Execute(
2330 It.IsAny&lt;int&gt;(),
2331 It.IsAny&lt;int&gt;(),
2332 It.IsAny&lt;int&gt;(),
2333 It.IsAny&lt;int&gt;()))
2334 .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4);
2335 </code>
2336 </example>
2337 </member>
2338 <member name="M:Moq.Language.IReturns`2.Returns``5(System.Func{``0,``1,``2,``3,``4,`1})">
2339 <summary>
2340 Specifies a function that will calculate the value to return from the method,
2341 retrieving the arguments for the invocation.
2342 </summary>
2343 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2344 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2345 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2346 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2347 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2348 <param name="valueFunction">The function that will calculate the return value.</param>
2349 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2350 <example>
2351 <para>
2352 The return value is calculated from the value of the actual method invocation arguments.
2353 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2354 expression:
2355 </para>
2356 <code>
2357 mock.Setup(x => x.Execute(
2358 It.IsAny&lt;int&gt;(),
2359 It.IsAny&lt;int&gt;(),
2360 It.IsAny&lt;int&gt;(),
2361 It.IsAny&lt;int&gt;(),
2362 It.IsAny&lt;int&gt;()))
2363 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5);
2364 </code>
2365 </example>
2366 </member>
2367 <member name="M:Moq.Language.IReturns`2.Returns``6(System.Func{``0,``1,``2,``3,``4,``5,`1})">
2368 <summary>
2369 Specifies a function that will calculate the value to return from the method,
2370 retrieving the arguments for the invocation.
2371 </summary>
2372 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2373 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2374 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2375 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2376 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2377 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2378 <param name="valueFunction">The function that will calculate the return value.</param>
2379 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2380 <example>
2381 <para>
2382 The return value is calculated from the value of the actual method invocation arguments.
2383 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2384 expression:
2385 </para>
2386 <code>
2387 mock.Setup(x => x.Execute(
2388 It.IsAny&lt;int&gt;(),
2389 It.IsAny&lt;int&gt;(),
2390 It.IsAny&lt;int&gt;(),
2391 It.IsAny&lt;int&gt;(),
2392 It.IsAny&lt;int&gt;(),
2393 It.IsAny&lt;int&gt;()))
2394 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6);
2395 </code>
2396 </example>
2397 </member>
2398 <member name="M:Moq.Language.IReturns`2.Returns``7(System.Func{``0,``1,``2,``3,``4,``5,``6,`1})">
2399 <summary>
2400 Specifies a function that will calculate the value to return from the method,
2401 retrieving the arguments for the invocation.
2402 </summary>
2403 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2404 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2405 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2406 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2407 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2408 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2409 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2410 <param name="valueFunction">The function that will calculate the return value.</param>
2411 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2412 <example>
2413 <para>
2414 The return value is calculated from the value of the actual method invocation arguments.
2415 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2416 expression:
2417 </para>
2418 <code>
2419 mock.Setup(x => x.Execute(
2420 It.IsAny&lt;int&gt;(),
2421 It.IsAny&lt;int&gt;(),
2422 It.IsAny&lt;int&gt;(),
2423 It.IsAny&lt;int&gt;(),
2424 It.IsAny&lt;int&gt;(),
2425 It.IsAny&lt;int&gt;(),
2426 It.IsAny&lt;int&gt;()))
2427 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7);
2428 </code>
2429 </example>
2430 </member>
2431 <member name="M:Moq.Language.IReturns`2.Returns``8(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,`1})">
2432 <summary>
2433 Specifies a function that will calculate the value to return from the method,
2434 retrieving the arguments for the invocation.
2435 </summary>
2436 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2437 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2438 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2439 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2440 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2441 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2442 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2443 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2444 <param name="valueFunction">The function that will calculate the return value.</param>
2445 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2446 <example>
2447 <para>
2448 The return value is calculated from the value of the actual method invocation arguments.
2449 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2450 expression:
2451 </para>
2452 <code>
2453 mock.Setup(x => x.Execute(
2454 It.IsAny&lt;int&gt;(),
2455 It.IsAny&lt;int&gt;(),
2456 It.IsAny&lt;int&gt;(),
2457 It.IsAny&lt;int&gt;(),
2458 It.IsAny&lt;int&gt;(),
2459 It.IsAny&lt;int&gt;(),
2460 It.IsAny&lt;int&gt;(),
2461 It.IsAny&lt;int&gt;()))
2462 .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);
2463 </code>
2464 </example>
2465 </member>
2466 <member name="M:Moq.Language.IReturns`2.Returns``9(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,`1})">
2467 <summary>
2468 Specifies a function that will calculate the value to return from the method,
2469 retrieving the arguments for the invocation.
2470 </summary>
2471 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2472 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2473 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2474 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2475 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2476 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2477 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2478 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2479 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2480 <param name="valueFunction">The function that will calculate the return value.</param>
2481 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2482 <example>
2483 <para>
2484 The return value is calculated from the value of the actual method invocation arguments.
2485 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2486 expression:
2487 </para>
2488 <code>
2489 mock.Setup(x => x.Execute(
2490 It.IsAny&lt;int&gt;(),
2491 It.IsAny&lt;int&gt;(),
2492 It.IsAny&lt;int&gt;(),
2493 It.IsAny&lt;int&gt;(),
2494 It.IsAny&lt;int&gt;(),
2495 It.IsAny&lt;int&gt;(),
2496 It.IsAny&lt;int&gt;(),
2497 It.IsAny&lt;int&gt;(),
2498 It.IsAny&lt;int&gt;()))
2499 .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);
2500 </code>
2501 </example>
2502 </member>
2503 <member name="M:Moq.Language.IReturns`2.Returns``10(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,`1})">
2504 <summary>
2505 Specifies a function that will calculate the value to return from the method,
2506 retrieving the arguments for the invocation.
2507 </summary>
2508 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2509 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2510 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2511 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2512 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2513 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2514 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2515 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2516 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2517 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2518 <param name="valueFunction">The function that will calculate the return value.</param>
2519 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2520 <example>
2521 <para>
2522 The return value is calculated from the value of the actual method invocation arguments.
2523 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2524 expression:
2525 </para>
2526 <code>
2527 mock.Setup(x => x.Execute(
2528 It.IsAny&lt;int&gt;(),
2529 It.IsAny&lt;int&gt;(),
2530 It.IsAny&lt;int&gt;(),
2531 It.IsAny&lt;int&gt;(),
2532 It.IsAny&lt;int&gt;(),
2533 It.IsAny&lt;int&gt;(),
2534 It.IsAny&lt;int&gt;(),
2535 It.IsAny&lt;int&gt;(),
2536 It.IsAny&lt;int&gt;(),
2537 It.IsAny&lt;int&gt;()))
2538 .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);
2539 </code>
2540 </example>
2541 </member>
2542 <member name="M:Moq.Language.IReturns`2.Returns``11(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,`1})">
2543 <summary>
2544 Specifies a function that will calculate the value to return from the method,
2545 retrieving the arguments for the invocation.
2546 </summary>
2547 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2548 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2549 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2550 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2551 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2552 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2553 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2554 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2555 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2556 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2557 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2558 <param name="valueFunction">The function that will calculate the return value.</param>
2559 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2560 <example>
2561 <para>
2562 The return value is calculated from the value of the actual method invocation arguments.
2563 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2564 expression:
2565 </para>
2566 <code>
2567 mock.Setup(x => x.Execute(
2568 It.IsAny&lt;int&gt;(),
2569 It.IsAny&lt;int&gt;(),
2570 It.IsAny&lt;int&gt;(),
2571 It.IsAny&lt;int&gt;(),
2572 It.IsAny&lt;int&gt;(),
2573 It.IsAny&lt;int&gt;(),
2574 It.IsAny&lt;int&gt;(),
2575 It.IsAny&lt;int&gt;(),
2576 It.IsAny&lt;int&gt;(),
2577 It.IsAny&lt;int&gt;(),
2578 It.IsAny&lt;int&gt;()))
2579 .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);
2580 </code>
2581 </example>
2582 </member>
2583 <member name="M:Moq.Language.IReturns`2.Returns``12(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,`1})">
2584 <summary>
2585 Specifies a function that will calculate the value to return from the method,
2586 retrieving the arguments for the invocation.
2587 </summary>
2588 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2589 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2590 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2591 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2592 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2593 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2594 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2595 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2596 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2597 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2598 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2599 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2600 <param name="valueFunction">The function that will calculate the return value.</param>
2601 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2602 <example>
2603 <para>
2604 The return value is calculated from the value of the actual method invocation arguments.
2605 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2606 expression:
2607 </para>
2608 <code>
2609 mock.Setup(x => x.Execute(
2610 It.IsAny&lt;int&gt;(),
2611 It.IsAny&lt;int&gt;(),
2612 It.IsAny&lt;int&gt;(),
2613 It.IsAny&lt;int&gt;(),
2614 It.IsAny&lt;int&gt;(),
2615 It.IsAny&lt;int&gt;(),
2616 It.IsAny&lt;int&gt;(),
2617 It.IsAny&lt;int&gt;(),
2618 It.IsAny&lt;int&gt;(),
2619 It.IsAny&lt;int&gt;(),
2620 It.IsAny&lt;int&gt;(),
2621 It.IsAny&lt;int&gt;()))
2622 .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);
2623 </code>
2624 </example>
2625 </member>
2626 <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})">
2627 <summary>
2628 Specifies a function that will calculate the value to return from the method,
2629 retrieving the arguments for the invocation.
2630 </summary>
2631 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2632 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2633 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2634 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2635 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2636 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2637 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2638 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2639 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2640 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2641 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2642 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2643 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2644 <param name="valueFunction">The function that will calculate the return value.</param>
2645 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2646 <example>
2647 <para>
2648 The return value is calculated from the value of the actual method invocation arguments.
2649 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2650 expression:
2651 </para>
2652 <code>
2653 mock.Setup(x => x.Execute(
2654 It.IsAny&lt;int&gt;(),
2655 It.IsAny&lt;int&gt;(),
2656 It.IsAny&lt;int&gt;(),
2657 It.IsAny&lt;int&gt;(),
2658 It.IsAny&lt;int&gt;(),
2659 It.IsAny&lt;int&gt;(),
2660 It.IsAny&lt;int&gt;(),
2661 It.IsAny&lt;int&gt;(),
2662 It.IsAny&lt;int&gt;(),
2663 It.IsAny&lt;int&gt;(),
2664 It.IsAny&lt;int&gt;(),
2665 It.IsAny&lt;int&gt;(),
2666 It.IsAny&lt;int&gt;()))
2667 .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);
2668 </code>
2669 </example>
2670 </member>
2671 <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})">
2672 <summary>
2673 Specifies a function that will calculate the value to return from the method,
2674 retrieving the arguments for the invocation.
2675 </summary>
2676 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2677 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2678 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2679 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2680 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2681 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2682 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2683 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2684 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2685 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2686 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2687 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2688 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2689 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
2690 <param name="valueFunction">The function that will calculate the return value.</param>
2691 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2692 <example>
2693 <para>
2694 The return value is calculated from the value of the actual method invocation arguments.
2695 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2696 expression:
2697 </para>
2698 <code>
2699 mock.Setup(x => x.Execute(
2700 It.IsAny&lt;int&gt;(),
2701 It.IsAny&lt;int&gt;(),
2702 It.IsAny&lt;int&gt;(),
2703 It.IsAny&lt;int&gt;(),
2704 It.IsAny&lt;int&gt;(),
2705 It.IsAny&lt;int&gt;(),
2706 It.IsAny&lt;int&gt;(),
2707 It.IsAny&lt;int&gt;(),
2708 It.IsAny&lt;int&gt;(),
2709 It.IsAny&lt;int&gt;(),
2710 It.IsAny&lt;int&gt;(),
2711 It.IsAny&lt;int&gt;(),
2712 It.IsAny&lt;int&gt;(),
2713 It.IsAny&lt;int&gt;()))
2714 .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);
2715 </code>
2716 </example>
2717 </member>
2718 <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})">
2719 <summary>
2720 Specifies a function that will calculate the value to return from the method,
2721 retrieving the arguments for the invocation.
2722 </summary>
2723 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2724 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2725 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2726 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2727 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2728 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2729 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2730 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2731 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2732 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2733 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2734 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2735 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2736 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
2737 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
2738 <param name="valueFunction">The function that will calculate the return value.</param>
2739 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2740 <example>
2741 <para>
2742 The return value is calculated from the value of the actual method invocation arguments.
2743 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2744 expression:
2745 </para>
2746 <code>
2747 mock.Setup(x => x.Execute(
2748 It.IsAny&lt;int&gt;(),
2749 It.IsAny&lt;int&gt;(),
2750 It.IsAny&lt;int&gt;(),
2751 It.IsAny&lt;int&gt;(),
2752 It.IsAny&lt;int&gt;(),
2753 It.IsAny&lt;int&gt;(),
2754 It.IsAny&lt;int&gt;(),
2755 It.IsAny&lt;int&gt;(),
2756 It.IsAny&lt;int&gt;(),
2757 It.IsAny&lt;int&gt;(),
2758 It.IsAny&lt;int&gt;(),
2759 It.IsAny&lt;int&gt;(),
2760 It.IsAny&lt;int&gt;(),
2761 It.IsAny&lt;int&gt;(),
2762 It.IsAny&lt;int&gt;()))
2763 .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);
2764 </code>
2765 </example>
2766 </member>
2767 <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})">
2768 <summary>
2769 Specifies a function that will calculate the value to return from the method,
2770 retrieving the arguments for the invocation.
2771 </summary>
2772 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2773 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2774 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2775 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2776 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2777 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2778 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
2779 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
2780 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
2781 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
2782 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
2783 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
2784 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
2785 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
2786 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
2787 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
2788 <param name="valueFunction">The function that will calculate the return value.</param>
2789 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
2790 <example>
2791 <para>
2792 The return value is calculated from the value of the actual method invocation arguments.
2793 Notice how the arguments are retrieved by simply declaring them as part of the lambda
2794 expression:
2795 </para>
2796 <code>
2797 mock.Setup(x => x.Execute(
2798 It.IsAny&lt;int&gt;(),
2799 It.IsAny&lt;int&gt;(),
2800 It.IsAny&lt;int&gt;(),
2801 It.IsAny&lt;int&gt;(),
2802 It.IsAny&lt;int&gt;(),
2803 It.IsAny&lt;int&gt;(),
2804 It.IsAny&lt;int&gt;(),
2805 It.IsAny&lt;int&gt;(),
2806 It.IsAny&lt;int&gt;(),
2807 It.IsAny&lt;int&gt;(),
2808 It.IsAny&lt;int&gt;(),
2809 It.IsAny&lt;int&gt;(),
2810 It.IsAny&lt;int&gt;(),
2811 It.IsAny&lt;int&gt;(),
2812 It.IsAny&lt;int&gt;(),
2813 It.IsAny&lt;int&gt;()))
2814 .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);
2815 </code>
2816 </example>
2817 </member>
2818 <member name="T:Moq.Language.Flow.ISetupGetter`2">
2819 <summary>
2820 Implements the fluent API.
2821 </summary>
2822 </member>
2823 <member name="T:Moq.Language.Flow.IReturnsThrowsGetter`2">
2824 <summary>
2825 Implements the fluent API.
2826 </summary>
2827 </member>
2828 <member name="T:Moq.Language.IReturnsGetter`2">
2829 <summary>
2830 Defines the <c>Returns</c> verb for property get setups.
2831 </summary>
2832 <typeparam name="TMock">Mocked type.</typeparam>
2833 <typeparam name="TProperty">Type of the property.</typeparam>
2834 </member>
2835 <member name="M:Moq.Language.IReturnsGetter`2.Returns(`1)">
2836 <summary>
2837 Specifies the value to return.
2838 </summary>
2839 <param name="value">The value to return, or <see langword="null"/>.</param>
2840 <example>
2841 Return a <c>true</c> value from the property getter call:
2842 <code>
2843 mock.SetupGet(x => x.Suspended)
2844 .Returns(true);
2845 </code>
2846 </example>
2847 </member>
2848 <member name="M:Moq.Language.IReturnsGetter`2.Returns(System.Func{`1})">
2849 <summary>
2850 Specifies a function that will calculate the value to return for the property.
2851 </summary>
2852 <param name="valueFunction">The function that will calculate the return value.</param>
2853 <example>
2854 Return a calculated value when the property is retrieved:
2855 <code>
2856 mock.SetupGet(x => x.Suspended)
2857 .Returns(() => returnValues[0]);
2858 </code>
2859 The lambda expression to retrieve the return value is lazy-executed,
2860 meaning that its value may change depending on the moment the property
2861 is retrieved and the value the <c>returnValues</c> array has at
2862 that moment.
2863 </example>
2864 </member>
2865 <member name="T:Moq.Language.Flow.IReturnsResult`1">
2866 <summary>
2867 Implements the fluent API.
2868 </summary>
2869 </member>
2870 <member name="T:Moq.Language.ICallback">
2871 <summary>
2872 Defines the <c>Callback</c> verb and overloads.
2873 </summary>
2874 </member>
2875 <member name="M:Moq.Language.ICallback.Callback``2(System.Action{``0,``1})">
2876 <summary>
2877 Specifies a callback to invoke when the method is called that receives the original arguments.
2878 </summary>
2879 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2880 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2881 <param name="action">The callback method to invoke.</param>
2882 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
2883 <example>
2884 Invokes the given callback with the concrete invocation arguments values.
2885 <para>
2886 Notice how the specific arguments are retrieved by simply declaring
2887 them as part of the lambda expression for the callback:
2888 </para>
2889 <code>
2890 mock.Setup(x =&gt; x.Execute(
2891 It.IsAny&lt;string&gt;(),
2892 It.IsAny&lt;string&gt;()))
2893 .Callback((string arg1, string arg2) =&gt; Console.WriteLine(arg1 + arg2));
2894 </code>
2895 </example>
2896 </member>
2897 <member name="M:Moq.Language.ICallback.Callback``3(System.Action{``0,``1,``2})">
2898 <summary>
2899 Specifies a callback to invoke when the method is called that receives the original arguments.
2900 </summary>
2901 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2902 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2903 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2904 <param name="action">The callback method to invoke.</param>
2905 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
2906 <example>
2907 Invokes the given callback with the concrete invocation arguments values.
2908 <para>
2909 Notice how the specific arguments are retrieved by simply declaring
2910 them as part of the lambda expression for the callback:
2911 </para>
2912 <code>
2913 mock.Setup(x =&gt; x.Execute(
2914 It.IsAny&lt;string&gt;(),
2915 It.IsAny&lt;string&gt;(),
2916 It.IsAny&lt;string&gt;()))
2917 .Callback((string arg1, string arg2, string arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
2918 </code>
2919 </example>
2920 </member>
2921 <member name="M:Moq.Language.ICallback.Callback``4(System.Action{``0,``1,``2,``3})">
2922 <summary>
2923 Specifies a callback to invoke when the method is called that receives the original arguments.
2924 </summary>
2925 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2926 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2927 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2928 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2929 <param name="action">The callback method to invoke.</param>
2930 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
2931 <example>
2932 Invokes the given callback with the concrete invocation arguments values.
2933 <para>
2934 Notice how the specific arguments are retrieved by simply declaring
2935 them as part of the lambda expression for the callback:
2936 </para>
2937 <code>
2938 mock.Setup(x =&gt; x.Execute(
2939 It.IsAny&lt;string&gt;(),
2940 It.IsAny&lt;string&gt;(),
2941 It.IsAny&lt;string&gt;(),
2942 It.IsAny&lt;string&gt;()))
2943 .Callback((string arg1, string arg2, string arg3, string arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
2944 </code>
2945 </example>
2946 </member>
2947 <member name="M:Moq.Language.ICallback.Callback``5(System.Action{``0,``1,``2,``3,``4})">
2948 <summary>
2949 Specifies a callback to invoke when the method is called that receives the original arguments.
2950 </summary>
2951 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2952 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2953 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2954 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2955 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2956 <param name="action">The callback method to invoke.</param>
2957 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
2958 <example>
2959 Invokes the given callback with the concrete invocation arguments values.
2960 <para>
2961 Notice how the specific arguments are retrieved by simply declaring
2962 them as part of the lambda expression for the callback:
2963 </para>
2964 <code>
2965 mock.Setup(x =&gt; x.Execute(
2966 It.IsAny&lt;string&gt;(),
2967 It.IsAny&lt;string&gt;(),
2968 It.IsAny&lt;string&gt;(),
2969 It.IsAny&lt;string&gt;(),
2970 It.IsAny&lt;string&gt;()))
2971 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
2972 </code>
2973 </example>
2974 </member>
2975 <member name="M:Moq.Language.ICallback.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
2976 <summary>
2977 Specifies a callback to invoke when the method is called that receives the original arguments.
2978 </summary>
2979 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
2980 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
2981 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
2982 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
2983 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
2984 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
2985 <param name="action">The callback method to invoke.</param>
2986 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
2987 <example>
2988 Invokes the given callback with the concrete invocation arguments values.
2989 <para>
2990 Notice how the specific arguments are retrieved by simply declaring
2991 them as part of the lambda expression for the callback:
2992 </para>
2993 <code>
2994 mock.Setup(x =&gt; x.Execute(
2995 It.IsAny&lt;string&gt;(),
2996 It.IsAny&lt;string&gt;(),
2997 It.IsAny&lt;string&gt;(),
2998 It.IsAny&lt;string&gt;(),
2999 It.IsAny&lt;string&gt;(),
3000 It.IsAny&lt;string&gt;()))
3001 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
3002 </code>
3003 </example>
3004 </member>
3005 <member name="M:Moq.Language.ICallback.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
3006 <summary>
3007 Specifies a callback to invoke when the method is called that receives the original arguments.
3008 </summary>
3009 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3010 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3011 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3012 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3013 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3014 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3015 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3016 <param name="action">The callback method to invoke.</param>
3017 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3018 <example>
3019 Invokes the given callback with the concrete invocation arguments values.
3020 <para>
3021 Notice how the specific arguments are retrieved by simply declaring
3022 them as part of the lambda expression for the callback:
3023 </para>
3024 <code>
3025 mock.Setup(x =&gt; x.Execute(
3026 It.IsAny&lt;string&gt;(),
3027 It.IsAny&lt;string&gt;(),
3028 It.IsAny&lt;string&gt;(),
3029 It.IsAny&lt;string&gt;(),
3030 It.IsAny&lt;string&gt;(),
3031 It.IsAny&lt;string&gt;(),
3032 It.IsAny&lt;string&gt;()))
3033 .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));
3034 </code>
3035 </example>
3036 </member>
3037 <member name="M:Moq.Language.ICallback.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})">
3038 <summary>
3039 Specifies a callback to invoke when the method is called that receives the original arguments.
3040 </summary>
3041 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3042 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3043 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3044 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3045 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3046 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3047 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3048 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3049 <param name="action">The callback method to invoke.</param>
3050 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3051 <example>
3052 Invokes the given callback with the concrete invocation arguments values.
3053 <para>
3054 Notice how the specific arguments are retrieved by simply declaring
3055 them as part of the lambda expression for the callback:
3056 </para>
3057 <code>
3058 mock.Setup(x =&gt; x.Execute(
3059 It.IsAny&lt;string&gt;(),
3060 It.IsAny&lt;string&gt;(),
3061 It.IsAny&lt;string&gt;(),
3062 It.IsAny&lt;string&gt;(),
3063 It.IsAny&lt;string&gt;(),
3064 It.IsAny&lt;string&gt;(),
3065 It.IsAny&lt;string&gt;(),
3066 It.IsAny&lt;string&gt;()))
3067 .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));
3068 </code>
3069 </example>
3070 </member>
3071 <member name="M:Moq.Language.ICallback.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})">
3072 <summary>
3073 Specifies a callback to invoke when the method is called that receives the original arguments.
3074 </summary>
3075 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3076 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3077 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3078 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3079 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3080 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3081 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3082 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3083 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3084 <param name="action">The callback method to invoke.</param>
3085 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3086 <example>
3087 Invokes the given callback with the concrete invocation arguments values.
3088 <para>
3089 Notice how the specific arguments are retrieved by simply declaring
3090 them as part of the lambda expression for the callback:
3091 </para>
3092 <code>
3093 mock.Setup(x =&gt; x.Execute(
3094 It.IsAny&lt;string&gt;(),
3095 It.IsAny&lt;string&gt;(),
3096 It.IsAny&lt;string&gt;(),
3097 It.IsAny&lt;string&gt;(),
3098 It.IsAny&lt;string&gt;(),
3099 It.IsAny&lt;string&gt;(),
3100 It.IsAny&lt;string&gt;(),
3101 It.IsAny&lt;string&gt;(),
3102 It.IsAny&lt;string&gt;()))
3103 .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));
3104 </code>
3105 </example>
3106 </member>
3107 <member name="M:Moq.Language.ICallback.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})">
3108 <summary>
3109 Specifies a callback to invoke when the method is called that receives the original arguments.
3110 </summary>
3111 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3112 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3113 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3114 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3115 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3116 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3117 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3118 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3119 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3120 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3121 <param name="action">The callback method to invoke.</param>
3122 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3123 <example>
3124 Invokes the given callback with the concrete invocation arguments values.
3125 <para>
3126 Notice how the specific arguments are retrieved by simply declaring
3127 them as part of the lambda expression for the callback:
3128 </para>
3129 <code>
3130 mock.Setup(x =&gt; x.Execute(
3131 It.IsAny&lt;string&gt;(),
3132 It.IsAny&lt;string&gt;(),
3133 It.IsAny&lt;string&gt;(),
3134 It.IsAny&lt;string&gt;(),
3135 It.IsAny&lt;string&gt;(),
3136 It.IsAny&lt;string&gt;(),
3137 It.IsAny&lt;string&gt;(),
3138 It.IsAny&lt;string&gt;(),
3139 It.IsAny&lt;string&gt;(),
3140 It.IsAny&lt;string&gt;()))
3141 .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));
3142 </code>
3143 </example>
3144 </member>
3145 <member name="M:Moq.Language.ICallback.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})">
3146 <summary>
3147 Specifies a callback to invoke when the method is called that receives the original arguments.
3148 </summary>
3149 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3150 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3151 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3152 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3153 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3154 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3155 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3156 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3157 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3158 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3159 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
3160 <param name="action">The callback method to invoke.</param>
3161 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3162 <example>
3163 Invokes the given callback with the concrete invocation arguments values.
3164 <para>
3165 Notice how the specific arguments are retrieved by simply declaring
3166 them as part of the lambda expression for the callback:
3167 </para>
3168 <code>
3169 mock.Setup(x =&gt; x.Execute(
3170 It.IsAny&lt;string&gt;(),
3171 It.IsAny&lt;string&gt;(),
3172 It.IsAny&lt;string&gt;(),
3173 It.IsAny&lt;string&gt;(),
3174 It.IsAny&lt;string&gt;(),
3175 It.IsAny&lt;string&gt;(),
3176 It.IsAny&lt;string&gt;(),
3177 It.IsAny&lt;string&gt;(),
3178 It.IsAny&lt;string&gt;(),
3179 It.IsAny&lt;string&gt;(),
3180 It.IsAny&lt;string&gt;()))
3181 .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));
3182 </code>
3183 </example>
3184 </member>
3185 <member name="M:Moq.Language.ICallback.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})">
3186 <summary>
3187 Specifies a callback to invoke when the method is called that receives the original arguments.
3188 </summary>
3189 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3190 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3191 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3192 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3193 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3194 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3195 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3196 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3197 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3198 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3199 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
3200 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
3201 <param name="action">The callback method to invoke.</param>
3202 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3203 <example>
3204 Invokes the given callback with the concrete invocation arguments values.
3205 <para>
3206 Notice how the specific arguments are retrieved by simply declaring
3207 them as part of the lambda expression for the callback:
3208 </para>
3209 <code>
3210 mock.Setup(x =&gt; x.Execute(
3211 It.IsAny&lt;string&gt;(),
3212 It.IsAny&lt;string&gt;(),
3213 It.IsAny&lt;string&gt;(),
3214 It.IsAny&lt;string&gt;(),
3215 It.IsAny&lt;string&gt;(),
3216 It.IsAny&lt;string&gt;(),
3217 It.IsAny&lt;string&gt;(),
3218 It.IsAny&lt;string&gt;(),
3219 It.IsAny&lt;string&gt;(),
3220 It.IsAny&lt;string&gt;(),
3221 It.IsAny&lt;string&gt;(),
3222 It.IsAny&lt;string&gt;()))
3223 .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));
3224 </code>
3225 </example>
3226 </member>
3227 <member name="M:Moq.Language.ICallback.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
3228 <summary>
3229 Specifies a callback to invoke when the method is called that receives the original arguments.
3230 </summary>
3231 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3232 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3233 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3234 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3235 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3236 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3237 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3238 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3239 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3240 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3241 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
3242 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
3243 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
3244 <param name="action">The callback method to invoke.</param>
3245 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3246 <example>
3247 Invokes the given callback with the concrete invocation arguments values.
3248 <para>
3249 Notice how the specific arguments are retrieved by simply declaring
3250 them as part of the lambda expression for the callback:
3251 </para>
3252 <code>
3253 mock.Setup(x =&gt; x.Execute(
3254 It.IsAny&lt;string&gt;(),
3255 It.IsAny&lt;string&gt;(),
3256 It.IsAny&lt;string&gt;(),
3257 It.IsAny&lt;string&gt;(),
3258 It.IsAny&lt;string&gt;(),
3259 It.IsAny&lt;string&gt;(),
3260 It.IsAny&lt;string&gt;(),
3261 It.IsAny&lt;string&gt;(),
3262 It.IsAny&lt;string&gt;(),
3263 It.IsAny&lt;string&gt;(),
3264 It.IsAny&lt;string&gt;(),
3265 It.IsAny&lt;string&gt;(),
3266 It.IsAny&lt;string&gt;()))
3267 .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));
3268 </code>
3269 </example>
3270 </member>
3271 <member name="M:Moq.Language.ICallback.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})">
3272 <summary>
3273 Specifies a callback to invoke when the method is called that receives the original arguments.
3274 </summary>
3275 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3276 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3277 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3278 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3279 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3280 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3281 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3282 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3283 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3284 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3285 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
3286 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
3287 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
3288 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
3289 <param name="action">The callback method to invoke.</param>
3290 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3291 <example>
3292 Invokes the given callback with the concrete invocation arguments values.
3293 <para>
3294 Notice how the specific arguments are retrieved by simply declaring
3295 them as part of the lambda expression for the callback:
3296 </para>
3297 <code>
3298 mock.Setup(x =&gt; x.Execute(
3299 It.IsAny&lt;string&gt;(),
3300 It.IsAny&lt;string&gt;(),
3301 It.IsAny&lt;string&gt;(),
3302 It.IsAny&lt;string&gt;(),
3303 It.IsAny&lt;string&gt;(),
3304 It.IsAny&lt;string&gt;(),
3305 It.IsAny&lt;string&gt;(),
3306 It.IsAny&lt;string&gt;(),
3307 It.IsAny&lt;string&gt;(),
3308 It.IsAny&lt;string&gt;(),
3309 It.IsAny&lt;string&gt;(),
3310 It.IsAny&lt;string&gt;(),
3311 It.IsAny&lt;string&gt;(),
3312 It.IsAny&lt;string&gt;()))
3313 .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));
3314 </code>
3315 </example>
3316 </member>
3317 <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})">
3318 <summary>
3319 Specifies a callback to invoke when the method is called that receives the original arguments.
3320 </summary>
3321 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3322 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3323 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3324 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3325 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3326 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3327 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3328 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3329 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3330 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3331 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
3332 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
3333 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
3334 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
3335 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
3336 <param name="action">The callback method to invoke.</param>
3337 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3338 <example>
3339 Invokes the given callback with the concrete invocation arguments values.
3340 <para>
3341 Notice how the specific arguments are retrieved by simply declaring
3342 them as part of the lambda expression for the callback:
3343 </para>
3344 <code>
3345 mock.Setup(x =&gt; x.Execute(
3346 It.IsAny&lt;string&gt;(),
3347 It.IsAny&lt;string&gt;(),
3348 It.IsAny&lt;string&gt;(),
3349 It.IsAny&lt;string&gt;(),
3350 It.IsAny&lt;string&gt;(),
3351 It.IsAny&lt;string&gt;(),
3352 It.IsAny&lt;string&gt;(),
3353 It.IsAny&lt;string&gt;(),
3354 It.IsAny&lt;string&gt;(),
3355 It.IsAny&lt;string&gt;(),
3356 It.IsAny&lt;string&gt;(),
3357 It.IsAny&lt;string&gt;(),
3358 It.IsAny&lt;string&gt;(),
3359 It.IsAny&lt;string&gt;(),
3360 It.IsAny&lt;string&gt;()))
3361 .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));
3362 </code>
3363 </example>
3364 </member>
3365 <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})">
3366 <summary>
3367 Specifies a callback to invoke when the method is called that receives the original arguments.
3368 </summary>
3369 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
3370 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
3371 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
3372 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
3373 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
3374 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
3375 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
3376 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
3377 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
3378 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
3379 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
3380 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
3381 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
3382 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
3383 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
3384 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
3385 <param name="action">The callback method to invoke.</param>
3386 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
3387 <example>
3388 Invokes the given callback with the concrete invocation arguments values.
3389 <para>
3390 Notice how the specific arguments are retrieved by simply declaring
3391 them as part of the lambda expression for the callback:
3392 </para>
3393 <code>
3394 mock.Setup(x =&gt; x.Execute(
3395 It.IsAny&lt;string&gt;(),
3396 It.IsAny&lt;string&gt;(),
3397 It.IsAny&lt;string&gt;(),
3398 It.IsAny&lt;string&gt;(),
3399 It.IsAny&lt;string&gt;(),
3400 It.IsAny&lt;string&gt;(),
3401 It.IsAny&lt;string&gt;(),
3402 It.IsAny&lt;string&gt;(),
3403 It.IsAny&lt;string&gt;(),
3404 It.IsAny&lt;string&gt;(),
3405 It.IsAny&lt;string&gt;(),
3406 It.IsAny&lt;string&gt;(),
3407 It.IsAny&lt;string&gt;(),
3408 It.IsAny&lt;string&gt;(),
3409 It.IsAny&lt;string&gt;(),
3410 It.IsAny&lt;string&gt;()))
3411 .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));
3412 </code>
3413 </example>
3414 </member>
3415 <member name="M:Moq.Language.ICallback.Callback(System.Action)">
3416 <summary>
3417 Specifies a callback to invoke when the method is called.
3418 </summary>
3419 <param name="action">The callback method to invoke.</param>
3420 <example>
3421 The following example specifies a callback to set a boolean
3422 value that can be used later:
3423 <code>
3424 var called = false;
3425 mock.Setup(x => x.Execute())
3426 .Callback(() => called = true);
3427 </code>
3428 </example>
3429 </member>
3430 <member name="M:Moq.Language.ICallback.Callback``1(System.Action{``0})">
3431 <summary>
3432 Specifies a callback to invoke when the method is called that receives the original arguments.
3433 </summary>
3434 <typeparam name="T">The argument type of the invoked method.</typeparam>
3435 <param name="action">The callback method to invoke.</param>
3436 <example>
3437 Invokes the given callback with the concrete invocation argument value.
3438 <para>
3439 Notice how the specific string argument is retrieved by simply declaring
3440 it as part of the lambda expression for the callback:
3441 </para>
3442 <code>
3443 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
3444 .Callback((string command) => Console.WriteLine(command));
3445 </code>
3446 </example>
3447 </member>
3448 <member name="T:Moq.Language.ISetupConditionResult`1">
3449 <summary>
3450 Implements the fluent API.
3451 </summary>
3452 </member>
3453 <member name="M:Moq.Language.ISetupConditionResult`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
3454 <summary>
3455 The expectation will be considered only in the former condition.
3456 </summary>
3457 <param name="expression"></param>
3458 <returns></returns>
3459 </member>
3460 <member name="M:Moq.Language.ISetupConditionResult`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
3461 <summary>
3462 The expectation will be considered only in the former condition.
3463 </summary>
3464 <typeparam name="TResult"></typeparam>
3465 <param name="expression"></param>
3466 <returns></returns>
3467 </member>
3468 <member name="M:Moq.Language.ISetupConditionResult`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
3469 <summary>
3470 Setups the get.
3471 </summary>
3472 <typeparam name="TProperty">The type of the property.</typeparam>
3473 <param name="expression">The expression.</param>
3474 <returns></returns>
3475 </member>
3476 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet``1(System.Action{`0})">
3477 <summary>
3478 Setups the set.
3479 </summary>
3480 <typeparam name="TProperty">The type of the property.</typeparam>
3481 <param name="setterExpression">The setter expression.</param>
3482 <returns></returns>
3483 </member>
3484 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet(System.Action{`0})">
3485 <summary>
3486 Setups the set.
3487 </summary>
3488 <param name="setterExpression">The setter expression.</param>
3489 <returns></returns>
3490 </member>
3491 <member name="T:Moq.MockRepository">
3492 <summary>
3493 Utility repository class to use to construct multiple
3494 mocks when consistent verification is
3495 desired for all of them.
3496 </summary>
3497 <remarks>
3498 If multiple mocks will be created during a test, passing
3499 the desired <see cref="T:Moq.MockBehavior"/> (if different than the
3500 <see cref="F:Moq.MockBehavior.Default"/> or the one
3501 passed to the repository constructor) and later verifying each
3502 mock can become repetitive and tedious.
3503 <para>
3504 This repository class helps in that scenario by providing a
3505 simplified creation of multiple mocks with a default
3506 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling
3507 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
3508 </para>
3509 </remarks>
3510 <example group="repository">
3511 The following is a straightforward example on how to
3512 create and automatically verify strict mocks using a <see cref="T:Moq.MockRepository"/>:
3513 <code>
3514 var repository = new MockRepository(MockBehavior.Strict);
3515
3516 var foo = repository.Create&lt;IFoo&gt;();
3517 var bar = repository.Create&lt;IBar&gt;();
3518
3519 // no need to call Verifiable() on the setup
3520 // as we'll be validating all of them anyway.
3521 foo.Setup(f =&gt; f.Do());
3522 bar.Setup(b =&gt; b.Redo());
3523
3524 // exercise the mocks here
3525
3526 repository.VerifyAll();
3527 // At this point all setups are already checked
3528 // and an optional MockException might be thrown.
3529 // Note also that because the mocks are strict, any invocation
3530 // that doesn't have a matching setup will also throw a MockException.
3531 </code>
3532 The following examples shows how to setup the repository
3533 to create loose mocks and later verify only verifiable setups:
3534 <code>
3535 var repository = new MockRepository(MockBehavior.Loose);
3536
3537 var foo = repository.Create&lt;IFoo&gt;();
3538 var bar = repository.Create&lt;IBar&gt;();
3539
3540 // this setup will be verified when we verify the repository
3541 foo.Setup(f =&gt; f.Do()).Verifiable();
3542
3543 // this setup will NOT be verified
3544 foo.Setup(f =&gt; f.Calculate());
3545
3546 // this setup will be verified when we verify the repository
3547 bar.Setup(b =&gt; b.Redo()).Verifiable();
3548
3549 // exercise the mocks here
3550 // note that because the mocks are Loose, members
3551 // called in the interfaces for which no matching
3552 // setups exist will NOT throw exceptions,
3553 // and will rather return default values.
3554
3555 repository.Verify();
3556 // At this point verifiable setups are already checked
3557 // and an optional MockException might be thrown.
3558 </code>
3559 The following examples shows how to setup the repository with a
3560 default strict behavior, overriding that default for a
3561 specific mock:
3562 <code>
3563 var repository = new MockRepository(MockBehavior.Strict);
3564
3565 // this particular one we want loose
3566 var foo = repository.Create&lt;IFoo&gt;(MockBehavior.Loose);
3567 var bar = repository.Create&lt;IBar&gt;();
3568
3569 // specify setups
3570
3571 // exercise the mocks here
3572
3573 repository.Verify();
3574 </code>
3575 </example>
3576 <seealso cref="T:Moq.MockBehavior"/>
3577 </member>
3578 <member name="T:Moq.MockFactory">
3579 <summary>
3580 Utility factory class to use to construct multiple
3581 mocks when consistent verification is
3582 desired for all of them.
3583 </summary>
3584 <remarks>
3585 If multiple mocks will be created during a test, passing
3586 the desired <see cref="T:Moq.MockBehavior"/> (if different than the
3587 <see cref="F:Moq.MockBehavior.Default"/> or the one
3588 passed to the factory constructor) and later verifying each
3589 mock can become repetitive and tedious.
3590 <para>
3591 This factory class helps in that scenario by providing a
3592 simplified creation of multiple mocks with a default
3593 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling
3594 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
3595 </para>
3596 </remarks>
3597 <example group="factory">
3598 The following is a straightforward example on how to
3599 create and automatically verify strict mocks using a <see cref="T:Moq.MockFactory"/>:
3600 <code>
3601 var factory = new MockFactory(MockBehavior.Strict);
3602
3603 var foo = factory.Create&lt;IFoo&gt;();
3604 var bar = factory.Create&lt;IBar&gt;();
3605
3606 // no need to call Verifiable() on the setup
3607 // as we'll be validating all of them anyway.
3608 foo.Setup(f =&gt; f.Do());
3609 bar.Setup(b =&gt; b.Redo());
3610
3611 // exercise the mocks here
3612
3613 factory.VerifyAll();
3614 // At this point all setups are already checked
3615 // and an optional MockException might be thrown.
3616 // Note also that because the mocks are strict, any invocation
3617 // that doesn't have a matching setup will also throw a MockException.
3618 </code>
3619 The following examples shows how to setup the factory
3620 to create loose mocks and later verify only verifiable setups:
3621 <code>
3622 var factory = new MockFactory(MockBehavior.Loose);
3623
3624 var foo = factory.Create&lt;IFoo&gt;();
3625 var bar = factory.Create&lt;IBar&gt;();
3626
3627 // this setup will be verified when we verify the factory
3628 foo.Setup(f =&gt; f.Do()).Verifiable();
3629
3630 // this setup will NOT be verified
3631 foo.Setup(f =&gt; f.Calculate());
3632
3633 // this setup will be verified when we verify the factory
3634 bar.Setup(b =&gt; b.Redo()).Verifiable();
3635
3636 // exercise the mocks here
3637 // note that because the mocks are Loose, members
3638 // called in the interfaces for which no matching
3639 // setups exist will NOT throw exceptions,
3640 // and will rather return default values.
3641
3642 factory.Verify();
3643 // At this point verifiable setups are already checked
3644 // and an optional MockException might be thrown.
3645 </code>
3646 The following examples shows how to setup the factory with a
3647 default strict behavior, overriding that default for a
3648 specific mock:
3649 <code>
3650 var factory = new MockFactory(MockBehavior.Strict);
3651
3652 // this particular one we want loose
3653 var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
3654 var bar = factory.Create&lt;IBar&gt;();
3655
3656 // specify setups
3657
3658 // exercise the mocks here
3659
3660 factory.Verify();
3661 </code>
3662 </example>
3663 <seealso cref="T:Moq.MockBehavior"/>
3664 </member>
3665 <member name="M:Moq.MockFactory.#ctor(Moq.MockBehavior)">
3666 <summary>
3667 Initializes the factory with the given <paramref name="defaultBehavior"/>
3668 for newly created mocks from the factory.
3669 </summary>
3670 <param name="defaultBehavior">The behavior to use for mocks created
3671 using the <see cref="M:Moq.MockFactory.Create``1"/> factory method if not overriden
3672 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
3673 </member>
3674 <member name="M:Moq.MockFactory.Create``1">
3675 <summary>
3676 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
3677 specified at factory construction time.
3678 </summary>
3679 <typeparam name="T">Type to mock.</typeparam>
3680 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
3681 <example ignore="true">
3682 <code>
3683 var factory = new MockFactory(MockBehavior.Strict);
3684
3685 var foo = factory.Create&lt;IFoo&gt;();
3686 // use mock on tests
3687
3688 factory.VerifyAll();
3689 </code>
3690 </example>
3691 </member>
3692 <member name="M:Moq.MockFactory.Create``1(System.Object[])">
3693 <summary>
3694 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
3695 specified at factory construction time and with the
3696 the given constructor arguments for the class.
3697 </summary>
3698 <remarks>
3699 The mock will try to find the best match constructor given the
3700 constructor arguments, and invoke that to initialize the instance.
3701 This applies only to classes, not interfaces.
3702 </remarks>
3703 <typeparam name="T">Type to mock.</typeparam>
3704 <param name="args">Constructor arguments for mocked classes.</param>
3705 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
3706 <example ignore="true">
3707 <code>
3708 var factory = new MockFactory(MockBehavior.Default);
3709
3710 var mock = factory.Create&lt;MyBase&gt;("Foo", 25, true);
3711 // use mock on tests
3712
3713 factory.Verify();
3714 </code>
3715 </example>
3716 </member>
3717 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior)">
3718 <summary>
3719 Creates a new mock with the given <paramref name="behavior"/>.
3720 </summary>
3721 <typeparam name="T">Type to mock.</typeparam>
3722 <param name="behavior">Behavior to use for the mock, which overrides
3723 the default behavior specified at factory construction time.</param>
3724 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
3725 <example group="factory">
3726 The following example shows how to create a mock with a different
3727 behavior to that specified as the default for the factory:
3728 <code>
3729 var factory = new MockFactory(MockBehavior.Strict);
3730
3731 var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
3732 </code>
3733 </example>
3734 </member>
3735 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior,System.Object[])">
3736 <summary>
3737 Creates a new mock with the given <paramref name="behavior"/>
3738 and with the the given constructor arguments for the class.
3739 </summary>
3740 <remarks>
3741 The mock will try to find the best match constructor given the
3742 constructor arguments, and invoke that to initialize the instance.
3743 This applies only to classes, not interfaces.
3744 </remarks>
3745 <typeparam name="T">Type to mock.</typeparam>
3746 <param name="behavior">Behavior to use for the mock, which overrides
3747 the default behavior specified at factory construction time.</param>
3748 <param name="args">Constructor arguments for mocked classes.</param>
3749 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
3750 <example group="factory">
3751 The following example shows how to create a mock with a different
3752 behavior to that specified as the default for the factory, passing
3753 constructor arguments:
3754 <code>
3755 var factory = new MockFactory(MockBehavior.Default);
3756
3757 var mock = factory.Create&lt;MyBase&gt;(MockBehavior.Strict, "Foo", 25, true);
3758 </code>
3759 </example>
3760 </member>
3761 <member name="M:Moq.MockFactory.CreateMock``1(Moq.MockBehavior,System.Object[])">
3762 <summary>
3763 Implements creation of a new mock within the factory.
3764 </summary>
3765 <typeparam name="T">Type to mock.</typeparam>
3766 <param name="behavior">The behavior for the new mock.</param>
3767 <param name="args">Optional arguments for the construction of the mock.</param>
3768 </member>
3769 <member name="M:Moq.MockFactory.Verify">
3770 <summary>
3771 Verifies all verifiable expectations on all mocks created
3772 by this factory.
3773 </summary>
3774 <seealso cref="M:Moq.Mock.Verify"/>
3775 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
3776 </member>
3777 <member name="M:Moq.MockFactory.VerifyAll">
3778 <summary>
3779 Verifies all verifiable expectations on all mocks created
3780 by this factory.
3781 </summary>
3782 <seealso cref="M:Moq.Mock.Verify"/>
3783 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
3784 </member>
3785 <member name="M:Moq.MockFactory.VerifyMocks(System.Action{Moq.Mock})">
3786 <summary>
3787 Invokes <paramref name="verifyAction"/> for each mock
3788 in <see cref="P:Moq.MockFactory.Mocks"/>, and accumulates the resulting
3789 <see cref="T:Moq.MockVerificationException"/> that might be
3790 thrown from the action.
3791 </summary>
3792 <param name="verifyAction">The action to execute against
3793 each mock.</param>
3794 </member>
3795 <member name="P:Moq.MockFactory.CallBase">
3796 <summary>
3797 Whether the base member virtual implementation will be called
3798 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
3799 </summary>
3800 </member>
3801 <member name="P:Moq.MockFactory.DefaultValue">
3802 <summary>
3803 Specifies the behavior to use when returning default values for
3804 unexpected invocations on loose mocks.
3805 </summary>
3806 </member>
3807 <member name="P:Moq.MockFactory.Mocks">
3808 <summary>
3809 Gets the mocks that have been created by this factory and
3810 that will get verified together.
3811 </summary>
3812 </member>
3813 <member name="M:Moq.MockRepository.#ctor(Moq.MockBehavior)">
3814 <summary>
3815 Initializes the repository with the given <paramref name="defaultBehavior"/>
3816 for newly created mocks from the repository.
3817 </summary>
3818 <param name="defaultBehavior">The behavior to use for mocks created
3819 using the <see cref="M:Moq.MockFactory.Create``1"/> repository method if not overriden
3820 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
3821 </member>
3822 <member name="M:Moq.MockRepository.Of``1">
3823 <summary>
3824 Access the universe of mocks of the given type, to retrieve those
3825 that behave according to the LINQ query specification.
3826 </summary>
3827 <typeparam name="T">The type of the mocked object to query.</typeparam>
3828 </member>
3829 <member name="M:Moq.MockRepository.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
3830 <summary>
3831 Access the universe of mocks of the given type, to retrieve those
3832 that behave according to the LINQ query specification.
3833 </summary>
3834 <param name="specification">The predicate with the setup expressions.</param>
3835 <typeparam name="T">The type of the mocked object to query.</typeparam>
3836 </member>
3837 <member name="M:Moq.MockRepository.OneOf``1">
3838 <summary>
3839 Creates an mock object of the indicated type.
3840 </summary>
3841 <typeparam name="T">The type of the mocked object.</typeparam>
3842 <returns>The mocked object created.</returns>
3843 </member>
3844 <member name="M:Moq.MockRepository.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
3845 <summary>
3846 Creates an mock object of the indicated type.
3847 </summary>
3848 <param name="specification">The predicate with the setup expressions.</param>
3849 <typeparam name="T">The type of the mocked object.</typeparam>
3850 <returns>The mocked object created.</returns>
3851 </member>
3852 <member name="M:Moq.MockRepository.CreateMockQuery``1">
3853 <summary>
3854 Creates the mock query with the underlying queriable implementation.
3855 </summary>
3856 </member>
3857 <member name="M:Moq.MockRepository.CreateQueryable``1">
3858 <summary>
3859 Wraps the enumerator inside a queryable.
3860 </summary>
3861 </member>
3862 <member name="M:Moq.MockRepository.CreateMocks``1">
3863 <summary>
3864 Method that is turned into the actual call from .Query{T}, to
3865 transform the queryable query into a normal enumerable query.
3866 This method is never used directly by consumers.
3867 </summary>
3868 </member>
3869 <member name="T:Moq.Language.Flow.ISetup`1">
3870 <summary>
3871 Implements the fluent API.
3872 </summary>
3873 </member>
3874 <member name="T:Moq.Protected.ProtectedExtension">
3875 <summary>
3876 Enables the <c>Protected()</c> method on <see cref="T:Moq.Mock`1"/>,
3877 allowing setups to be set for protected members by using their
3878 name as a string, rather than strong-typing them which is not possible
3879 due to their visibility.
3880 </summary>
3881 </member>
3882 <member name="M:Moq.Protected.ProtectedExtension.Protected``1(Moq.Mock{``0})">
3883 <summary>
3884 Enable protected setups for the mock.
3885 </summary>
3886 <typeparam name="T">Mocked object type. Typically omitted as it can be inferred from the mock instance.</typeparam>
3887 <param name="mock">The mock to set the protected setups on.</param>
3888 </member>
3889 <member name="T:Moq.MockDefaultValueProvider">
3890 <summary>
3891 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
3892 for non-mockeable types, and mocks for all other types (interfaces and
3893 non-sealed classes) that can be mocked.
3894 </summary>
3895 </member>
3896 <member name="T:Moq.EmptyDefaultValueProvider">
3897 <summary>
3898 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
3899 for invocations that do not have setups or return values, with loose mocks.
3900 This is the default behavior for a mock.
3901 </summary>
3902 </member>
3903 <member name="T:Moq.IDefaultValueProvider">
3904 <summary>
3905 Interface to be implemented by classes that determine the
3906 default value of non-expected invocations.
3907 </summary>
3908 </member>
3909 <member name="M:Moq.IDefaultValueProvider.DefineDefault``1(``0)">
3910 <summary>
3911 Defines the default value to return in all the methods returning <typeparamref name="T"/>.
3912 </summary><typeparam name="T">The type of the return value.</typeparam><param name="value">The value to set as default.</param>
3913 </member>
3914 <member name="M:Moq.IDefaultValueProvider.ProvideDefault(System.Reflection.MethodInfo)">
3915 <summary>
3916 Provides a value for the given member and arguments.
3917 </summary><param name="member">
3918 The member to provide a default value for.
3919 </param>
3920 </member>
3921 <member name="T:Moq.Interceptor">
3922 <summary>
3923 Implements the actual interception and method invocation for
3924 all mocks.
3925 </summary>
3926 </member>
3927 <member name="M:Moq.Interceptor.GetEventFromName(System.String)">
3928 <summary>
3929 Get an eventInfo for a given event name. Search type ancestors depth first if necessary.
3930 </summary>
3931 <param name="eventName">Name of the event, with the set_ or get_ prefix already removed</param>
3932 </member>
3933 <member name="M:Moq.Interceptor.GetAncestorTypes(System.Type)">
3934 <summary>
3935 Given a type return all of its ancestors, both types and interfaces.
3936 </summary>
3937 <param name="initialType">The type to find immediate ancestors of</param>
3938 </member>
3939 <member name="T:Moq.IMocked`1">
3940 <summary>
3941 Implemented by all generated mock object instances.
3942 </summary>
3943 </member>
3944 <member name="T:Moq.IMocked">
3945 <summary>
3946 Implemented by all generated mock object instances.
3947 </summary>
3948 </member>
3949 <member name="P:Moq.IMocked.Mock">
3950 <summary>
3951 Reference the Mock that contains this as the <c>mock.Object</c> value.
3952 </summary>
3953 </member>
3954 <member name="P:Moq.IMocked`1.Mock">
3955 <summary>
3956 Reference the Mock that contains this as the <c>mock.Object</c> value.
3957 </summary>
3958 </member>
3959 <member name="T:Moq.FluentMockContext">
3960 <summary>
3961 Tracks the current mock and interception context.
3962 </summary>
3963 </member>
3964 <member name="P:Moq.FluentMockContext.IsActive">
3965 <summary>
3966 Having an active fluent mock context means that the invocation
3967 is being performed in "trial" mode, just to gather the
3968 target method and arguments that need to be matched later
3969 when the actual invocation is made.
3970 </summary>
3971 </member>
3972 <member name="T:Moq.ExpressionStringBuilder">
3973 <summary>
3974 The intention of <see cref="T:Moq.ExpressionStringBuilder"/> is to create a more readable
3975 string representation for the failure message.
3976 </summary>
3977 </member>
3978 <member name="T:Moq.DefaultValue">
3979 <summary>
3980 Determines the way default values are generated
3981 calculated for loose mocks.
3982 </summary>
3983 </member>
3984 <member name="F:Moq.DefaultValue.Empty">
3985 <summary>
3986 Default behavior, which generates empty values for
3987 value types (i.e. default(int)), empty array and
3988 enumerables, and nulls for all other reference types.
3989 </summary>
3990 </member>
3991 <member name="F:Moq.DefaultValue.Mock">
3992 <summary>
3993 Whenever the default value generated by <see cref="F:Moq.DefaultValue.Empty"/>
3994 is null, replaces this value with a mock (if the type
3995 can be mocked).
3996 </summary>
3997 <remarks>
3998 For sealed classes, a null value will be generated.
3999 </remarks>
4000 </member>
4001 <member name="T:Moq.Properties.Resources">
4002 <summary>
4003 A strongly-typed resource class, for looking up localized strings, etc.
4004 </summary>
4005 </member>
4006 <member name="P:Moq.Properties.Resources.ResourceManager">
4007 <summary>
4008 Returns the cached ResourceManager instance used by this class.
4009 </summary>
4010 </member>
4011 <member name="P:Moq.Properties.Resources.Culture">
4012 <summary>
4013 Overrides the current thread's CurrentUICulture property for all
4014 resource lookups using this strongly typed resource class.
4015 </summary>
4016 </member>
4017 <member name="P:Moq.Properties.Resources.AlreadyInitialized">
4018 <summary>
4019 Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that..
4020 </summary>
4021 </member>
4022 <member name="P:Moq.Properties.Resources.ArgumentCannotBeEmpty">
4023 <summary>
4024 Looks up a localized string similar to Value cannot be an empty string..
4025 </summary>
4026 </member>
4027 <member name="P:Moq.Properties.Resources.AsMustBeInterface">
4028 <summary>
4029 Looks up a localized string similar to Can only add interfaces to the mock..
4030 </summary>
4031 </member>
4032 <member name="P:Moq.Properties.Resources.CantSetReturnValueForVoid">
4033 <summary>
4034 Looks up a localized string similar to Can&apos;t set return value for void method {0}..
4035 </summary>
4036 </member>
4037 <member name="P:Moq.Properties.Resources.ConstructorArgsForInterface">
4038 <summary>
4039 Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks..
4040 </summary>
4041 </member>
4042 <member name="P:Moq.Properties.Resources.ConstructorNotFound">
4043 <summary>
4044 Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type..
4045 </summary>
4046 </member>
4047 <member name="P:Moq.Properties.Resources.EventNofFound">
4048 <summary>
4049 Looks up a localized string similar to Could not locate event for attach or detach method {0}..
4050 </summary>
4051 </member>
4052 <member name="P:Moq.Properties.Resources.FieldsNotSupported">
4053 <summary>
4054 Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead..
4055 </summary>
4056 </member>
4057 <member name="P:Moq.Properties.Resources.InvalidMockClass">
4058 <summary>
4059 Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. .
4060 </summary>
4061 </member>
4062 <member name="P:Moq.Properties.Resources.InvalidMockGetType">
4063 <summary>
4064 Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it&apos;s not the main type of the mock or any of its additional interfaces.
4065 Please cast the argument to one of the supported types: {1}.
4066 Remember that there&apos;s no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed..
4067 </summary>
4068 </member>
4069 <member name="P:Moq.Properties.Resources.LinqBinaryOperatorNotSupported">
4070 <summary>
4071 Looks up a localized string similar to The equals (&quot;==&quot; or &quot;=&quot; in VB) and the conditional &apos;and&apos; (&quot;&amp;&amp;&quot; or &quot;AndAlso&quot; in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}.
4072 </summary>
4073 </member>
4074 <member name="P:Moq.Properties.Resources.LinqMethodNotSupported">
4075 <summary>
4076 Looks up a localized string similar to LINQ method &apos;{0}&apos; not supported..
4077 </summary>
4078 </member>
4079 <member name="P:Moq.Properties.Resources.LinqMethodNotVirtual">
4080 <summary>
4081 Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}.
4082 </summary>
4083 </member>
4084 <member name="P:Moq.Properties.Resources.MemberMissing">
4085 <summary>
4086 Looks up a localized string similar to Member {0}.{1} does not exist..
4087 </summary>
4088 </member>
4089 <member name="P:Moq.Properties.Resources.MethodIsPublic">
4090 <summary>
4091 Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead:
4092 mock.Setup(x =&gt; x.{1}());
4093 .
4094 </summary>
4095 </member>
4096 <member name="P:Moq.Properties.Resources.MockExceptionMessage">
4097 <summary>
4098 Looks up a localized string similar to {0} invocation failed with mock behavior {1}.
4099 {2}.
4100 </summary>
4101 </member>
4102 <member name="P:Moq.Properties.Resources.MoreThanNCalls">
4103 <summary>
4104 Looks up a localized string similar to Expected only {0} calls to {1}..
4105 </summary>
4106 </member>
4107 <member name="P:Moq.Properties.Resources.MoreThanOneCall">
4108 <summary>
4109 Looks up a localized string similar to Expected only one call to {0}..
4110 </summary>
4111 </member>
4112 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeast">
4113 <summary>
4114 Looks up a localized string similar to {0}
4115 Expected invocation on the mock at least {2} times, but was {4} times: {1}.
4116 </summary>
4117 </member>
4118 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeastOnce">
4119 <summary>
4120 Looks up a localized string similar to {0}
4121 Expected invocation on the mock at least once, but was never performed: {1}.
4122 </summary>
4123 </member>
4124 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMost">
4125 <summary>
4126 Looks up a localized string similar to {0}
4127 Expected invocation on the mock at most {3} times, but was {4} times: {1}.
4128 </summary>
4129 </member>
4130 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMostOnce">
4131 <summary>
4132 Looks up a localized string similar to {0}
4133 Expected invocation on the mock at most once, but was {4} times: {1}.
4134 </summary>
4135 </member>
4136 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenExclusive">
4137 <summary>
4138 Looks up a localized string similar to {0}
4139 Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}.
4140 </summary>
4141 </member>
4142 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenInclusive">
4143 <summary>
4144 Looks up a localized string similar to {0}
4145 Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}.
4146 </summary>
4147 </member>
4148 <member name="P:Moq.Properties.Resources.NoMatchingCallsExactly">
4149 <summary>
4150 Looks up a localized string similar to {0}
4151 Expected invocation on the mock exactly {2} times, but was {4} times: {1}.
4152 </summary>
4153 </member>
4154 <member name="P:Moq.Properties.Resources.NoMatchingCallsNever">
4155 <summary>
4156 Looks up a localized string similar to {0}
4157 Expected invocation on the mock should never have been performed, but was {4} times: {1}.
4158 </summary>
4159 </member>
4160 <member name="P:Moq.Properties.Resources.NoMatchingCallsOnce">
4161 <summary>
4162 Looks up a localized string similar to {0}
4163 Expected invocation on the mock once, but was {4} times: {1}.
4164 </summary>
4165 </member>
4166 <member name="P:Moq.Properties.Resources.NoSetup">
4167 <summary>
4168 Looks up a localized string similar to All invocations on the mock must have a corresponding setup..
4169 </summary>
4170 </member>
4171 <member name="P:Moq.Properties.Resources.ObjectInstanceNotMock">
4172 <summary>
4173 Looks up a localized string similar to Object instance was not created by Moq..
4174 </summary>
4175 </member>
4176 <member name="P:Moq.Properties.Resources.OutExpressionMustBeConstantValue">
4177 <summary>
4178 Looks up a localized string similar to Out expression must evaluate to a constant value..
4179 </summary>
4180 </member>
4181 <member name="P:Moq.Properties.Resources.PropertyGetNotFound">
4182 <summary>
4183 Looks up a localized string similar to Property {0}.{1} does not have a getter..
4184 </summary>
4185 </member>
4186 <member name="P:Moq.Properties.Resources.PropertyMissing">
4187 <summary>
4188 Looks up a localized string similar to Property {0}.{1} does not exist..
4189 </summary>
4190 </member>
4191 <member name="P:Moq.Properties.Resources.PropertyNotReadable">
4192 <summary>
4193 Looks up a localized string similar to Property {0}.{1} is write-only..
4194 </summary>
4195 </member>
4196 <member name="P:Moq.Properties.Resources.PropertyNotWritable">
4197 <summary>
4198 Looks up a localized string similar to Property {0}.{1} is read-only..
4199 </summary>
4200 </member>
4201 <member name="P:Moq.Properties.Resources.PropertySetNotFound">
4202 <summary>
4203 Looks up a localized string similar to Property {0}.{1} does not have a setter..
4204 </summary>
4205 </member>
4206 <member name="P:Moq.Properties.Resources.RaisedUnassociatedEvent">
4207 <summary>
4208 Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object..
4209 </summary>
4210 </member>
4211 <member name="P:Moq.Properties.Resources.RefExpressionMustBeConstantValue">
4212 <summary>
4213 Looks up a localized string similar to Ref expression must evaluate to a constant value..
4214 </summary>
4215 </member>
4216 <member name="P:Moq.Properties.Resources.ReturnValueRequired">
4217 <summary>
4218 Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it..
4219 </summary>
4220 </member>
4221 <member name="P:Moq.Properties.Resources.SetupLambda">
4222 <summary>
4223 Looks up a localized string similar to A lambda expression is expected as the argument to It.Is&lt;T&gt;..
4224 </summary>
4225 </member>
4226 <member name="P:Moq.Properties.Resources.SetupNever">
4227 <summary>
4228 Looks up a localized string similar to Invocation {0} should not have been made..
4229 </summary>
4230 </member>
4231 <member name="P:Moq.Properties.Resources.SetupNotMethod">
4232 <summary>
4233 Looks up a localized string similar to Expression is not a method invocation: {0}.
4234 </summary>
4235 </member>
4236 <member name="P:Moq.Properties.Resources.SetupNotProperty">
4237 <summary>
4238 Looks up a localized string similar to Expression is not a property access: {0}.
4239 </summary>
4240 </member>
4241 <member name="P:Moq.Properties.Resources.SetupNotSetter">
4242 <summary>
4243 Looks up a localized string similar to Expression is not a property setter invocation..
4244 </summary>
4245 </member>
4246 <member name="P:Moq.Properties.Resources.SetupOnNonMemberMethod">
4247 <summary>
4248 Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}.
4249 </summary>
4250 </member>
4251 <member name="P:Moq.Properties.Resources.SetupOnNonOverridableMember">
4252 <summary>
4253 Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}.
4254 </summary>
4255 </member>
4256 <member name="P:Moq.Properties.Resources.TypeNotImplementInterface">
4257 <summary>
4258 Looks up a localized string similar to Type {0} does not implement required interface {1}.
4259 </summary>
4260 </member>
4261 <member name="P:Moq.Properties.Resources.TypeNotInheritFromType">
4262 <summary>
4263 Looks up a localized string similar to Type {0} does not from required type {1}.
4264 </summary>
4265 </member>
4266 <member name="P:Moq.Properties.Resources.UnexpectedPublicProperty">
4267 <summary>
4268 Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as:
4269 mock.Setup(x =&gt; x.{1}).Returns(value);
4270 mock.SetupGet(x =&gt; x.{1}).Returns(value); //equivalent to previous one
4271 mock.SetupSet(x =&gt; x.{1}).Callback(callbackDelegate);
4272 .
4273 </summary>
4274 </member>
4275 <member name="P:Moq.Properties.Resources.UnsupportedExpression">
4276 <summary>
4277 Looks up a localized string similar to Unsupported expression: {0}.
4278 </summary>
4279 </member>
4280 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateExpression">
4281 <summary>
4282 Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}..
4283 </summary>
4284 </member>
4285 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateType">
4286 <summary>
4287 Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}..
4288 </summary>
4289 </member>
4290 <member name="P:Moq.Properties.Resources.UnsupportedMatcherParamsForSetter">
4291 <summary>
4292 Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters..
4293 </summary>
4294 </member>
4295 <member name="P:Moq.Properties.Resources.UnsupportedMember">
4296 <summary>
4297 Looks up a localized string similar to Member {0} is not supported for protected mocking..
4298 </summary>
4299 </member>
4300 <member name="P:Moq.Properties.Resources.UnsupportedNonStaticMatcherForSetter">
4301 <summary>
4302 Looks up a localized string similar to Setter expression can only use static custom matchers..
4303 </summary>
4304 </member>
4305 <member name="P:Moq.Properties.Resources.VerficationFailed">
4306 <summary>
4307 Looks up a localized string similar to The following setups were not matched:
4308 {0}.
4309 </summary>
4310 </member>
4311 <member name="P:Moq.Properties.Resources.VerifyOnNonVirtualMember">
4312 <summary>
4313 Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}.
4314 </summary>
4315 </member>
4316 <member name="T:Moq.MockExtensions">
4317 <summary>
4318 Provides additional methods on mocks.
4319 </summary>
4320 <devdoc>
4321 Provided as extension methods as they confuse the compiler
4322 with the overloads taking Action.
4323 </devdoc>
4324 </member>
4325 <member name="M:Moq.MockExtensions.SetupSet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
4326 <summary>
4327 Specifies a setup on the mocked type for a call to
4328 to a property setter, regardless of its value.
4329 </summary>
4330 <remarks>
4331 If more than one setup is set for the same property setter,
4332 the latest one wins and is the one that will be executed.
4333 </remarks>
4334 <typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam>
4335 <typeparam name="T">Type of the mock.</typeparam>
4336 <param name="mock">The target mock for the setup.</param>
4337 <param name="expression">Lambda expression that specifies the property setter.</param>
4338 <example group="setups">
4339 <code>
4340 mock.SetupSet(x =&gt; x.Suspended);
4341 </code>
4342 </example>
4343 <devdoc>
4344 This method is not legacy, but must be on an extension method to avoid
4345 confusing the compiler with the new Action syntax.
4346 </devdoc>
4347 </member>
4348 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
4349 <summary>
4350 Verifies that a property has been set on the mock, regarless of its value.
4351 </summary>
4352 <example group="verification">
4353 This example assumes that the mock has been used,
4354 and later we want to verify that a given invocation
4355 with specific parameters was performed:
4356 <code>
4357 var mock = new Mock&lt;IWarehouse&gt;();
4358 // exercise mock
4359 //...
4360 // Will throw if the test code didn't set the IsClosed property.
4361 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
4362 </code>
4363 </example>
4364 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
4365 <param name="expression">Expression to verify.</param>
4366 <param name="mock">The mock instance.</param>
4367 <typeparam name="T">Mocked type.</typeparam>
4368 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
4369 be inferred from the expression's return type.</typeparam>
4370 </member>
4371 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.String)">
4372 <summary>
4373 Verifies that a property has been set on the mock, specifying a failure
4374 error message.
4375 </summary>
4376 <example group="verification">
4377 This example assumes that the mock has been used,
4378 and later we want to verify that a given invocation
4379 with specific parameters was performed:
4380 <code>
4381 var mock = new Mock&lt;IWarehouse&gt;();
4382 // exercise mock
4383 //...
4384 // Will throw if the test code didn't set the IsClosed property.
4385 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
4386 </code>
4387 </example>
4388 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
4389 <param name="expression">Expression to verify.</param>
4390 <param name="failMessage">Message to show if verification fails.</param>
4391 <param name="mock">The mock instance.</param>
4392 <typeparam name="T">Mocked type.</typeparam>
4393 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
4394 be inferred from the expression's return type.</typeparam>
4395 </member>
4396 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},Moq.Times)">
4397 <summary>
4398 Verifies that a property has been set on the mock, regardless
4399 of the value but only the specified number of times.
4400 </summary>
4401 <example group="verification">
4402 This example assumes that the mock has been used,
4403 and later we want to verify that a given invocation
4404 with specific parameters was performed:
4405 <code>
4406 var mock = new Mock&lt;IWarehouse&gt;();
4407 // exercise mock
4408 //...
4409 // Will throw if the test code didn't set the IsClosed property.
4410 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
4411 </code>
4412 </example>
4413 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
4414 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
4415 <paramref name="times"/>.</exception>
4416 <param name="mock">The mock instance.</param>
4417 <typeparam name="T">Mocked type.</typeparam>
4418 <param name="times">The number of times a method is allowed to be called.</param>
4419 <param name="expression">Expression to verify.</param>
4420 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
4421 be inferred from the expression's return type.</typeparam>
4422 </member>
4423 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},Moq.Times,System.String)">
4424 <summary>
4425 Verifies that a property has been set on the mock, regardless
4426 of the value but only the specified number of times, and specifying a failure
4427 error message.
4428 </summary>
4429 <example group="verification">
4430 This example assumes that the mock has been used,
4431 and later we want to verify that a given invocation
4432 with specific parameters was performed:
4433 <code>
4434 var mock = new Mock&lt;IWarehouse&gt;();
4435 // exercise mock
4436 //...
4437 // Will throw if the test code didn't set the IsClosed property.
4438 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
4439 </code>
4440 </example>
4441 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
4442 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
4443 <paramref name="times"/>.</exception>
4444 <param name="mock">The mock instance.</param>
4445 <typeparam name="T">Mocked type.</typeparam>
4446 <param name="times">The number of times a method is allowed to be called.</param>
4447 <param name="failMessage">Message to show if verification fails.</param>
4448 <param name="expression">Expression to verify.</param>
4449 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
4450 be inferred from the expression's return type.</typeparam>
4451 </member>
4452 <member name="T:Moq.MockException">
4453 <summary>
4454 Exception thrown by mocks when setups are not matched,
4455 the mock is not properly setup, etc.
4456 </summary>
4457 <remarks>
4458 A distinct exception type is provided so that exceptions
4459 thrown by the mock can be differentiated in tests that
4460 expect other exceptions to be thrown (i.e. ArgumentException).
4461 <para>
4462 Richer exception hierarchy/types are not provided as
4463 tests typically should <b>not</b> catch or expect exceptions
4464 from the mocks. These are typically the result of changes
4465 in the tested class or its collaborators implementation, and
4466 result in fixes in the mock setup so that they dissapear and
4467 allow the test to pass.
4468 </para>
4469 </remarks>
4470 </member>
4471 <member name="T:Moq.MockException.ExceptionReason">
4472 <summary>
4473 Made internal as it's of no use for
4474 consumers, but it's important for
4475 our own tests.
4476 </summary>
4477 </member>
4478 <member name="T:Moq.MockVerificationException">
4479 <devdoc>
4480 Used by the mock factory to accumulate verification
4481 failures.
4482 </devdoc>
4483 </member>
4484 <member name="T:Moq.Language.ISetupSequentialResult`1">
4485 <summary>
4486 Language for ReturnSequence
4487 </summary>
4488 </member>
4489 <member name="M:Moq.Language.ISetupSequentialResult`1.Returns(`0)">
4490 <summary>
4491 Returns value
4492 </summary>
4493 </member>
4494 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws(System.Exception)">
4495 <summary>
4496 Throws an exception
4497 </summary>
4498 </member>
4499 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws``1">
4500 <summary>
4501 Throws an exception
4502 </summary>
4503 </member>
4504 <member name="T:Moq.Range">
4505 <summary>
4506 Kind of range to use in a filter specified through
4507 <see cref="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)"/>.
4508 </summary>
4509 </member>
4510 <member name="F:Moq.Range.Inclusive">
4511 <summary>
4512 The range includes the <c>to</c> and
4513 <c>from</c> values.
4514 </summary>
4515 </member>
4516 <member name="F:Moq.Range.Exclusive">
4517 <summary>
4518 The range does not include the <c>to</c> and
4519 <c>from</c> values.
4520 </summary>
4521 </member>
4522 <member name="T:Moq.MockLegacyExtensions">
4523 <summary>
4524 Provides legacy API members as extensions so that
4525 existing code continues to compile, but new code
4526 doesn't see then.
4527 </summary>
4528 </member>
4529 <member name="M:Moq.MockLegacyExtensions.SetupSet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)">
4530 <summary>
4531 Obsolete.
4532 </summary>
4533 </member>
4534 <member name="M:Moq.MockLegacyExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)">
4535 <summary>
4536 Obsolete.
4537 </summary>
4538 </member>
4539 <member name="M:Moq.MockLegacyExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1,System.String)">
4540 <summary>
4541 Obsolete.
4542 </summary>
4543 </member>
4544 <member name="F:Moq.Linq.FluentMockVisitor.isFirst">
4545 <summary>
4546 The first method call or member access will be the
4547 last segment of the expression (depth-first traversal),
4548 which is the one we have to Setup rather than FluentMock.
4549 And the last one is the one we have to Mock.Get rather
4550 than FluentMock.
4551 </summary>
4552 </member>
4553 <member name="M:Moq.ExpressionExtensions.ToLambda(System.Linq.Expressions.Expression)">
4554 <summary>
4555 Casts the expression to a lambda expression, removing
4556 a cast if there's any.
4557 </summary>
4558 </member>
4559 <member name="M:Moq.ExpressionExtensions.ToMethodCall(System.Linq.Expressions.LambdaExpression)">
4560 <summary>
4561 Casts the body of the lambda expression to a <see cref="T:System.Linq.Expressions.MethodCallExpression"/>.
4562 </summary>
4563 <exception cref="T:System.ArgumentException">If the body is not a method call.</exception>
4564 </member>
4565 <member name="M:Moq.ExpressionExtensions.ToPropertyInfo(System.Linq.Expressions.LambdaExpression)">
4566 <summary>
4567 Converts the body of the lambda expression into the <see cref="T:System.Reflection.PropertyInfo"/> referenced by it.
4568 </summary>
4569 </member>
4570 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.LambdaExpression)">
4571 <summary>
4572 Checks whether the body of the lambda expression is a property access.
4573 </summary>
4574 </member>
4575 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.Expression)">
4576 <summary>
4577 Checks whether the expression is a property access.
4578 </summary>
4579 </member>
4580 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.LambdaExpression)">
4581 <summary>
4582 Checks whether the body of the lambda expression is a property indexer, which is true
4583 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose
4584 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/>
4585 equal to <see langword="true"/>.
4586 </summary>
4587 </member>
4588 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.Expression)">
4589 <summary>
4590 Checks whether the expression is a property indexer, which is true
4591 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose
4592 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/>
4593 equal to <see langword="true"/>.
4594 </summary>
4595 </member>
4596 <member name="M:Moq.ExpressionExtensions.CastTo``1(System.Linq.Expressions.Expression)">
4597 <summary>
4598 Creates an expression that casts the given expression to the <typeparamref name="T"/>
4599 type.
4600 </summary>
4601 </member>
4602 <member name="M:Moq.ExpressionExtensions.ToStringFixed(System.Linq.Expressions.Expression)">
4603 <devdoc>
4604 TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583
4605 is fixed.
4606 </devdoc>
4607 </member>
4608 <member name="T:Moq.Times">
4609 <summary>
4610 Defines the number of invocations allowed by a mocked method.
4611 </summary>
4612 </member>
4613 <member name="M:Moq.Times.AtLeast(System.Int32)">
4614 <summary>
4615 Specifies that a mocked method should be invoked <paramref name="callCount"/> times as minimum.
4616 </summary><param name="callCount">The minimun number of times.</param><returns>An object defining the allowed number of invocations.</returns>
4617 </member>
4618 <member name="M:Moq.Times.AtLeastOnce">
4619 <summary>
4620 Specifies that a mocked method should be invoked one time as minimum.
4621 </summary><returns>An object defining the allowed number of invocations.</returns>
4622 </member>
4623 <member name="M:Moq.Times.AtMost(System.Int32)">
4624 <summary>
4625 Specifies that a mocked method should be invoked <paramref name="callCount"/> time as maximun.
4626 </summary><param name="callCount">The maximun number of times.</param><returns>An object defining the allowed number of invocations.</returns>
4627 </member>
4628 <member name="M:Moq.Times.AtMostOnce">
4629 <summary>
4630 Specifies that a mocked method should be invoked one time as maximun.
4631 </summary><returns>An object defining the allowed number of invocations.</returns>
4632 </member>
4633 <member name="M:Moq.Times.Between(System.Int32,System.Int32,Moq.Range)">
4634 <summary>
4635 Specifies that a mocked method should be invoked between <paramref name="callCountFrom"/> and
4636 <paramref name="callCountTo"/> times.
4637 </summary><param name="callCountFrom">The minimun number of times.</param><param name="callCountTo">The maximun number of times.</param><param name="rangeKind">
4638 The kind of range. See <see cref="T:Moq.Range"/>.
4639 </param><returns>An object defining the allowed number of invocations.</returns>
4640 </member>
4641 <member name="M:Moq.Times.Exactly(System.Int32)">
4642 <summary>
4643 Specifies that a mocked method should be invoked exactly <paramref name="callCount"/> times.
4644 </summary><param name="callCount">The times that a method or property can be called.</param><returns>An object defining the allowed number of invocations.</returns>
4645 </member>
4646 <member name="M:Moq.Times.Never">
4647 <summary>
4648 Specifies that a mocked method should not be invoked.
4649 </summary><returns>An object defining the allowed number of invocations.</returns>
4650 </member>
4651 <member name="M:Moq.Times.Once">
4652 <summary>
4653 Specifies that a mocked method should be invoked exactly one time.
4654 </summary><returns>An object defining the allowed number of invocations.</returns>
4655 </member>
4656 <member name="M:Moq.Times.Equals(System.Object)">
4657 <summary>
4658 Determines whether the specified <see cref="T:System.Object"/> is equal to this instance.
4659 </summary><param name="obj">
4660 The <see cref="T:System.Object"/> to compare with this instance.
4661 </param><returns>
4662 <c>true</c> if the specified <see cref="T:System.Object"/> is equal to this instance; otherwise, <c>false</c>.
4663 </returns>
4664 </member>
4665 <member name="M:Moq.Times.GetHashCode">
4666 <summary>
4667 Returns a hash code for this instance.
4668 </summary><returns>
4669 A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
4670 </returns>
4671 </member>
4672 <member name="M:Moq.Times.op_Equality(Moq.Times,Moq.Times)">
4673 <summary>
4674 Determines whether two specified <see cref="T:Moq.Times"/> objects have the same value.
4675 </summary><param name="left">
4676 The first <see cref="T:Moq.Times"/>.
4677 </param><param name="right">
4678 The second <see cref="T:Moq.Times"/>.
4679 </param><returns>
4680 <c>true</c> if the value of left is the same as the value of right; otherwise, <c>false</c>.
4681 </returns>
4682 </member>
4683 <member name="M:Moq.Times.op_Inequality(Moq.Times,Moq.Times)">
4684 <summary>
4685 Determines whether two specified <see cref="T:Moq.Times"/> objects have different values.
4686 </summary><param name="left">
4687 The first <see cref="T:Moq.Times"/>.
4688 </param><param name="right">
4689 The second <see cref="T:Moq.Times"/>.
4690 </param><returns>
4691 <c>true</c> if the value of left is different from the value of right; otherwise, <c>false</c>.
4692 </returns>
4693 </member>
4694 <member name="T:Moq.SequenceExtensions">
4695 <summary>
4696 Helper for sequencing return values in the same method.
4697 </summary>
4698 </member>
4699 <member name="M:Moq.SequenceExtensions.SetupSequence``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
4700 <summary>
4701 Return a sequence of values, once per call.
4702 </summary>
4703 </member>
4704 <member name="T:Moq.Linq.MockQueryable`1">
4705 <summary>
4706 A default implementation of IQueryable for use with QueryProvider
4707 </summary>
4708 </member>
4709 <member name="M:Moq.Linq.MockQueryable`1.#ctor(System.Linq.Expressions.MethodCallExpression)">
4710 <summary>
4711 The <paramref name="underlyingCreateMocks"/> is a
4712 static method that returns an IQueryable of Mocks of T which is used to
4713 apply the linq specification to.
4714 </summary>
4715 </member>
4716 <member name="T:Moq.Language.ICallbackSetter`1">
4717 <summary>
4718 Defines the <c>Callback</c> verb for property setter setups.
4719 </summary>
4720 <typeparam name="TProperty">Type of the property.</typeparam>
4721 </member>
4722 <member name="M:Moq.Language.ICallbackSetter`1.Callback(System.Action{`0})">
4723 <summary>
4724 Specifies a callback to invoke when the property is set that receives the
4725 property value being set.
4726 </summary>
4727 <param name="action">Callback method to invoke.</param>
4728 <example>
4729 Invokes the given callback with the property value being set.
4730 <code>
4731 mock.SetupSet(x => x.Suspended)
4732 .Callback((bool state) => Console.WriteLine(state));
4733 </code>
4734 </example>
4735 </member>
4736 <member name="T:Moq.Language.Flow.ISetupSetter`2">
4737 <summary>
4738 Implements the fluent API.
4739 </summary>
4740 </member>
4741 <member name="T:Moq.Protected.ItExpr">
4742 <summary>
4743 Allows the specification of a matching condition for an
4744 argument in a protected member setup, rather than a specific
4745 argument value. "ItExpr" refers to the argument being matched.
4746 </summary>
4747 <remarks>
4748 <para>Use this variant of argument matching instead of
4749 <see cref="T:Moq.It"/> for protected setups.</para>
4750 This class allows the setup to match a method invocation
4751 with an arbitrary value, with a value in a specified range, or
4752 even one that matches a given predicate, or null.
4753 </remarks>
4754 </member>
4755 <member name="M:Moq.Protected.ItExpr.IsNull``1">
4756 <summary>
4757 Matches a null value of the given <typeparamref name="TValue"/> type.
4758 </summary>
4759 <remarks>
4760 Required for protected mocks as the null value cannot be used
4761 directly as it prevents proper method overload selection.
4762 </remarks>
4763 <example>
4764 <code>
4765 // Throws an exception for a call to Remove with a null string value.
4766 mock.Protected()
4767 .Setup("Remove", ItExpr.IsNull&lt;string&gt;())
4768 .Throws(new InvalidOperationException());
4769 </code>
4770 </example>
4771 <typeparam name="TValue">Type of the value.</typeparam>
4772 </member>
4773 <member name="M:Moq.Protected.ItExpr.IsAny``1">
4774 <summary>
4775 Matches any value of the given <typeparamref name="TValue"/> type.
4776 </summary>
4777 <remarks>
4778 Typically used when the actual argument value for a method
4779 call is not relevant.
4780 </remarks>
4781 <example>
4782 <code>
4783 // Throws an exception for a call to Remove with any string value.
4784 mock.Protected()
4785 .Setup("Remove", ItExpr.IsAny&lt;string&gt;())
4786 .Throws(new InvalidOperationException());
4787 </code>
4788 </example>
4789 <typeparam name="TValue">Type of the value.</typeparam>
4790 </member>
4791 <member name="M:Moq.Protected.ItExpr.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
4792 <summary>
4793 Matches any value that satisfies the given predicate.
4794 </summary>
4795 <typeparam name="TValue">Type of the argument to check.</typeparam>
4796 <param name="match">The predicate used to match the method argument.</param>
4797 <remarks>
4798 Allows the specification of a predicate to perform matching
4799 of method call arguments.
4800 </remarks>
4801 <example>
4802 This example shows how to return the value <c>1</c> whenever the argument to the
4803 <c>Do</c> method is an even number.
4804 <code>
4805 mock.Protected()
4806 .Setup("Do", ItExpr.Is&lt;int&gt;(i =&gt; i % 2 == 0))
4807 .Returns(1);
4808 </code>
4809 This example shows how to throw an exception if the argument to the
4810 method is a negative number:
4811 <code>
4812 mock.Protected()
4813 .Setup("GetUser", ItExpr.Is&lt;int&gt;(i =&gt; i &lt; 0))
4814 .Throws(new ArgumentException());
4815 </code>
4816 </example>
4817 </member>
4818 <member name="M:Moq.Protected.ItExpr.IsInRange``1(``0,``0,Moq.Range)">
4819 <summary>
4820 Matches any value that is in the range specified.
4821 </summary>
4822 <typeparam name="TValue">Type of the argument to check.</typeparam>
4823 <param name="from">The lower bound of the range.</param>
4824 <param name="to">The upper bound of the range.</param>
4825 <param name="rangeKind">The kind of range. See <see cref="T:Moq.Range"/>.</param>
4826 <example>
4827 The following example shows how to expect a method call
4828 with an integer argument within the 0..100 range.
4829 <code>
4830 mock.Protected()
4831 .Setup("HasInventory",
4832 ItExpr.IsAny&lt;string&gt;(),
4833 ItExpr.IsInRange(0, 100, Range.Inclusive))
4834 .Returns(false);
4835 </code>
4836 </example>
4837 </member>
4838 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String)">
4839 <summary>
4840 Matches a string argument if it matches the given regular expression pattern.
4841 </summary>
4842 <param name="regex">The pattern to use to match the string argument value.</param>
4843 <example>
4844 The following example shows how to expect a call to a method where the
4845 string argument matches the given regular expression:
4846 <code>
4847 mock.Protected()
4848 .Setup("Check", ItExpr.IsRegex("[a-z]+"))
4849 .Returns(1);
4850 </code>
4851 </example>
4852 </member>
4853 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)">
4854 <summary>
4855 Matches a string argument if it matches the given regular expression pattern.
4856 </summary>
4857 <param name="regex">The pattern to use to match the string argument value.</param>
4858 <param name="options">The options used to interpret the pattern.</param>
4859 <example>
4860 The following example shows how to expect a call to a method where the
4861 string argument matches the given regular expression, in a case insensitive way:
4862 <code>
4863 mock.Protected()
4864 .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase))
4865 .Returns(1);
4866 </code>
4867 </example>
4868 </member>
4869 <member name="T:Moq.MockSequence">
4870 <summary>
4871 Helper class to setup a full trace between many mocks
4872 </summary>
4873 </member>
4874 <member name="M:Moq.MockSequence.#ctor">
4875 <summary>
4876 Initialize a trace setup
4877 </summary>
4878 </member>
4879 <member name="P:Moq.MockSequence.Cyclic">
4880 <summary>
4881 Allow sequence to be repeated
4882 </summary>
4883 </member>
4884 <member name="T:Moq.MockSequenceHelper">
4885 <summary>
4886 define nice api
4887 </summary>
4888 </member>
4889 <member name="M:Moq.MockSequenceHelper.InSequence``1(Moq.Mock{``0},Moq.MockSequence)">
4890 <summary>
4891 Perform an expectation in the trace.
4892 </summary>
4893 </member>
4894 <member name="M:Moq.Guard.NotNull``1(System.Linq.Expressions.Expression{System.Func{``0}},``0)">
4895 <summary>
4896 Ensures the given <paramref name="value"/> is not null.
4897 Throws <see cref="T:System.ArgumentNullException"/> otherwise.
4898 </summary>
4899 </member>
4900 <member name="M:Moq.Guard.NotNullOrEmpty(System.Linq.Expressions.Expression{System.Func{System.String}},System.String)">
4901 <summary>
4902 Ensures the given string <paramref name="value"/> is not null or empty.
4903 Throws <see cref="T:System.ArgumentNullException"/> in the first case, or
4904 <see cref="T:System.ArgumentException"/> in the latter.
4905 </summary>
4906 </member>
4907 <member name="M:Moq.Guard.NotOutOfRangeInclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)">
4908 <summary>
4909 Checks an argument to ensure it is in the specified range including the edges.
4910 </summary>
4911 <typeparam name="T">Type of the argument to check, it must be an <see cref="T:System.IComparable"/> type.
4912 </typeparam>
4913 <param name="reference">The expression containing the name of the argument.</param>
4914 <param name="value">The argument value to check.</param>
4915 <param name="from">The minimun allowed value for the argument.</param>
4916 <param name="to">The maximun allowed value for the argument.</param>
4917 </member>
4918 <member name="M:Moq.Guard.NotOutOfRangeExclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)">
4919 <summary>
4920 Checks an argument to ensure it is in the specified range excluding the edges.
4921 </summary>
4922 <typeparam name="T">Type of the argument to check, it must be an <see cref="T:System.IComparable"/> type.
4923 </typeparam>
4924 <param name="reference">The expression containing the name of the argument.</param>
4925 <param name="value">The argument value to check.</param>
4926 <param name="from">The minimun allowed value for the argument.</param>
4927 <param name="to">The maximun allowed value for the argument.</param>
4928 </member>
4929 <member name="T:Moq.Match">
4930 <summary>
4931 Allows creation custom value matchers that can be used on setups and verification,
4932 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument
4933 matching rules.
4934 </summary><remarks>
4935 See also <see cref="T:Moq.Match`1"/>.
4936 </remarks>
4937 </member>
4938 <member name="M:Moq.Match.Matcher``1">
4939 <devdoc>
4940 Provided for the sole purpose of rendering the delegate passed to the
4941 matcher constructor if no friendly render lambda is provided.
4942 </devdoc>
4943 </member>
4944 <member name="M:Moq.Match.Create``1(System.Predicate{``0})">
4945 <summary>
4946 Initializes the match with the condition that
4947 will be checked in order to match invocation
4948 values.
4949 </summary><param name="condition">The condition to match against actual values.</param><remarks>
4950 <seealso cref="T:Moq.Match`1"/>
4951 </remarks>
4952 </member>
4953 <member name="M:Moq.Match.Create``1(System.Predicate{``0},System.Linq.Expressions.Expression{System.Func{``0}})">
4954 <!-- No matching elements were found for the following include tag --><include file="Match.xdoc" path="docs/doc[@for=&quot;Match.Create{T}(condition,renderExpression&quot;]/*"/>
4955 </member>
4956 <member name="M:Moq.Match.SetLastMatch``1(Moq.Match{``0})">
4957 <devdoc>
4958 This method is used to set an expression as the last matcher invoked,
4959 which is used in the SetupSet to allow matchers in the prop = value
4960 delegate expression. This delegate is executed in "fluent" mode in
4961 order to capture the value being set, and construct the corresponding
4962 methodcall.
4963 This is also used in the MatcherFactory for each argument expression.
4964 This method ensures that when we execute the delegate, we
4965 also track the matcher that was invoked, so that when we create the
4966 methodcall we build the expression using it, rather than the null/default
4967 value returned from the actual invocation.
4968 </devdoc>
4969 </member>
4970 <member name="T:Moq.Match`1">
4971 <summary>
4972 Allows creation custom value matchers that can be used on setups and verification,
4973 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument
4974 matching rules.
4975 </summary><typeparam name="T">Type of the value to match.</typeparam><remarks>
4976 The argument matching is used to determine whether a concrete
4977 invocation in the mock matches a given setup. This
4978 matching mechanism is fully extensible.
4979 </remarks><example>
4980 Creating a custom matcher is straightforward. You just need to create a method
4981 that returns a value from a call to <see cref="M:Moq.Match.Create``1(System.Predicate{``0})"/> with
4982 your matching condition and optional friendly render expression:
4983 <code>
4984 [Matcher]
4985 public Order IsBigOrder()
4986 {
4987 return Match&lt;Order&gt;.Create(
4988 o =&gt; o.GrandTotal &gt;= 5000,
4989 /* a friendly expression to render on failures */
4990 () =&gt; IsBigOrder());
4991 }
4992 </code>
4993 This method can be used in any mock setup invocation:
4994 <code>
4995 mock.Setup(m =&gt; m.Submit(IsBigOrder()).Throws&lt;UnauthorizedAccessException&gt;();
4996 </code>
4997 At runtime, Moq knows that the return value was a matcher (note that the method MUST be
4998 annotated with the [Matcher] attribute in order to determine this) and
4999 evaluates your predicate with the actual value passed into your predicate.
5000 <para>
5001 Another example might be a case where you want to match a lists of orders
5002 that contains a particular one. You might create matcher like the following:
5003 </para>
5004 <code>
5005 public static class Orders
5006 {
5007 [Matcher]
5008 public static IEnumerable&lt;Order&gt; Contains(Order order)
5009 {
5010 return Match&lt;IEnumerable&lt;Order&gt;&gt;.Create(orders =&gt; orders.Contains(order));
5011 }
5012 }
5013 </code>
5014 Now we can invoke this static method instead of an argument in an
5015 invocation:
5016 <code>
5017 var order = new Order { ... };
5018 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5019
5020 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5021 .Throws&lt;ArgumentException&gt;();
5022 </code>
5023 </example>
5024 </member>
5025 <member name="T:Moq.Mocks">
5026 <summary>
5027 Allows querying the universe of mocks for those that behave
5028 according to the LINQ query specification.
5029 </summary>
5030 <devdoc>
5031 This entry-point into Linq to Mocks is the only one in the root Moq
5032 namespace to ease discovery. But to get all the mocking extension
5033 methods on Object, a using of Moq.Linq must be done, so that the
5034 polluting of the intellisense for all objects is an explicit opt-in.
5035 </devdoc>
5036 </member>
5037 <member name="M:Moq.Mocks.Of``1">
5038 <summary>
5039 Access the universe of mocks of the given type, to retrieve those
5040 that behave according to the LINQ query specification.
5041 </summary>
5042 <typeparam name="T">The type of the mocked object to query.</typeparam>
5043 </member>
5044 <member name="M:Moq.Mocks.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5045 <summary>
5046 Access the universe of mocks of the given type, to retrieve those
5047 that behave according to the LINQ query specification.
5048 </summary>
5049 <param name="specification">The predicate with the setup expressions.</param>
5050 <typeparam name="T">The type of the mocked object to query.</typeparam>
5051 </member>
5052 <member name="M:Moq.Mocks.OneOf``1">
5053 <summary>
5054 Creates an mock object of the indicated type.
5055 </summary>
5056 <typeparam name="T">The type of the mocked object.</typeparam>
5057 <returns>The mocked object created.</returns>
5058 </member>
5059 <member name="M:Moq.Mocks.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5060 <summary>
5061 Creates an mock object of the indicated type.
5062 </summary>
5063 <param name="specification">The predicate with the setup expressions.</param>
5064 <typeparam name="T">The type of the mocked object.</typeparam>
5065 <returns>The mocked object created.</returns>
5066 </member>
5067 <member name="M:Moq.Mocks.CreateMockQuery``1">
5068 <summary>
5069 Creates the mock query with the underlying queriable implementation.
5070 </summary>
5071 </member>
5072 <member name="M:Moq.Mocks.CreateQueryable``1">
5073 <summary>
5074 Wraps the enumerator inside a queryable.
5075 </summary>
5076 </member>
5077 <member name="M:Moq.Mocks.CreateMocks``1">
5078 <summary>
5079 Method that is turned into the actual call from .Query{T}, to
5080 transform the queryable query into a normal enumerable query.
5081 This method is never used directly by consumers.
5082 </summary>
5083 </member>
5084 <member name="M:Moq.Mocks.SetPropery``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)">
5085 <summary>
5086 Extension method used to support Linq-like setup properties that are not virtual but do have
5087 a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :)
5088 </summary>
5089 </member>
5090 <member name="T:Moq.QueryableMockExtensions">
5091 <summary>
5092 Helper extensions that are used by the query translator.
5093 </summary>
5094 </member>
5095 <member name="M:Moq.QueryableMockExtensions.FluentMock``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
5096 <summary>
5097 Retrieves a fluent mock from the given setup expression.
5098 </summary>
5099 </member>
5100 </members>
5101 </doc>