Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Services.Authentication;
|
---|
6 | using HeuristicLab.Services.Authentication.DataTransfer;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Services.Authentication.TestClient
|
---|
9 | {
|
---|
10 | class TestClient
|
---|
11 | {
|
---|
12 | static void Main(string[] args)
|
---|
13 | {
|
---|
14 |
|
---|
15 | AuthenticationService auth = new AuthenticationService();
|
---|
16 |
|
---|
17 | try
|
---|
18 | {
|
---|
19 | IEnumerable<User> list = new List<User>();
|
---|
20 | list = auth.GetUsers();
|
---|
21 | foreach (var item in list)
|
---|
22 | {
|
---|
23 | Console.WriteLine("Item=" + item.UserName);
|
---|
24 | }
|
---|
25 |
|
---|
26 |
|
---|
27 | }
|
---|
28 | catch (Exception e)
|
---|
29 | {
|
---|
30 | Console.WriteLine(e.Message);
|
---|
31 | }
|
---|
32 | Console.ReadLine();
|
---|
33 | //ServiceClient client = new ServiceClient();
|
---|
34 | //client.ClientCredentials.UserName.UserName = "Alice";
|
---|
35 | //client.ClientCredentials.UserName.Password = "YouWillNeverKnow";
|
---|
36 | //client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
|
---|
37 |
|
---|
38 | //try
|
---|
39 | //{
|
---|
40 | // Console.WriteLine(client.GetData(23));
|
---|
41 | //}
|
---|
42 | //catch (Exception e)
|
---|
43 | //{
|
---|
44 | // Console.WriteLine("test");
|
---|
45 | // Console.WriteLine(e.Message);
|
---|
46 | //}
|
---|
47 |
|
---|
48 | //Console.ReadLine();
|
---|
49 |
|
---|
50 | //client.Close();
|
---|
51 | }
|
---|
52 | }
|
---|
53 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.