Skip to content

Commit

Permalink
Version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-singular committed Jun 19, 2024
1 parent d77e408 commit f5ca4e3
Show file tree
Hide file tree
Showing 86 changed files with 28 additions and 1,908 deletions.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
##### Other files to ignore #####
# Don't track Published files or Coverage reports
# Don't track the user's config file, Published files or Coverage reports
config.json
PublishedFiles/
CoverageReport/
GeneratedReport.lnk
Expand Down
34 changes: 0 additions & 34 deletions ApplicationConsole.Tests/ApplicationConsole.Tests.csproj

This file was deleted.

This file was deleted.

20 changes: 3 additions & 17 deletions ApplicationConsole/ApplicationConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,13 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>938cd202-f3f5-4c4d-ae7d-eb4e826fac1a</UserSecretsId>
</PropertyGroup>

<!-- Package References -->
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

<!-- Project References -->
<ItemGroup>
<ProjectReference Include="..\Configuration\Configuration.csproj" />
<ProjectReference Include="..\ConfigExtraction\ConfigExtraction.csproj" />
<ProjectReference Include="..\DiffGeneration\DiffGeneration.csproj" />
<ProjectReference Include="..\ExtractReferences\ExtractReferences.csproj" />
</ItemGroup>

<!-- Copy Files to build path -->
<ItemGroup>
<None Update="config.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<ProjectReference Include="..\ReferenceExtraction\ReferenceExtraction.csproj" />
<ProjectReference Include="..\SharedDependencies\SharedDependencies.csproj" />
</ItemGroup>

</Project>
39 changes: 0 additions & 39 deletions ApplicationConsole/ConsoleHelpers/ConsoleHelpers.cs

This file was deleted.

63 changes: 0 additions & 63 deletions ApplicationConsole/Dependency/ApplicationDependencyInjection.cs

This file was deleted.

25 changes: 0 additions & 25 deletions ApplicationConsole/ErrorHandling/ErrorsHelpers.cs

This file was deleted.

33 changes: 0 additions & 33 deletions ApplicationConsole/ErrorHandling/ExceptionMiddleware.cs

This file was deleted.

File renamed without changes.
42 changes: 17 additions & 25 deletions ApplicationConsole/Program.cs
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();
29 changes: 0 additions & 29 deletions ApplicationConsole/config.json

This file was deleted.

Loading

0 comments on commit f5ca4e3

Please sign in to comment.