Beispiel #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is Breach)
            {
                var breach = value as Breach;

                if (breach.LogoType.ToLowerInvariant() == "svg")
                {
                    return(SvgImageSource.FromUri(new Uri($"{Constants.HibpBaseImageUrl}{breach.Name}.{breach.LogoType}")));
                }
                else
                {
                    return(ImageSource.FromUri(new Uri($"{Constants.HibpBaseImageUrl}{breach.Name}.{breach.LogoType}")));
                }
            }

            return(null);
        }