C# Класс Sappworks.Stocks.ETrade.StringExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
AsSecureString ( this value ) : SecureString
AsString ( this value ) : string
Inject ( this formatString, Hashtable attributes ) : string

Extension method that replaces keys in a string with the values of matching hashtable entries. Uses String.Format() internally; custom formats should match those used for that method.

Inject ( this formatString, IDictionary dictionary ) : string

Extension method that replaces keys in a string with the values of matching dictionary entries. Uses String.Format() internally; custom formats should match those used for that method.

Inject ( this formatString, object injectionObject ) : string

Extension method that replaces keys in a string with the values of matching object properties. Uses String.Format() internally; custom formats should match those used for that method.

InjectSingleValue ( this formatString, string key, object replacementValue ) : string

Replaces all instances of a 'key' (e.g. {foo} or {foo:SomeFormat}) in a string with an optionally formatted value, and returns the result.

ToDelimitedString ( this value, string delimiter ) : string

Приватные методы

Метод Описание
GetPropertyHash ( object properties ) : Hashtable

Creates a HashTable based on current object state. Copied from the MVCToolkit HtmlExtensionUtility class

Описание методов

AsSecureString() публичный статический Метод

public static AsSecureString ( this value ) : SecureString
value this
Результат System.Security.SecureString

AsString() публичный статический Метод

public static AsString ( this value ) : string
value this
Результат string

Inject() публичный статический Метод

Extension method that replaces keys in a string with the values of matching hashtable entries. Uses String.Format() internally; custom formats should match those used for that method.
public static Inject ( this formatString, Hashtable attributes ) : string
formatString this The format string, containing keys like {foo} and {foo:SomeFormat}.
attributes System.Collections.Hashtable A with keys and values to inject into the string
Результат string

Inject() публичный статический Метод

Extension method that replaces keys in a string with the values of matching dictionary entries. Uses String.Format() internally; custom formats should match those used for that method.
public static Inject ( this formatString, IDictionary dictionary ) : string
formatString this The format string, containing keys like {foo} and {foo:SomeFormat}.
dictionary IDictionary An with keys and values to inject into the string
Результат string

Inject() публичный статический Метод

Extension method that replaces keys in a string with the values of matching object properties. Uses String.Format() internally; custom formats should match those used for that method.
public static Inject ( this formatString, object injectionObject ) : string
formatString this The format string, containing keys like {foo} and {foo:SomeFormat}.
injectionObject object The object whose properties should be injected in the string
Результат string

InjectSingleValue() публичный статический Метод

Replaces all instances of a 'key' (e.g. {foo} or {foo:SomeFormat}) in a string with an optionally formatted value, and returns the result.
public static InjectSingleValue ( this formatString, string key, object replacementValue ) : string
formatString this The string containing the key; unformatted ({foo}), or formatted ({foo:SomeFormat})
key string The key name (foo)
replacementValue object The replacement value; if null is replaced with an empty string
Результат string

ToDelimitedString() публичный статический Метод

public static ToDelimitedString ( this value, string delimiter ) : string
value this
delimiter string
Результат string