Exemplo n.º 1
0
 /// <summary>
 /// Gets the <see cref="Uri"/> of a select <see cref="OcrRegions"/> region.
 /// </summary>
 /// <param name="region">A <see cref="OcrRegions"/> region</param>
 /// <returns>The base <see cref="Uri"/> of the region</returns>
 public Uri GetRegionalUri(OcrRegions region)
 {
     if (region != OcrRegions.NotSet)
     {
         return(new Uri($"https://{region.ToString().ToLower()}.{URI_STUB}"));
     }
     else
     {
         throw GetRegionException();
     }
 }
Exemplo n.º 2
0
        public OcrClient(string subscriptionKey, OcrRegions region)
        {
            _subscriptionKey = subscriptionKey;

            if (region != OcrRegions.NotSet)
            {
                _region = region;
            }
            else
            {
                throw GetRegionException();
            }
        }