-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a92b93
commit 9e49af0
Showing
5 changed files
with
13 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/Pure.DI.Templates/Templates/Pure.DI.Template.ClassLibrary/GlobalUsings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
global using System; | ||
global using System.Diagnostics; | ||
global using Pure.DI; | ||
global using static Pure.DI.Lifetime; |
11 changes: 2 additions & 9 deletions
11
src/Pure.DI.Templates/Templates/Pure.DI.Template.ClassLibrary/_CompositionName_.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
using System.Diagnostics; | ||
using Pure.DI; | ||
using static Pure.DI.Lifetime; | ||
namespace _PureDIProjectName_; | ||
|
||
namespace _PureDIProjectName_; | ||
|
||
/// <summary> | ||
/// Pure.DI Composition Setup. Please see <see href="https://github.com/DevTeam/Pure.DI.Solution">this</see> example. | ||
/// </summary> | ||
internal class $(CompositionName) | ||
{ | ||
[Conditional("DI")] | ||
void Setup() => | ||
private void Setup() => | ||
DI.Setup(nameof($(CompositionName)), CompositionKind.Global) | ||
.Bind().As(Singleton).To<ConsoleAdapter>(); | ||
} |
4 changes: 3 additions & 1 deletion
4
src/Pure.DI.Templates/Templates/Pure.DI.Template.ConsoleApp/GlobalUsings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
global using _PureDIProjectName_; | ||
global using System; | ||
global using System.Diagnostics; | ||
global using System.Diagnostics; | ||
global using Pure.DI; | ||
global using static Pure.DI.Lifetime; |
11 changes: 3 additions & 8 deletions
11
src/Pure.DI.Templates/Templates/Pure.DI.Template.ConsoleApp/_CompositionName_.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
using Pure.DI; | ||
using static Pure.DI.Lifetime; | ||
namespace _PureDIProjectName_; | ||
|
||
namespace _PureDIProjectName_; | ||
|
||
/// <summary> | ||
/// Pure.DI Composition Setup. Please see <see href="https://github.com/DevTeam/Pure.DI.Solution">this</see> example. | ||
/// </summary> | ||
internal partial class $(CompositionName) | ||
{ | ||
[Conditional("DI")] | ||
void Setup() => | ||
private void Setup() => | ||
DI.Setup(nameof($(CompositionName))) | ||
.Arg<string[]>("args") | ||
.Bind().As(Singleton).To<ConsoleAdapter>() | ||
.Root<Program>("Root"); | ||
} |