Line | |
---|
1 | using System;
|
---|
2 | using System.ServiceModel;
|
---|
3 |
|
---|
4 | namespace 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.