Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/24/10 18:37:04 (14 years ago)
Author:
cneumuel
Message:

added streamedHttpEndpoit binding (without message-security (for now)) (#1168)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/ServiceLocator.cs

    r4302 r4305  
    2727using System.ServiceModel;
    2828using HeuristicLab.Hive.Contracts;
     29using HeuristicLab.Hive.Experiment.Properties;
    2930
    3031namespace HeuristicLab.Hive.Experiment {
    3132  internal class ServiceLocator {
    3233    internal static IClientFacade CreateClientFacade(string url) {
    33       ChannelFactory<IClientFacade> factory = new ChannelFactory<IClientFacade>(
    34           WcfSettings.GetStreamedBinding(),
    35           new EndpointAddress(url));
    36       return factory.CreateChannel();
     34      ChannelFactory<IClientFacade> factory = new ChannelFactory<IClientFacade>("ClientHttpEndpoint");
     35      WcfSettings.SetEndpointAddress(factory.Endpoint, url);
     36
     37      factory.Credentials.UserName.UserName = Settings.Default.HiveUsername;
     38      factory.Credentials.UserName.Password = Settings.Default.HivePassword;
     39
     40      IClientFacade client = factory.CreateChannel();
     41      return client;
     42    }
     43
     44    internal static IClientFacade CreateStreamedClientFacade(string url) {
     45      ChannelFactory<IClientFacade> factory = new ChannelFactory<IClientFacade>("ClientStreamedHttpEndpoint");
     46      WcfSettings.SetEndpointAddress(factory.Endpoint, url);
     47
     48      factory.Credentials.UserName.UserName = Settings.Default.HiveUsername;
     49      factory.Credentials.UserName.Password = Settings.Default.HivePassword;
     50
     51      IClientFacade client = factory.CreateChannel();
     52      return client;
    3753    }
    3854  }
Note: See TracChangeset for help on using the changeset viewer.