C# Class BlogEngine.Core.Avatar

Avatar support.
Show file Open project: rasmuskl/ReSharperCourse

Public Methods

Method Description
GetAvatar ( int size, string email, Uri website, string avatarUrl, string description ) : Avatar

Returns the avatar/gravatar that matches the specified email, website or avatar Url.

GetAvatar ( string email, Uri website = null, string avatarUrl = "", string description = "", int width = 80, int height = 80 ) : Avatar

Returns the avatar/gravatar that matches the specified email, website or avatar Url.

GetAvatarImageTag ( int size, string email, Uri website, string avatarUrl, string description ) : string

Returns the avatar/gravatar image tag that matches the specified email, website or avatar Url.

GetAvatarImageTag ( string email, Uri website = null, string avatarUrl = "", string description = "", int width = 80, int height = 80 ) : string

Returns the avatar/gravatar image tag that matches the specified email, website or avatar Url.

Private Methods

Method Description
CustomAvatar ( Uri url, string description, int width, int height ) : Avatar
DefaultImage ( string description, int width, int height ) : Avatar
Gravatar ( string email, string description, int width, int height ) : Avatar
SiteThumb ( string email, Uri website, string description, int width, int height ) : Avatar
ValidRemoteSite ( Uri website ) : bool

Method Details

GetAvatar() public static method

Returns the avatar/gravatar that matches the specified email, website or avatar Url.
public static GetAvatar ( int size, string email, Uri website, string avatarUrl, string description ) : Avatar
size int /// The image size. ///
email string /// Email address. ///
website System.Uri /// The website URL. ///
avatarUrl string /// An optional avatar URL to use instead of the default. ///
description string /// Description used for the Alt/Title attributes. ///
return Avatar

GetAvatar() public static method

Returns the avatar/gravatar that matches the specified email, website or avatar Url.
public static GetAvatar ( string email, Uri website = null, string avatarUrl = "", string description = "", int width = 80, int height = 80 ) : Avatar
email string /// Email address. ///
website System.Uri /// The website URL. ///
avatarUrl string /// An optional avatar URL to use instead of the default. ///
description string /// Description used for the Alt/Title attributes. ///
width int /// The image width. ///
height int /// The image height. ///
return Avatar

GetAvatarImageTag() public static method

Returns the avatar/gravatar image tag that matches the specified email, website or avatar Url.
public static GetAvatarImageTag ( int size, string email, Uri website, string avatarUrl, string description ) : string
size int /// The image size. ///
email string /// Email address. ///
website System.Uri /// The website URL. ///
avatarUrl string /// An optional avatar URL to use instead of the default. ///
description string /// Description used for the Alt/Title attributes. ///
return string

GetAvatarImageTag() public static method

Returns the avatar/gravatar image tag that matches the specified email, website or avatar Url.
public static GetAvatarImageTag ( string email, Uri website = null, string avatarUrl = "", string description = "", int width = 80, int height = 80 ) : string
email string Email address
website System.Uri Website URL
avatarUrl string An optional avatar URL to use instead of the default.
description string Description used for the Alt/Title attributes.
width int Image width
height int Image height
return string