summaryrefslogtreecommitdiffstats
path: root/src/main/Program.cs
diff options
context:
space:
mode:
authorWouter Tinus <win.acme.simple@gmail.com>2020-10-02 06:04:59 +0200
committerGitHub <noreply@github.com>2020-10-02 06:04:59 +0200
commit160ed1ad546b1a71d0d2a1557073b40983964bfe (patch)
tree1e8a1afd3ee2e75c6ee5e10306fc6df1696b1470 /src/main/Program.cs
parentc662521de225e4dd4078fc6f0c2d1adfe323e368 (diff)
parentf0390cc9d8d8ffe82c4641f1e09e06d1ca9e12ae (diff)
downloadletsencrypt-win-simple-160ed1ad546b1a71d0d2a1557073b40983964bfe.zip
letsencrypt-win-simple-160ed1ad546b1a71d0d2a1557073b40983964bfe.tar.gz
letsencrypt-win-simple-160ed1ad546b1a71d0d2a1557073b40983964bfe.tar.bz2
Merge pull request #1672 from win-acme/2.1.11v2.1.11
2.1.11
Diffstat (limited to 'src/main/Program.cs')
-rw-r--r--src/main/Program.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/Program.cs b/src/main/Program.cs
index 0c1a2ba..09892e3 100644
--- a/src/main/Program.cs
+++ b/src/main/Program.cs
@@ -31,7 +31,7 @@ namespace PKISharp.WACS.Host
if (Environment.UserInteractive)
{
Console.WriteLine(" Press <Enter> to close");
- Console.ReadLine();
+ _ = Console.ReadLine();
}
return;
}
@@ -42,9 +42,9 @@ namespace PKISharp.WACS.Host
var original = Console.OutputEncoding;
try
- {
- // Load instance of the main class and start the program
- var wacs = new Wacs(container);
+ {
+ // Load instance of the main class and start the program
+ var wacs = container.Resolve<Wacs>(new TypedParameter(typeof(IContainer), container));
Environment.ExitCode = await wacs.Start();
}
catch (Exception ex)
@@ -107,6 +107,7 @@ namespace PKISharp.WACS.Host
_ = builder.RegisterType<ProxyService>().SingleInstance();
_ = builder.RegisterType<PasswordGenerator>().SingleInstance();
_ = builder.RegisterType<RenewalStoreDisk>().As<IRenewalStore>().SingleInstance();
+ _ = builder.RegisterType<VersionService>().SingleInstance();
pluginService.Configure(builder);
@@ -132,6 +133,8 @@ namespace PKISharp.WACS.Host
_ = builder.RegisterType<RenewalCreator>().SingleInstance();
_ = builder.Register(c => c.Resolve<IArgumentsService>().MainArguments).SingleInstance();
+ _ = builder.RegisterType<Wacs>();
+
return builder.Build();
}
}