- Timestamp:
- 01/14/09 16:05:26 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs
r1099 r1120 108 108 } 109 109 110 private ServiceHost StartExecutionEngineFacade(Uri uriTcp) { 111 IExecutionEngineFacade[] serverConsoleInstances = 112 discService.GetInstances<IExecutionEngineFacade>(); 113 114 if (serverConsoleInstances.Length > 0) { 115 ServiceHost serviceHost = 116 new ServiceHost(serverConsoleInstances[0].GetType(), 117 uriTcp); 118 119 System.ServiceModel.Channels.Binding binding = 120 new NetTcpBinding(); 121 122 serviceHost.AddServiceEndpoint( 123 typeof(IExecutionEngineFacade), 124 binding, 125 "ExecutionEngineFacade"); 126 127 AddMexEndpoint(serviceHost); 128 129 serviceHost.Open(); 130 131 return serviceHost; 132 } else 133 return null; 134 } 135 110 136 public override void Run() { 111 137 IPAddress[] addresses = Dns.GetHostAddresses(Dns.GetHostName()); … … 129 155 StartServerConsoleFacade(uriTcp); 130 156 157 uriTcp = 158 new Uri("net.tcp://" + addresses[index] + ":" + port + "/ExecutionEngine/"); 159 160 ServiceHost executionEngineFacade = 161 StartExecutionEngineFacade(uriTcp); 162 131 163 ILifecycleManager[] lifecycleManagers = 132 164 discService.GetInstances<ILifecycleManager>(); … … 142 174 143 175 Form mainForm = new MainForm(clientCommunicator.BaseAddresses[0], 144 serverConsoleFacade.BaseAddresses[0]); 176 serverConsoleFacade.BaseAddresses[0], 177 executionEngineFacade.BaseAddresses[0]); 145 178 146 179 Application.Run(mainForm); … … 151 184 clientCommunicator.Close(); 152 185 serverConsoleFacade.Close(); 153 154 186 executionEngineFacade.Close(); 155 187 } 156 188 }
Note: See TracChangeset
for help on using the changeset viewer.