コード例 #1
0
ファイル: Manager.cs プロジェクト: keithb-/CiteSet
 /// <summary>
 /// Method to execute when the service starts.
 /// </summary>
 /// <param name="args"></param>
 protected override void OnStart(string[] args)
 {
     // Start database server.
     _databaseServer = DatabaseServer.CreateInstance();
     _databaseServer.Open();
     // Start RESTful resource service.
     _resourceService = ServiceHost.CreateInstance <ResourceService>();
     _resourceService.Open();
     // Start RESTful project service.
     _projectService = ServiceHost.CreateInstance <ProjectService>();
     _projectService.Open();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: keithb-/CiteSet
        static void Main(string[] args)
        {
            // Start database server.
            _databaseServer = DatabaseServer.CreateInstance();
            _databaseServer.Open();
            // Start RESTful resource service.
            _resourceService = ServiceHost.CreateInstance <ResourceService>();
            _resourceService.Open();
            // Start RESTful resource service.
            _projectService = ServiceHost.CreateInstance <ProjectService>();
            _projectService.Open();

            System.Console.WriteLine("Press enter to stop services...");
            System.Console.ReadLine();

            _projectService.Close();
            _resourceService.Close();
            _databaseServer.Close();
        }