Changeset 843 for trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
- Timestamp:
- 11/27/08 17:10:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r841 r843 37 37 using System.Runtime.Remoting.Messaging; 38 38 using HeuristicLab.PluginInfrastructure; 39 using System.ServiceModel; 40 using HeuristicLab.Hive.Client.Communication.Interfaces; 41 using System.ServiceModel.Description; 39 42 40 43 … … 68 71 69 72 public void Start() { 73 DiscoveryService discService = 74 new DiscoveryService(); 75 IClientConsoleCommunicator[] clientCommunicatorInstances = 76 discService.GetInstances<IClientConsoleCommunicator>(); 77 78 if (clientCommunicatorInstances.Length > 0) { 79 ServiceHost serviceHost = 80 new ServiceHost(clientCommunicatorInstances[0].GetType(), 81 new Uri("http://localhost:9000/ClientConsole")); 82 83 System.ServiceModel.Channels.Binding binding = 84 new NetNamedPipeBinding(); 85 86 serviceHost.AddServiceEndpoint( 87 typeof(IClientConsoleCommunicator), 88 binding, 89 "ClientConsoleCommunicator"); 90 91 ServiceMetadataBehavior behavior = 92 new ServiceMetadataBehavior(); 93 serviceHost.Description.Behaviors.Add(behavior); 94 95 serviceHost.AddServiceEndpoint( 96 typeof(IMetadataExchange), 97 MetadataExchangeBindings.CreateMexNamedPipeBinding(), 98 "mex"); 99 100 serviceHost.Open(); 101 } 102 70 103 clientCommunicator = ServiceLocator.GetClientCommunicator(); 71 104 clientCommunicator.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(ClientCommunicator_LoginCompleted);
Note: See TracChangeset
for help on using the changeset viewer.