From feb35ab6933e95e8b8cf3972e668517d4239227c Mon Sep 17 00:00:00 2001 From: Eugene Sadovoi Date: Sat, 31 Mar 2018 16:10:56 -0400 Subject: [PATCH 1/2] Update FooUnityExtension.cs --- src/Extending Unity/BuildPlan/FooUnityExtension.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Extending Unity/BuildPlan/FooUnityExtension.cs b/src/Extending Unity/BuildPlan/FooUnityExtension.cs index 5572b67..a6cb7cf 100644 --- a/src/Extending Unity/BuildPlan/FooUnityExtension.cs +++ b/src/Extending Unity/BuildPlan/FooUnityExtension.cs @@ -13,6 +13,7 @@ namespace BuildPlanExample // applies to ALL resolutions of the type regardless of requested name. // In other words it creates 'Built-In' registration similar to Lazy or IEnumerable. Context.Policies.Set(typeof(IFoo<>), string.Empty, typeof(IBuildPlanPolicy), new FooBuildPlanPolicy()); + Context.Policies.Set(typeof(Foo<>), string.Empty, typeof(IBuildPlanPolicy), new FooBuildPlanPolicy()); // Optional } } } From ad646c115932e85153d62b34555050e93dec557c Mon Sep 17 00:00:00 2001 From: Eugene Sadovoi Date: Sat, 31 Mar 2018 16:11:33 -0400 Subject: [PATCH 2/2] Update FooUnityExtension.cs --- src/Extending Unity/BuildPlanCreator/FooUnityExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extending Unity/BuildPlanCreator/FooUnityExtension.cs b/src/Extending Unity/BuildPlanCreator/FooUnityExtension.cs index a451961..3f30340 100644 --- a/src/Extending Unity/BuildPlanCreator/FooUnityExtension.cs +++ b/src/Extending Unity/BuildPlanCreator/FooUnityExtension.cs @@ -13,7 +13,7 @@ namespace BuildPlanCreatorExample // applies to ALL resolutions of the type regardless of requested name. // In other words it creates 'Built-In' registration similar to Lazy or IEnumerable. Context.Policies.Set(typeof(IFoo<>), string.Empty, typeof(IBuildPlanCreatorPolicy), new FooBuildPlanCreatorPolicy(Context.Policies)); - Context.Policies.Set(typeof(Foo<>), string.Empty, typeof(IBuildPlanCreatorPolicy), new FooBuildPlanCreatorPolicy(Context.Policies)); + Context.Policies.Set(typeof(Foo<>), string.Empty, typeof(IBuildPlanCreatorPolicy), new FooBuildPlanCreatorPolicy(Context.Policies)); // Optional } } }