You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Open in Visual Studio Code](https://open.vscode.dev/autofac/Autofac.Extras.Moq)
13
+
14
+
> :warning:**LOOKING FOR AN OWNER!** This package is largely in maintenance mode - if you'd like to help the community out and pull it out of maintenance mode, [come drop us a line!](https://github.com/autofac/Autofac.Extras.Moq/issues/50)
Copy file name to clipboardexpand all lines: src/Autofac.Extras.Moq/MoqRegistrationHandler.cs
+9-8
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,13 @@ internal class MoqRegistrationHandler : IRegistrationSource
19
19
privatereadonlyISet<Type>_createdServiceTypes;
20
20
privatereadonlyISet<Type>_mockedServiceTypes;
21
21
22
-
privatereadonlyMethodInfo_createMethod;
22
+
/// <summary>
23
+
/// This is <see cref="MockFactory.Create{T}()"/> with zero parameters. This
24
+
/// is important because it limits what can be auto-mocked. (MockFactory got
25
+
/// renamed to MockRepository but the method reference is still internally
26
+
/// on MockFactory.)
27
+
/// </summary>
28
+
privatereadonlyMethodInfo_createMethod=typeof(MockRepository).GetMethod(nameof(MockRepository.Create),Array.Empty<Type>())??thrownewNotSupportedException("Unable to bind to Create method.");
23
29
24
30
/// <summary>
25
31
/// Initializes a new instance of the <see cref="MoqRegistrationHandler"/> class.
@@ -30,11 +36,6 @@ public MoqRegistrationHandler(ISet<Type> createdServiceTypes, ISet<Type> mockedS
30
36
{
31
37
_createdServiceTypes=createdServiceTypes;
32
38
_mockedServiceTypes=mockedServiceTypes;
33
-
34
-
// This is MockRepository.Create<T>() with zero parameters. This is important because
0 commit comments