C# 클래스 Sitecore.SharedSource.Commons.Utilities.ItemNameUtil

Utilities for dealing with item names
파일 보기 프로젝트 열기: Velir/Sitecore-Commons

공개 메소드들

메소드 설명
CleanNameOfExtraSpaces ( string nameText ) : string

Cleans the name of extra spaces both internally and at the beginning and end of the name.

CleanNameOfHtml ( string nameText ) : string

Cleans a name of HTML tags.

CleanNameOfText ( string nameText, List textToStrip ) : string

Cleans the name of a list of strings.

CleanNameOfText ( string nameText, string regularExpression ) : string

Replace any text matching the passed in regular expression with a blank string.

GetForeignCharacterMap ( ) : Hashtable

Returns a Hashtable with the foreign character to english character mappings.

GetValidItemName ( string nameText ) : string

Gets the name of the valid.

GetValidItemName ( string nameText, bool stripTags, bool replaceForeignCharacters ) : string

Returns a valid item name for the passed in text

ReplaceCharacters ( string nameText, Hashtable characterMap ) : string

Takes the passed in characters (the keys in the Hashtable) and replaces them with the Hashtable key value.

ReplaceForeignCharacters ( string nameText ) : string

Replaces the foreign characters in a name with their english equivalents.

메소드 상세

CleanNameOfExtraSpaces() 공개 정적인 메소드

Cleans the name of extra spaces both internally and at the beginning and end of the name.
public static CleanNameOfExtraSpaces ( string nameText ) : string
nameText string The name text.
리턴 string

CleanNameOfHtml() 공개 정적인 메소드

Cleans a name of HTML tags.
public static CleanNameOfHtml ( string nameText ) : string
nameText string The name text.
리턴 string

CleanNameOfText() 공개 정적인 메소드

Cleans the name of a list of strings.
public static CleanNameOfText ( string nameText, List textToStrip ) : string
nameText string The name text to strip text from.
textToStrip List The text to strip.
리턴 string

CleanNameOfText() 공개 정적인 메소드

Replace any text matching the passed in regular expression with a blank string.
public static CleanNameOfText ( string nameText, string regularExpression ) : string
nameText string The name text.
regularExpression string The regular expression.
리턴 string

GetForeignCharacterMap() 공개 정적인 메소드

Returns a Hashtable with the foreign character to english character mappings.
public static GetForeignCharacterMap ( ) : Hashtable
리턴 System.Collections.Hashtable

GetValidItemName() 공개 정적인 메소드

Gets the name of the valid.
public static GetValidItemName ( string nameText ) : string
nameText string The name text.
리턴 string

GetValidItemName() 공개 정적인 메소드

Returns a valid item name for the passed in text
public static GetValidItemName ( string nameText, bool stripTags, bool replaceForeignCharacters ) : string
nameText string The name text.
stripTags bool if set to true [strip tags].
replaceForeignCharacters bool if set to true [replace foreign characters].
리턴 string

ReplaceCharacters() 공개 정적인 메소드

Takes the passed in characters (the keys in the Hashtable) and replaces them with the Hashtable key value.
public static ReplaceCharacters ( string nameText, Hashtable characterMap ) : string
nameText string The name text.
characterMap System.Collections.Hashtable The character map.
리턴 string

ReplaceForeignCharacters() 공개 정적인 메소드

Replaces the foreign characters in a name with their english equivalents.
public static ReplaceForeignCharacters ( string nameText ) : string
nameText string The name text.
리턴 string