Beispiel #1
0
        public static void Main(string[] args)
        {
            Console.InputEncoding  = Encoding.Unicode;
            Console.OutputEncoding = Encoding.Unicode;

            JSON.Parameters.UseExtensions     = false;
            JSON.Parameters.UseEscapedUnicode = false;

            user     = new UserManager();
            device   = new DeviceManager(user);
            dispatch = new DispatchManager(device);
            content  = new ContentManager(user, device, dispatch);

            //  BuildWebHost(args).Run();  // Встроеный небольшой логер
            var config = new ConfigurationBuilder()
                         .SetBasePath(Directory.GetCurrentDirectory())
                         .AddJsonFile("hosting.json", true)
                         .Build();
            var host = new WebHostBuilder()
                       .UseKestrel()
                       .UseConfiguration(config)
                       .UseContentRoot(Directory.GetCurrentDirectory())
                       .UseIISIntegration()
                       .UseApplicationInsights()
                       .UseStartup <Startup>()
                       .Build();

            host.Run();
        }
 public ContentManager(UserManager UserManager, DeviceManager DeviceManager, DispatchManager DispatchManager)
 {
     contentQueue    = new List <ContentNode>();
     userManager     = UserManager;
     deviceManager   = DeviceManager;
     dispatchManager = DispatchManager;
 }