Free cookie consent management tool by TermsFeed Policy Generator

source: branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/TestClient.cs @ 4584

Last change on this file since 4584 was 4584, checked in by jwolfing, 14 years ago

#1196 startup solution

File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Authentication;
6using HeuristicLab.Services.Authentication.DataTransfer;
7
8namespace 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.