C# Class OurUmbraco.Our.Utils

Afficher le fichier Open project: umbraco/OurUmbraco

Méthodes publiques

Méthode Description
CleanInvalidXmlChars ( string text ) : string
GetAllTags ( string group ) : string
GetGravatar ( string email, int size, string memberName, bool getRawUrl = false ) : string
GetLocalAvatar ( string imgPath, int minSize, string memberName, bool getRawUrl = false ) : string
GetMember ( int id ) : umbraco.cms.businesslogic.member.Member
GetMemberAvatar ( IPublishedContent member, int avatarSize, bool getRawUrl = false ) : string
GetMemberAvatarImage ( IPublishedContent member ) : Image
GetProjectCompatibleVersions ( ) : IEnumerable>.Dictionary

Returns a dictionary of project id => any version that has been flagged as being compatible

GetProjectCompatibleVersions ( int projectId ) : IEnumerable
GetProjectContributors ( int projectId ) : List
GetProjectFileDownloadCount ( int fileId ) : int
GetProjectMemberVotes ( int projectId ) : int
GetProjectTotalDownload ( ) : int>.Dictionary

Returns a dictionary of project id => total downloads

GetProjectTotalDownloadCount ( int projectId ) : int
GetProjectTotalVotes ( ) : int>.Dictionary

Returns a dictionary of project id => total karma

GetProjectTotalVotes ( int projectId ) : int
GetProjectsMemberHasDownloaded ( int memberId ) : IEnumerable
GetProjectsMemberHasVotedUp ( int memberId ) : IEnumerable
GetReleaseDownloadCount ( int projectId ) : int
GetScreenshotPath ( string screenshot ) : string
HasMemberDownloadedPackage ( int memberId, int projectId ) : bool
IsAdmin ( int id ) : bool
IsHq ( int id ) : bool
IsProjectContributor ( int memberId, int projectId ) : bool
Sanitize ( string html ) : string

sanitize any potentially dangerous tags from the provided raw HTML input using a whitelist based approach, leaving the "safe" HTML tags

StripHTML ( string inputString ) : string

Private Methods

Méthode Description
MemberAvatarPath ( IPublishedContent member ) : string

Method Details

CleanInvalidXmlChars() public static méthode

public static CleanInvalidXmlChars ( string text ) : string
text string
Résultat string

GetAllTags() public static méthode

public static GetAllTags ( string group ) : string
group string
Résultat string

GetGravatar() public static méthode

public static GetGravatar ( string email, int size, string memberName, bool getRawUrl = false ) : string
email string
size int
memberName string
getRawUrl bool
Résultat string

GetLocalAvatar() public static méthode

public static GetLocalAvatar ( string imgPath, int minSize, string memberName, bool getRawUrl = false ) : string
imgPath string
minSize int
memberName string
getRawUrl bool
Résultat string

GetMember() public static méthode

public static GetMember ( int id ) : umbraco.cms.businesslogic.member.Member
id int
Résultat umbraco.cms.businesslogic.member.Member

GetMemberAvatar() public static méthode

public static GetMemberAvatar ( IPublishedContent member, int avatarSize, bool getRawUrl = false ) : string
member IPublishedContent
avatarSize int
getRawUrl bool
Résultat string

GetMemberAvatarImage() public static méthode

public static GetMemberAvatarImage ( IPublishedContent member ) : Image
member IPublishedContent
Résultat Image

GetProjectCompatibleVersions() public static méthode

Returns a dictionary of project id => any version that has been flagged as being compatible
public static GetProjectCompatibleVersions ( ) : IEnumerable>.Dictionary
Résultat IEnumerable>.Dictionary

GetProjectCompatibleVersions() public static méthode

public static GetProjectCompatibleVersions ( int projectId ) : IEnumerable
projectId int
Résultat IEnumerable

GetProjectContributors() public static méthode

public static GetProjectContributors ( int projectId ) : List
projectId int
Résultat List

GetProjectFileDownloadCount() public static méthode

public static GetProjectFileDownloadCount ( int fileId ) : int
fileId int
Résultat int

GetProjectMemberVotes() public static méthode

public static GetProjectMemberVotes ( int projectId ) : int
projectId int
Résultat int

GetProjectTotalDownload() public static méthode

Returns a dictionary of project id => total downloads
public static GetProjectTotalDownload ( ) : int>.Dictionary
Résultat int>.Dictionary

GetProjectTotalDownloadCount() public static méthode

public static GetProjectTotalDownloadCount ( int projectId ) : int
projectId int
Résultat int

GetProjectTotalVotes() public static méthode

Returns a dictionary of project id => total karma
public static GetProjectTotalVotes ( ) : int>.Dictionary
Résultat int>.Dictionary

GetProjectTotalVotes() public static méthode

public static GetProjectTotalVotes ( int projectId ) : int
projectId int
Résultat int

GetProjectsMemberHasDownloaded() public static méthode

public static GetProjectsMemberHasDownloaded ( int memberId ) : IEnumerable
memberId int
Résultat IEnumerable

GetProjectsMemberHasVotedUp() public static méthode

public static GetProjectsMemberHasVotedUp ( int memberId ) : IEnumerable
memberId int
Résultat IEnumerable

GetReleaseDownloadCount() public static méthode

public static GetReleaseDownloadCount ( int projectId ) : int
projectId int
Résultat int

GetScreenshotPath() public static méthode

public static GetScreenshotPath ( string screenshot ) : string
screenshot string
Résultat string

HasMemberDownloadedPackage() public static méthode

public static HasMemberDownloadedPackage ( int memberId, int projectId ) : bool
memberId int
projectId int
Résultat bool

IsAdmin() public static méthode

public static IsAdmin ( int id ) : bool
id int
Résultat bool

IsHq() public static méthode

public static IsHq ( int id ) : bool
id int
Résultat bool

IsProjectContributor() public static méthode

public static IsProjectContributor ( int memberId, int projectId ) : bool
memberId int
projectId int
Résultat bool

Sanitize() public static méthode

sanitize any potentially dangerous tags from the provided raw HTML input using a whitelist based approach, leaving the "safe" HTML tags
public static Sanitize ( string html ) : string
html string
Résultat string

StripHTML() public static méthode

public static StripHTML ( string inputString ) : string
inputString string
Résultat string