@@ -13,8 +13,8 @@ namespace LazyProxy.Autofac
13
13
public static class AutofacExtensions
14
14
{
15
15
/// <summary>
16
- /// Is used to register non open generic interface TFrom to class TTo by creation a lazy proxy at runtime.
17
- /// The real class To will be instantiated only after first method or property execution.
16
+ /// Registers a mapping of a non- open generic interface TFrom to the class TTo via run-time generated lazy
17
+ /// proxy type. The real class TTo will be instantiated only after first method or property execution.
18
18
/// </summary>
19
19
/// <param name="builder">The instance of the Autofac container builder.</param>
20
20
/// <param name="name">The registration name. Null if named registration is not required.</param>
@@ -29,8 +29,8 @@ public static IRegistrationBuilder<object, SimpleActivatorData, SingleRegistrati
29
29
builder . RegisterLazy ( typeof ( TFrom ) , typeof ( TTo ) , name , nonLazyRegistrationMutator ) ;
30
30
31
31
/// <summary>
32
- /// Is used to register non open generic interface TFrom to class TTo by creation a lazy proxy at runtime.
33
- /// The real class To will be instantiated only after first method or property execution.
32
+ /// Registers a mapping of a non- open generic interface TFrom to the class TTo via run-time generated lazy
33
+ /// proxy type. The real class TTo will be instantiated only after first method or property execution.
34
34
/// </summary>
35
35
/// <param name="typeFrom">The linked interface.</param>
36
36
/// <param name="typeTo">The linked class.</param>
@@ -42,7 +42,6 @@ public static IRegistrationBuilder<object, SimpleActivatorData, SingleRegistrati
42
42
RegisterLazy ( this ContainerBuilder builder , Type typeFrom , Type typeTo , string name = null ,
43
43
IRegistrationMutator nonLazyRegistrationMutator = null )
44
44
{
45
- // There is no way to constraint it on the compilation step.
46
45
if ( ! typeFrom . IsInterface )
47
46
{
48
47
throw new NotSupportedException (
@@ -68,8 +67,8 @@ public static IRegistrationBuilder<object, SimpleActivatorData, SingleRegistrati
68
67
}
69
68
70
69
/// <summary>
71
- /// Is used to register open generic interface TFrom to class TTo by creation a lazy proxy at runtime.
72
- /// The real class To will be instantiated only after first method or property execution.
70
+ /// Registers a mapping of an open generic interface TFrom to the class TTo via run-time generated lazy
71
+ /// proxy type. The real class TTo will be instantiated only after first method or property execution.
73
72
/// </summary>
74
73
/// <param name="typeFrom">The linked interface.</param>
75
74
/// <param name="typeTo">The linked class.</param>
@@ -81,7 +80,6 @@ public static IRegistrationBuilder<object, OpenGenericDelegateActivatorData, Dyn
81
80
RegisterGenericLazy ( this ContainerBuilder builder , Type typeFrom , Type typeTo , string name = null ,
82
81
IRegistrationMutator nonLazyRegistrationMutator = null )
83
82
{
84
- // There is no way to constraint it on the compilation step.
85
83
if ( ! typeFrom . IsInterface )
86
84
{
87
85
throw new NotSupportedException (
0 commit comments