Beispiel #1
0
        public static async Task <MazeRestClient> TryConnect(string username, SecureString password, IServerInfo serverInfo)
        {
            var httpClient =
                new HttpClient(new HttpClientHandler {
                AutomaticDecompression = DecompressionMethods.GZip,
            })
            {
                BaseAddress = serverInfo.ServerUri
            };

            var client = new MazeRestClient(username, serverInfo, password, httpClient);
            await client.Initialize();

            return(client);
        }
Beispiel #2
0
 public void Initialize(MazeRestClient restClient)
 {
     _restClient = restClient;
     restClient.ServiceProvider = ServiceProvider;
 }