static void Main(string[] args) { using (var app = ServiceProviderFactory.GetComponent <IAppService>(AppType.Console)) { app.Run(); } }