C# 클래스 i18n.Helpers.NuggetParser

Helper class for locating and processing nuggets in a string.
파일 보기 프로젝트 열기: turquoiseowl/i18n 1 사용 예제들

공개 메소드들

메소드 설명
BreakdownNugget ( string nugget ) : Nugget

Parses a nugget string to breakdown the nugget into individual components.

NuggetParser ( NuggetTokens nuggetTokens, Context context ) : System
ParseString ( string entity, Func ProcessNugget ) : string

Parses a string entity for nuggets, forwarding the nugget to a caller-provided delegate, with support for replacement of nugget strings in the entity.

비공개 메소드들

메소드 설명
EscapeString ( string str, char escapeChar = '\\' ) : string

Modifies a string such that each character is prefixed by another character (defaults to backslash).

NuggetFromRegexMatch ( Match match ) : Nugget

Returns a nugget instance loaded from a regex match, or null if error.

메소드 상세

BreakdownNugget() 공개 메소드

Parses a nugget string to breakdown the nugget into individual components.
public BreakdownNugget ( string nugget ) : Nugget
nugget string Subject nugget string.
리턴 Nugget

NuggetParser() 공개 메소드

public NuggetParser ( NuggetTokens nuggetTokens, Context context ) : System
nuggetTokens NuggetTokens
context Context
리턴 System

ParseString() 공개 메소드

Parses a string entity for nuggets, forwarding the nugget to a caller-provided delegate, with support for replacement of nugget strings in the entity.
public ParseString ( string entity, Func ProcessNugget ) : string
entity string /// String containing nuggets to be parsed. E.g. source code file, HTTP response entity. ///
ProcessNugget Func /// Delegate callback to be called for each nugget encountered in entity: /// delegate(string nuggetString, int pos, Nugget nugget1, string entity1). /// Returns a string with which to replace the nugget string in the source entity. /// If no change, then may return null. ///
리턴 string