-
Notifications
You must be signed in to change notification settings - Fork 0
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
d77e408
commit f5ca4e3
Showing
86 changed files
with
28 additions
and
1,908 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
ApplicationConsole.Tests/Dependency/ApplicationDependencyInjectionTests.cs
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
ApplicationConsole/Dependency/ApplicationDependencyInjection.cs
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,31 +1,23 @@ | ||
using ApplicationConsole.ConsoleHelpers; | ||
using ApplicationConsole.Dependency; | ||
using ApplicationConsole.Base; | ||
using ApplicationConsole.Errors; | ||
using Configuration.Dependency; | ||
using Microsoft.Extensions.Hosting; | ||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("TestHelpers")] // UnitTests | ||
using ConfigExtraction.Base; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using ReferenceExtraction.Base; | ||
|
||
// 1) Application Builder | ||
var host = Host.CreateDefaultBuilder(args); | ||
// Application startup - set up DI container | ||
var serviceProvider = new ServiceCollection() | ||
.AddApplicationConsoleServices() | ||
.AddConfigExtractionServices() | ||
.AddReferenceExtractionServices() | ||
.BuildServiceProvider(); | ||
|
||
// 2) Application Configuration | ||
host.SetupApplicationConfiguration<Program>(); | ||
|
||
// 3) Set up DI container | ||
host.SetupProjectServices(); | ||
var serviceProvider = host.Build().Services; | ||
|
||
// 4) Exception Handling | ||
// Exception Handling | ||
ExceptionMiddleware.SetupGlobalExceptionHandler(); | ||
serviceProvider.ValidateConfigurations(); | ||
|
||
// 5) User Input - build name, from, and to references | ||
var build = ConsoleHelpers.PromptUserInput("Please enter a name for the build"); | ||
var from = ConsoleHelpers.PromptUserInput("Please enter a reference to pull from"); | ||
var to = ConsoleHelpers.PromptUserInput("Please enter a reference to pull until"); | ||
|
||
// 6) Execute Diff Generation Logic | ||
await serviceProvider.ExecuteDiffGeneration(build, from, to).ConfigureAwait(false); | ||
// Call the application orchestration logic | ||
var applicationOrchestration = serviceProvider.GetRequiredService<ApplicationConsole.IOrchestration>(); | ||
applicationOrchestration.Process(); | ||
|
||
// 7) Ensure the Console remains open | ||
ConsoleHelpers.KeepConsoleOpen(); | ||
// Ensure the Console remains open | ||
Console.Write("\nPress Enter to exit..."); | ||
_ = Console.ReadLine(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.