Baconography.PlatformServices.ImageAPI.Imgur.IsAPI C# (CSharp) Метод

IsAPI() статический приватный Метод

static private IsAPI ( Uri uri ) : bool
uri System.Uri
Результат bool
        internal static bool IsAPI(Uri uri)
        {
            var href = uri.OriginalString;
            var groups = hashRe.Match(href).Groups;
            GroupCollection albumGroups = null;

            if (groups.Count == 0 || (groups.Count > 0 && string.IsNullOrWhiteSpace(groups[0].Value)))
                albumGroups = albumHashRe.Match(href).Groups;

            return (albumGroups != null && albumGroups.Count > 2 && string.IsNullOrWhiteSpace(albumGroups[2].Value));
        }