Merge branch 'master' of https://github.com/unitycontainer/examples
This commit is contained in:
Коммит
3d7a9beef5
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче