コード例 #1
0
ファイル: LibraryOptions.cs プロジェクト: zdmlwb/jellyfin-1
        public ImageOption GetImageOptions(ImageType type)
        {
            foreach (var i in ImageOptions)
            {
                if (i.Type == type)
                {
                    return(i);
                }
            }

            if (DefaultImageOptions.TryGetValue(Type, out ImageOption[] options))
コード例 #2
0
        public ImageOption GetImageOptions(ImageType type)
        {
            foreach (ImageOption i in ImageOptions)
            {
                if (i.Type == type)
                {
                    return(i);
                }
            }

            ImageOption[] options;
            if (DefaultImageOptions.TryGetValue(Type, out options))
            {
                foreach (ImageOption i in options)
                {
                    if (i.Type == type)
                    {
                        return(i);
                    }
                }
            }

            return(DefaultInstance);
        }
コード例 #3
0
 /// <summary>
 /// A URL-encoded address for a custom image
 /// </summary>
 /// <remarks>
 /// If you'd prefer to use your own default image (perhaps your logo, a funny face, whatever), then you can easily do so by supplying the URL to an image in the d= or default= parameter.
 /// </remarks>
 /// <param name="htmlHelper">The HTML helper.</param>
 /// <param name="defaultImage">The default image.</param>
 /// <returns></returns>
 public GravatarImage DefaultImage(DefaultImageOptions defaultImage)
 {
     this.defaultImage = defaultImage;
     return(this);
 }
コード例 #4
0
 /// <summary>
 /// A URL-encoded address for a custom image
 /// </summary>
 /// <remarks>
 /// If you'd prefer to use your own default image (perhaps your logo, a funny face, whatever), then you can easily do so by supplying the URL to an image in the d= or default= parameter.
 /// </remarks>
 /// <param name="htmlHelper">The HTML helper.</param>
 /// <param name="defaultImage">The default image.</param>
 /// <returns></returns>
 public GravatarImage DefaultImage(DefaultImageOptions defaultImage)
 {
     this.defaultImage = defaultImage;
         return this;
 }