File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,18 @@ public override void PreBuildUp(IBuilderContext context)
39
39
40
40
if ( ! policy . RequireBuild && ( ( UnityContainer ) context . Container ) . RegistrationExists ( context . BuildKey . Type , context . BuildKey . Name ) )
41
41
{
42
+ var type = context . BuildKey . Type ;
43
+ var name = context . BuildKey . Name ;
44
+ var existing = context . Existing ;
45
+
42
46
context . Registration . Set ( typeof ( IBuildPlanPolicy ) ,
43
47
new DynamicMethodBuildPlan ( c =>
44
48
{
45
- ( ( BuilderContext ) c ) . ChildContext = new BuilderContext ( c , context . BuildKey . Type , context . BuildKey . Name ) ;
49
+ ( ( BuilderContext ) c ) . ChildContext = new BuilderContext ( c , type , name ) ;
46
50
( ( BuilderContext ) c . ChildContext ) . BuildUp ( ) ;
47
51
48
52
c . Existing = c . ChildContext . Existing ;
49
- c . BuildComplete = null != context . Existing ;
53
+ c . BuildComplete = null != existing ;
50
54
51
55
( ( BuilderContext ) c ) . ChildContext = null ;
52
56
} ) ) ;
You can’t perform that action at this time.
0 commit comments