public void SetServiceRegion(ServiceRegion serviceRegion)
 {
     using (AndroidJavaObject activityObject = GetCurrentActivity()) {
         //Always 0 for now
         activityObject.Call("setServiceRegion", 0);
     }
 }
示例#2
0
        public BaseTestClass()
        {
            var builder = new ConfigurationBuilder()
                          .AddJsonFile(Directory.GetCurrentDirectory() + "\\appsettings.json",
                                       optional: false, reloadOnChange: true);

            Configuration = builder.Build();

            ChampionId = long.Parse(Configuration["championId"]);

            MatchId = long.Parse(Configuration["matchId"]);

            ItemId = long.Parse(Configuration["itemId"]);

            _serviceRegion = (ServiceRegion)Enum.Parse(typeof(ServiceRegion), Configuration["region"]);

            _servicePlatform = Service_Region.ToPlatform();

            SummonerId = long.Parse(Configuration["summonerId"]);

            SummonerName = Configuration["summonerName"];

            AccountId = long.Parse(Configuration["accountId"]);

            TournamentCode = Configuration["tournamentCode"];

            MasteryId = long.Parse(Configuration["masteryId"]);

            AspNetCoreTestServer = new AspNetCoreTestServer();
        }
示例#3
0
        public async static Task <List <Regions> > GetRegions(IConfiguration _configuration)
        {
            ServiceRegion serviceRegion = new ServiceRegion(_configuration);

            List <Regions> regionList = await serviceRegion.GetRegions();

            regionList.Insert(0, new Regions {
                RegionDescription = ""
            });
            return(regionList);
        }
示例#4
0
        public HomeController()
        {
            _customer       = new Service <Customer>();
            _seller         = new Service <UserSys>();
            _login          = new Service <UserSys>();
            _city           = new Service <City>();
            _region         = new Service <Region>();
            _gender         = new Service <Gender>();
            _classification = new Service <Classification>();

            _regionCity = new ServiceRegion();
        }
示例#5
0
        /// <summary>
        /// Create a new instance of a service connector, specifying a region and category
        /// </summary>
        /// <param name="serviceId">The ID for the QnA maker service</param>
        /// <param name="key">The Key for the QnA maker Service</param>
        /// <param name="region">The geographic region of the service. Currently just WestUS is supported</param>
        /// <param name="name"></param>
        public QnAMakerService(string serviceId, string key, ServiceRegion region, string name)
        {
            this.DisplayCategory = true;
            this.ServiceId       = serviceId;
            this.Key             = key;
            this.DisplayName     = name;
            switch (region)
            {
            case ServiceRegion.WestUS:
                this.BaseAddress = "https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/";
                break;

            default:
                this.BaseAddress = "https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/";
                break;
            }
        }
示例#6
0
        public static ServicePlatform ToPlatform(this ServiceRegion enumVal)
        {
            switch (enumVal)
            {
            case ServiceRegion.tr:
                return(ServicePlatform.TR1);

            case ServiceRegion.ru:
                return(ServicePlatform.RU);

            case ServiceRegion.las:
                return(ServicePlatform.LA2);

            case ServiceRegion.lan:
                return(ServicePlatform.LA1);

            case ServiceRegion.oce:
                return(ServicePlatform.OC1);

            case ServiceRegion.kr:
                return(ServicePlatform.KR);

            case ServiceRegion.na:
                return(ServicePlatform.NA1);

            case ServiceRegion.euw:
                return(ServicePlatform.EUW1);

            case ServiceRegion.br:
                return(ServicePlatform.BR1);

            case ServiceRegion.eune:
                return(ServicePlatform.EUN1);

            case ServiceRegion.jp:
                return(ServicePlatform.JP1);

            case ServiceRegion.pbe:
                return(ServicePlatform.PBE1);

            default:
                return(ServicePlatform.TR1);
            }
        }
示例#7
0
        public async static Task <string> GetDetail(string code, DetailService detailService, IConfiguration _configuration)
        {
            string returnValue = string.Empty;

            switch (detailService)
            {
            case DetailService.Category:
                ServiceCategories serviceCategories = new ServiceCategories(_configuration);

                var Category = await serviceCategories.GetCategory(int.Parse(code));

                returnValue = Category.CategoryName;

                break;

            case DetailService.Customer:
                ServiceCustomers serviceCustomers = new ServiceCustomers(_configuration);

                var Customer = await serviceCustomers.GetCustomer(code);

                returnValue = Customer.ContactName;

                break;

            case DetailService.Employee:
                ServiceEmployees serviceEmployees = new ServiceEmployees(_configuration);

                var Employee = await serviceEmployees.GetEmployee(int.Parse(code));

                returnValue = Employee.FirstName + ' ' + Employee.LastName;

                break;

            case DetailService.Region:
                ServiceRegion serviceRegion = new ServiceRegion(_configuration);

                var Region = await serviceRegion.GetRegion(int.Parse(code));

                returnValue = Region.RegionDescription;

                break;
            }
            return(returnValue);
        }
示例#8
0
 public static Language ToLanguage(this ServiceRegion enumVal)
 {
     return(enumVal.ToPlatform().ToLanguage());
 }
示例#9
0
 public void SetServiceRegion(ServiceRegion region)
 {
 }
示例#10
0
 public void SetServiceRegion(ServiceRegion serviceRegion)
 {
     sessionMObject.CallStatic("setServiceRegion", 0);
 }
示例#11
0
 public void SetServiceRegion(ServiceRegion region)
 {
     SMSetServiceRegion((int)region);
 }
 public void SetServiceRegion(ServiceRegion region)
 {
 }
示例#13
0
 public RegionsController(IConfiguration configuration)
 {
     _configuration = configuration;
     _serviceRegion = new ServiceRegion(_configuration);
 }
 public void SetServiceRegion(ServiceRegion serviceRegion)
 {
     //Always 0 for now
     sessionMObject.CallStatic("setServiceRegion", 0);
 }
 public void SetServiceRegion(ServiceRegion serviceRegion)
 {
     using (AndroidJavaObject activityObject = GetCurrentActivity()) {
         //Always 0 for now
         activityObject.Call("setServiceRegion", 0);
     }
 }
示例#16
0
 //Call this method before starting the session to set the service region.
 public static void SetServiceRegion(ServiceRegion region)
 {
     serviceRegion = region;
 }
 public void SetServiceRegion(ServiceRegion region)
 {
     SMSetServiceRegion((int)region);
 }