Exemple #1
0
 public Region(BinderEcosystem ecosystem, string regionId, BinderSession session)
 {
     _ecosystem = ecosystem;
     _regionModel = new GetRegionOperation(ecosystem, regionId).ResponseMessage.Content<RegionModel>();
     _session = session;
     var currentRegionUrl = _regionModel.Endpoint.AppendPathSegment("CurrentRegion").SetQueryParam("api_key",session.SessionToken);
     _currentRegionModel = new GetOperation(currentRegionUrl).ResponseMessage.Content<CurrentRegionModel>();
 }
Exemple #2
0
        public Region(BinderEcosystem ecosystem, string regionId, BinderSession session)
        {
            _ecosystem   = ecosystem;
            _regionModel = new GetRegionOperation(ecosystem, regionId).ResponseMessage.Content <RegionModel>();
            _session     = session;
            var currentRegionUrl = _regionModel.Endpoint.AppendPathSegment("CurrentRegion").SetQueryParam("api_key", session.SessionToken);

            _currentRegionModel = new GetOperation(currentRegionUrl).ResponseMessage.Content <CurrentRegionModel>();
        }
 public GetRegionOperation(BinderEcosystem ecosystem, string regionId) : base(GetUrlFor(ecosystem,regionId))
 {
 }
 private static string GetUrlFor(BinderEcosystem ecosystem, string regionId)
 {
     string url = ecosystem.CatalogUrl.AppendPathSegment("Regions").AppendPathSegment(regionId);
     return url;
 }
 public GetRegionOperation(BinderEcosystem ecosystem, string regionId) : base(GetUrlFor(ecosystem, regionId))
 {
 }
        private static string GetUrlFor(BinderEcosystem ecosystem, string regionId)
        {
            string url = ecosystem.CatalogUrl.AppendPathSegment("Regions").AppendPathSegment(regionId);

            return(url);
        }
 public CommandLineArguments()
 {
     // !!! make sure this ends in /
     _binderEcosystem = new BinderEcosystem(catalogUrl); 
 }