Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.OKB.Client/ClientFactory.cs @ 5867

Last change on this file since 5867 was 4311, checked in by swagner, 14 years ago

Integrated OKB clients for HL 3.3 (#1166)

File size: 587 bytes
Line 
1using System;
2using System.ServiceModel;
3
4namespace HeuristicLab.OKB.Client {
5
6  public class ClientFactory {
7    public static T Create<T, I>()
8      where T : ClientBase<I>, I
9      where I : class {
10      var client = Activator.CreateInstance<T>();
11      client.ClientCredentials.UserName.UserName = "swagner";
12      client.ClientCredentials.UserName.Password = "swagner";
13      client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
14      return client;
15    }
16  }
17}
Note: See TracBrowser for help on using the repository browser.