public static IImageSourceService GetRequiredImageSourceService(this IImageSourceServiceProvider provider, Type imageSourceType)
        {
            var service = provider.GetImageSourceService(imageSourceType);

            if (service != null)
            {
                return(service);
            }

            throw new InvalidOperationException($"Unable to find a image source service for {provider.GetImageSourceType(imageSourceType)}.");
        }
 public static IImageSourceService?GetImageSourceService(this IImageSourceServiceProvider provider, IImageSource imageSource) =>
 provider.GetImageSourceService(imageSource.GetType());
 public static IImageSourceService?GetImageSourceService <T>(this IImageSourceServiceProvider provider)
     where T : IImageSource =>
 provider.GetImageSourceService(typeof(T));