예제 #1
0
        /// <summary>
        /// Determine whether an API element is supported by the generated class.
        /// </summary>
        /// <param name="api">
        /// A <see cref="String"/> that specify the regular expression of the API element to be evaluated.
        /// </param>
        /// <returns>
        /// It returns true if <paramref name="api"/> specify a supported API.
        /// </returns>
        public bool IsSupportedApi(string api)
        {
            if (api == null)
            {
                throw new ArgumentNullException(nameof(api));
            }

            string regexApi = $"^{api}$";

            return(SupportedApi.Any(supportedApi => Regex.IsMatch(supportedApi, regexApi)));
        }
예제 #2
0
 internal LookWithOsm(string apiUrl, SupportedApi api, LookWithOsmAdjustment adjustment)
 {
     ApiUrl = apiUrl;
     switch (api)
     {
     case SupportedApi.OverpassApi:
         ApiClient = new OverpassApiClient();
         break;
     }
     Adjustment = adjustment;
 }