예제 #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>();
 }
예제 #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>();
        }
예제 #3
0
 public GetRegionOperation(BinderEcosystem ecosystem, string regionId) : base(GetUrlFor(ecosystem,regionId))
 {
 }
예제 #4
0
 private static string GetUrlFor(BinderEcosystem ecosystem, string regionId)
 {
     string url = ecosystem.CatalogUrl.AppendPathSegment("Regions").AppendPathSegment(regionId);
     return url;
 }
예제 #5
0
 public GetRegionOperation(BinderEcosystem ecosystem, string regionId) : base(GetUrlFor(ecosystem, regionId))
 {
 }
예제 #6
0
        private static string GetUrlFor(BinderEcosystem ecosystem, string regionId)
        {
            string url = ecosystem.CatalogUrl.AppendPathSegment("Regions").AppendPathSegment(regionId);

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