예제 #1
0
        public BinderEcosystem(string catalogUrl)
        {
            _catalogUrl = catalogUrl;

            var client = new HttpClient();
            client.BaseAddress = new Uri(_catalogUrl);

            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

            HttpResponseMessage response = client.GetAsync(catalogUrl.AppendPathSegment("CurrentEcosystem")).Result;

            string str = response.Content.ReadAsStringAsync().Result;
            CurrentEcosystem = JsonConvert.DeserializeObject<CurrentEcosystemModel>(str);

            AuthenticationEndpoint = new AuthenticationEndpoint(CurrentEcosystem.AuthenticationEndpoint);

        }
예제 #2
0
        public BinderEcosystem(string catalogUrl)
        {
            _catalogUrl = catalogUrl;

            var client = new HttpClient();

            client.BaseAddress = new Uri(_catalogUrl);

            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

            HttpResponseMessage response = client.GetAsync(catalogUrl.AppendPathSegment("CurrentEcosystem")).Result;

            string str = response.Content.ReadAsStringAsync().Result;

            CurrentEcosystem = JsonConvert.DeserializeObject <CurrentEcosystemModel>(str);

            AuthenticationEndpoint = new AuthenticationEndpoint(CurrentEcosystem.AuthenticationEndpoint);
        }