diff --git a/src/Blobify.Tests/Blobify.Tests.csproj b/src/Blobify.Tests/Blobify.Tests.csproj
index 5cac195..ad74f27 100644
--- a/src/Blobify.Tests/Blobify.Tests.csproj
+++ b/src/Blobify.Tests/Blobify.Tests.csproj
@@ -29,7 +29,6 @@
-
diff --git a/src/Blobify/Blobify.csproj b/src/Blobify/Blobify.csproj
index a5712f8..4d38e5c 100644
--- a/src/Blobify/Blobify.csproj
+++ b/src/Blobify/Blobify.csproj
@@ -33,17 +33,9 @@
+
-
-
-
-
-
-
-
-
-
diff --git a/src/Blobify/Program.cs b/src/Blobify/Program.cs
index 1a26ca2..ca2b086 100644
--- a/src/Blobify/Program.cs
+++ b/src/Blobify/Program.cs
@@ -1,29 +1,13 @@
-using Microsoft.Extensions.Configuration.Memory;
-using Microsoft.Extensions.Configuration;
-using Spectre.Console.Cli.Extensions.DependencyInjection;
-using Azure.Core;
+using Azure.Core;
using Azure.Identity;
-using Blobify.Services.Storage;
-var serviceCollection = new ServiceCollection()
+public partial class Program
+{
+ static partial void AddServices(IServiceCollection services)
+ {
+ services
.AddCakeCore()
- .AddLogging(configure =>
- configure
- .AddSimpleConsole(opts =>
- {
- opts.TimestampFormat = "yyyy-MM-dd HH:mm:ss ";
- })
- .AddConfiguration(
- new ConfigurationBuilder()
- .Add(new MemoryConfigurationSource
- {
- InitialData = new Dictionary
- {
- { "LogLevel:System.Net.Http.HttpClient", "Warning" }
- }
- })
- .Build()
- ))
+
.AddSingleton(
async (tenantId, scope) =>
{
@@ -40,27 +24,18 @@
}
)
.AddSingleton()
- .AddSingleton();
-
-serviceCollection.AddHttpClient();
+ .AddSingleton();
-using var registrar = new DependencyInjectionRegistrar(serviceCollection);
-var app = new CommandApp(registrar);
+ services.AddHttpClient();
+ }
-app.Configure(
- config =>
+ // Configure commands
+ static partial void ConfigureApp(AppServiceConfig appServiceConfig)
{
- config.UseAssemblyInformationalVersion();
- config.SetApplicationName("blobify");
- config.ValidateExamples();
+ appServiceConfig.SetApplicationName("blobify");
- config.AddCommand("archive")
+ appServiceConfig.AddCommand("archive")
.WithDescription("Example Archive command.")
.WithExample(["archive", "inputpath", "storageaccountname"]);
-
- config.SetExceptionHandler(
- (ex, _) => AnsiConsole.WriteException(ex, ExceptionFormats.ShowLinks)
- );
- });
-
-return await app.RunAsync(args);
\ No newline at end of file
+ }
+}
\ No newline at end of file
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index 20a723e..cd4c239 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -9,23 +9,15 @@
+
-
-
-
-
-
-
-
-
-