C# 클래스 Ikayzo.SDL.SDLUtil

Various SDL related utility methods
파일 보기 프로젝트 열기: ikayzo/SDL.NET

공개 메소드들

메소드 설명
CoerceOrFail ( Object obj ) : object

Coerce the type to a standard SDL type or throw an argument exception if no coercion is possible.

Format ( object obj ) : string

Create an SDL string representation for an object (note: Strings and Characters will be surrounded by quotes.)

Format ( object obj, bool addQuotes ) : string

Create an SDL string representation for an object

List ( String valueList ) : IList

Parse the string of values and return a list. The string is handled as if it is the values portion of an SDL tag.

Map ( string attributeString ) : object>.IDictionary

Parse a string representing the attributes portion of an SDL tag and return the results as a map.

ValidateIdentifier ( string identifier ) : string

Validates an SDL identifier String. SDL Identifiers must start with a Unicode letter or underscore (_) and contain only unicode letters, digits, underscores, and dashes.

Value ( String literal ) : Object

Get the value represented by a string containing an SDL literal.

비공개 메소드들

메소드 설명
Escape ( char c ) : string
Escape ( string s ) : string

메소드 상세

CoerceOrFail() 공개 정적인 메소드

Coerce the type to a standard SDL type or throw an argument exception if no coercion is possible.
If no coercion is /// possible
public static CoerceOrFail ( Object obj ) : object
obj Object The object to coerce
리턴 object

Format() 공개 정적인 메소드

Create an SDL string representation for an object (note: Strings and Characters will be surrounded by quotes.)
public static Format ( object obj ) : string
obj object The object to format
리턴 string

Format() 공개 정적인 메소드

Create an SDL string representation for an object
public static Format ( object obj, bool addQuotes ) : string
obj object The object to format
addQuotes bool Quotes will be added to Strings and /// Characters if true
리턴 string

List() 공개 정적인 메소드

Parse the string of values and return a list. The string is handled as if it is the values portion of an SDL tag.
(or subclass SDLParseException) If /// the string contains literals that cannot be parsed If valueList /// is null.
public static List ( String valueList ) : IList
valueList String A string of space separated SDL literals ///
리턴 IList

Map() 공개 정적인 메소드

Parse a string representing the attributes portion of an SDL tag and return the results as a map.
(or subclass SDLParseException) If /// the string contains literals that cannot be parsed or the map is /// malformed If attributeString /// is null.
public static Map ( string attributeString ) : object>.IDictionary
attributeString string A string of space separated key=value /// pairs
리턴 object>.IDictionary

ValidateIdentifier() 공개 정적인 메소드

Validates an SDL identifier String. SDL Identifiers must start with a Unicode letter or underscore (_) and contain only unicode letters, digits, underscores, and dashes.
If identifier is /// not a valid SDL identifier
public static ValidateIdentifier ( string identifier ) : string
identifier string
리턴 string

Value() 공개 정적인 메소드

Get the value represented by a string containing an SDL literal.
(or subclass SDLParseException) If /// the string cannot be interpreted as an SDL literal If literal is null. ///
public static Value ( String literal ) : Object
literal String An SDL literal
리턴 Object