예제 #1
0
        public static bool IsFeatureAvailableForRegion(string regionId, string featureName)
        {
            AppConfigRegionSource source            = new AppConfigRegionSource();
            IEnumerable <string>  availableFeatures = source.GetAvailableRegions().Where(x => x.RegionInformation.Id == regionId).FirstOrDefault().Regulatory.SupportedFeatures;

            if (availableFeatures.Count() > 0)
            {
                return(availableFeatures.Contains(featureName));
            }

            return(false);
        }
예제 #2
0
        public static Region GetRegionByName(string regionName)
        {
            AppConfigRegionSource source = new AppConfigRegionSource();

            return(source.GetAvailableRegions().Where(x => string.Compare(x.RegionInformation.Name, regionName, System.StringComparison.OrdinalIgnoreCase) == 0).FirstOrDefault());
        }