コード例 #1
0
ファイル: Service.cs プロジェクト: d96stuff/TeamBuildScreen
        public Service()
        {
            InitializeComponent();
            //var catalog = new AggregateCatalog(
            //    new AssemblyCatalog(System.Reflection.Assembly.GetExecutingAssembly()),
            //    new DirectoryCatalog("providers"));
            //var container = new CompositionContainer(catalog);
            //var serverProvider = container.GetExport<ServerProvider>();

            this.host = new HttpListenerHostWithConfiguration {
                Configuration = new Configurator()
            };
            host.Initialize(new[] { "http://+:9222/" }, "/", null);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: d96stuff/TeamBuildScreen
        static void Main(string[] args)
        {
            var host = new HttpListenerHostWithConfiguration {
                Configuration = new Configurator()
            };

            host.Initialize(new[] { "http://+:9222/" }, "/", null);

            host.StartListening();
            System.Console.WriteLine("Press any key to exit.");
            System.Console.ReadKey();
            host.StopListening();
            host.Close();
        }