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
code.AppendLine($"/// This method setups <paramref name=\"{Names.ChildScopeArgName}\"/> scope based on <paramref name=\"{Names.ParentScopeArgName}\"/>. This allows the <see cref=\"Lifetime.Scoped\"/> life time to be applied.");
@@ -41,11 +33,11 @@ public CompositionCode Build(CompositionCode composition)
code.AppendLine($"/// This constructor creates a new instance of <see cref=\"{composition.Name.ClassName}\"/> scope based on <paramref name=\"{Names.ParentScopeArgName}\"/>. This allows the <see cref=\"Lifetime.Scoped\"/> life time to be applied.");
@@ -62,7 +54,7 @@ public CompositionCode Build(CompositionCode composition)
62
54
using(code.CreateBlock())
63
55
{
64
56
code.AppendLine($"if ({Names.ObjectTypeName}.ReferenceEquals({Names.ParentScopeArgName}, null)) throw new {Names.SystemNamespace}ArgumentNullException(nameof({Names.ParentScopeArgName}));");
65
-
if(isScopeMethod)
57
+
if(composition.IsScopeMethod)
66
58
{
67
59
code.AppendLine($"if ({Names.ObjectTypeName}.ReferenceEquals({Names.ChildScopeArgName}, null)) throw new {Names.SystemNamespace}ArgumentNullException(nameof({Names.ChildScopeArgName}));");
68
60
if(composition.Singletons.Length>0)
@@ -78,35 +70,35 @@ public CompositionCode Build(CompositionCode composition)
0 commit comments