Ejemplo n.º 1
0
 /// <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();
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public void Arrange()
 {
     //Server = new DatabaseServer();
     Server = DatabaseServer.CreateInstance();
 }