Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Jan 21, 2025
1 parent 0623c7a commit 06815ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion readme/global-compositions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ class MyGlobalComposition
class MyGlobalComposition2
{
static void Setup() =>
DI.Setup(kind: Global)
DI.Setup("Some name", kind: Global)
.Hint(Hint.OnCannotResolve, "Off")
.Hint(Hint.OnCannotResolvePartial, "On")
.Hint(Hint.OnNewRoot, "Off")
.Hint(Hint.OnNewRootPartial, "On")
.Hint(Hint.ToString, "On");
}
```
Expand Down
3 changes: 2 additions & 1 deletion readme/service-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using Pure.DI.MS;
using Shouldly;
using Microsoft.Extensions.DependencyInjection;
using Pure.DI;
using Pure.DI.MS;

var composition = new Composition();
var serviceCollection = composition.ServiceCollection;
Expand Down Expand Up @@ -38,8 +39,8 @@ partial class Composition : ServiceProviderFactory<Composition>
CreateServiceCollection(this);

static void Setup() =>

DI.Setup()
.DependsOn(Base)
.Bind<IDependency>("Dependency Key").As(Lifetime.Singleton).To<Dependency>()
.Bind<IService>().To<Service>()
.Root<IDependency>(tag: "Dependency Key")
Expand Down

0 comments on commit 06815ad

Please sign in to comment.