public static void Run <T>(string[] args) where T : ChoApplicationHost { if (_applicationHost != null) { return; } lock (_hostLock) { if (_applicationHost == null) { _applicationHost = Activator.CreateInstance <T>(); _applicationHost.Args = args; ChoApplicationHost.IsApplicationHostUsed = true; ChoFramework.Initialize(); ChoService.Initialize(); } } }
public static void Run(ChoApplicationHost host, string[] args) { ChoGuard.ArgumentNotNull(host, "Host"); if (_applicationHost != null) { return; } lock (_hostLock) { if (_applicationHost == null) { _applicationHost = host; _applicationHost.Args = args; ChoApplicationHost.IsApplicationHostUsed = true; ChoFramework.Initialize(); ChoService.Initialize(); } } }