C# 클래스 Rsdn.Framework.Formatting.FormatterHelper

파일 보기 프로젝트 열기: rsdn/RsdnFormatter

공개 메소드들

메소드 설명
EncodeAgainstXSS ( this value ) : string

Подготавливает текст для предотовращения XSS (Cross Site Scripting) Используется, в основном для кодирования адресов (ссылок, картинок).

EncodeJScriptText ( this str ) : string

Подготавливает текст для JScript.

ExtractTags ( this tags, MatchEvaluator eval ) : string

Format tags

ExtractTags ( this tags ) : string[]

Extract tags from string

GetCodeFormatter ( [ name ) : Rsdn.Framework.Formatting.CodeFormatter

Returns code formatter by language name.

GetCodeTagNames ( ) : IEnumerable

Returns all known tag names.

IsEmpty ( [ sb ) : bool

Returns true is StringBuilder is empty.

RemoveQuotations ( string msg ) : string

Убирает цитирование из текста сообщения.

Replace ( [ regex, [ input, [ replacement ) : System.StringBuilder

Replace parts of StringBuilder by Regex.

ReplaceTags ( this str ) : string

Заменяет служебные символы HTML на их аналоги.

ReplaceTagsWQ ( this sb ) : System.StringBuilder

Заменяет служебные символы HTML на их аналоги исключая '"'.

ReplaceTagsWQ ( this str ) : string

Заменяет служебные символы HTML на их аналоги исключая '"'.

ToDouble ( this o ) : double

Преобразует object в double. В случае возникновения исключения возвращается 0.

ToInt ( this o ) : int

Преобразует object в int. В случае возникновения исключения возвращается 0.

ToInt ( this o, int errorValue ) : int

Преобразует object в int. В случае возникновения исключения возвращается errorValue.

Trim ( [ sb, [ trimChars ) : System.StringBuilder

Trim sides of string.

비공개 메소드들

메소드 설명
FormatterHelper ( ) : System
GetCodeFormatterByTag ( [ tagName ) : Rsdn.Framework.Formatting.CodeFormatter
GetLangInfos ( ) : IEnumerable
MarkupCode ( [ langName, [ source ) : string
MarkupCodeByTag ( [ tagName, [ source ) : string
RetrieveLangInfo ( Stream stream ) : Rsdn.Framework.Formatting.CodeLangInfo
TrimLeft ( [ sb, [ trimChars ) : System.StringBuilder
TrimRight ( [ sb, [ trimChars ) : System.StringBuilder

메소드 상세

EncodeAgainstXSS() 공개 정적인 메소드

Подготавливает текст для предотовращения XSS (Cross Site Scripting) Используется, в основном для кодирования адресов (ссылок, картинок).
public static EncodeAgainstXSS ( this value ) : string
value this Исходный текст.
리턴 string

EncodeJScriptText() 공개 정적인 메소드

Подготавливает текст для JScript.
public static EncodeJScriptText ( this str ) : string
str this Исходная строка.
리턴 string

ExtractTags() 공개 정적인 메소드

Format tags
public static ExtractTags ( this tags, MatchEvaluator eval ) : string
tags this
eval MatchEvaluator Tag transformer
리턴 string

ExtractTags() 공개 정적인 메소드

Extract tags from string
public static ExtractTags ( this tags ) : string[]
tags this
리턴 string[]

GetCodeFormatter() 공개 정적인 메소드

Returns code formatter by language name.
public static GetCodeFormatter ( [ name ) : Rsdn.Framework.Formatting.CodeFormatter
name [
리턴 Rsdn.Framework.Formatting.CodeFormatter

GetCodeTagNames() 공개 정적인 메소드

Returns all known tag names.
public static GetCodeTagNames ( ) : IEnumerable
리턴 IEnumerable

IsEmpty() 공개 정적인 메소드

Returns true is StringBuilder is empty.
public static IsEmpty ( [ sb ) : bool
sb [
리턴 bool

RemoveQuotations() 공개 정적인 메소드

Убирает цитирование из текста сообщения.
public static RemoveQuotations ( string msg ) : string
msg string Сообщение.
리턴 string

Replace() 공개 정적인 메소드

Replace parts of StringBuilder by Regex.
public static Replace ( [ regex, [ input, [ replacement ) : System.StringBuilder
regex [
input [
replacement [
리턴 System.StringBuilder

ReplaceTags() 공개 정적인 메소드

Заменяет служебные символы HTML на их аналоги.
public static ReplaceTags ( this str ) : string
str this Исходный текст.
리턴 string

ReplaceTagsWQ() 공개 정적인 메소드

Заменяет служебные символы HTML на их аналоги исключая '"'.
public static ReplaceTagsWQ ( this sb ) : System.StringBuilder
sb this Исходный текст.
리턴 System.StringBuilder

ReplaceTagsWQ() 공개 정적인 메소드

Заменяет служебные символы HTML на их аналоги исключая '"'.
public static ReplaceTagsWQ ( this str ) : string
str this Исходный текст.
리턴 string

ToDouble() 공개 정적인 메소드

Преобразует object в double. В случае возникновения исключения возвращается 0.
public static ToDouble ( this o ) : double
o this Преобразуемый объект.
리턴 double

ToInt() 공개 정적인 메소드

Преобразует object в int. В случае возникновения исключения возвращается 0.
public static ToInt ( this o ) : int
o this Преобразуемый объект.
리턴 int

ToInt() 공개 정적인 메소드

Преобразует object в int. В случае возникновения исключения возвращается errorValue.
public static ToInt ( this o, int errorValue ) : int
o this Преобразуемый объект.
errorValue int Значение возвращаемое если произошла ошибка.
리턴 int

Trim() 공개 정적인 메소드

Trim sides of string.
public static Trim ( [ sb, [ trimChars ) : System.StringBuilder
sb [
trimChars [
리턴 System.StringBuilder