Free cookie consent management tool by TermsFeed Policy Generator

Changeset 843 for trunk/sources


Ignore:
Timestamp:
11/27/08 17:10:55 (16 years ago)
Author:
kgrading
Message:

worked on #401

Location:
trunk/sources
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Communication/HeuristicLab.Hive.Client.Communication.csproj

    r781 r843  
    5151  </ItemGroup>
    5252  <ItemGroup>
     53    <Compile Include="ClientConsoleCommunicator.cs" />
     54    <Compile Include="ClientConsole\ConnectionContainer.cs" />
     55    <Compile Include="ClientConsole\JobStatus.cs" />
     56    <Compile Include="ClientConsole\StatusCommons.cs" />
    5357    <Compile Include="CommunicationsPlugin.cs" />
     58    <Compile Include="Interfaces\IClientConsoleCommunicator.cs" />
    5459    <Compile Include="Properties\AssemblyInfo.cs" />
    5560    <Compile Include="ServerProxy.cs" />
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r841 r843  
    3737using System.Runtime.Remoting.Messaging;
    3838using HeuristicLab.PluginInfrastructure;
     39using System.ServiceModel;
     40using HeuristicLab.Hive.Client.Communication.Interfaces;
     41using System.ServiceModel.Description;
    3942
    4043
     
    6871
    6972    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
    70103      clientCommunicator = ServiceLocator.GetClientCommunicator();
    71104      clientCommunicator.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(ClientCommunicator_LoginCompleted);
Note: See TracChangeset for help on using the changeset viewer.