15
15
using Caliburn . Micro ;
16
16
using CommandLine ;
17
17
using Moryx . ClientFramework . Localization ;
18
+ using Moryx . Configuration ;
18
19
using Moryx . Container ;
19
20
using Moryx . Logging ;
20
21
using Moryx . Threading ;
24
25
namespace Moryx . ClientFramework . Kernel
25
26
{
26
27
/// <summary>
27
- /// Main class to create ClientFramwork UI's
28
+ /// Main class to create ClientFramework UIs
28
29
/// </summary>
29
30
public class HeartOfLead : HeartOfLead < DefaultCommandLineArguments >
30
31
{
@@ -35,16 +36,21 @@ public HeartOfLead(string[] args) : base(args)
35
36
}
36
37
37
38
/// <summary>
38
- /// Main class to create ClientFramwork UI's
39
+ /// Main class to create ClientFramework UIs
39
40
/// </summary>
40
- public class HeartOfLead < TCommandLineArguments > : ILoggingHost
41
+ public class HeartOfLead < TCommandLineArguments > : IApplicationRuntime , ILoggingHost
41
42
where TCommandLineArguments : DefaultCommandLineArguments
42
43
{
43
44
#region Fields and Properties
44
45
45
46
string ILoggingHost . Name => "ClientKernel" ;
47
+
48
+ /// <inheritdoc />
46
49
IModuleLogger ILoggingHost . Logger { get ; set ; }
47
50
51
+ /// <inheritdoc />
52
+ IContainer IApplicationRuntime . GlobalContainer => _container ;
53
+
48
54
/// <summary>
49
55
/// Returns the current <see cref="AppConfig"/>
50
56
/// </summary>
@@ -58,7 +64,7 @@ public class HeartOfLead<TCommandLineArguments> : ILoggingHost
58
64
/// <summary>
59
65
/// Flag if the HeartOfLead is initialized
60
66
/// </summary>
61
- public bool IsInitialied { get ; private set ; }
67
+ public bool IsInitialied { get ; private set ; } // TODO: Rename to IsInitialized in the next major
62
68
63
69
private GlobalContainer _container ;
64
70
private IKernelConfigManager _configManager ;
@@ -100,7 +106,7 @@ public void Initialize()
100
106
if ( IsInitialied )
101
107
throw new InvalidOperationException ( "HeartOfLead is already initialized!" ) ;
102
108
103
- // Initialize platfrom
109
+ // Initialize platform
104
110
WpfPlatform . SetProduct ( ) ;
105
111
106
112
// Attach this Application to the console.
@@ -331,7 +337,8 @@ private void LoadConfiguration()
331
337
332
338
// Configure config manager
333
339
_configManager = new KernelConfigManager { ConfigDirectory = CommandLineOptions . ConfigFolder } ;
334
- _container . SetInstance ( _configManager ) ;
340
+ _container . SetInstance < IKernelConfigManager > ( _configManager , "KernelConfigManager" ) ;
341
+ _container . SetInstance < IConfigManager > ( _configManager , "ConfigManager" ) ;
335
342
336
343
// Load global app config
337
344
AppConfig = _configManager . GetConfiguration < AppConfig > ( ) ;
0 commit comments