C# Класс Amanda.Extensions

A collection of extensions methods used in the BuisnesLogic namespace
Показать файл Открыть проект

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

Метод Описание
AsString ( this s ) : string

An abstraction over reading a string from a stream

AsString ( this s, Encoding encoding ) : string

An abstraction over reading a string from a stream

AsString ( this s, Encoding encoding, bool detectEncodingFromByteOrderMarks ) : string

An abstraction over reading a string from a stream

AsString ( this s, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize ) : string

An abstraction over reading a string from a stream

AsString ( this s, bool detectEncodingFromByteOrderMarks ) : string

An abstraction over reading a string from a stream

Default ( this t ) : dynamic

Returns the default value for a type, much like the default keyword

Deserialize ( this jss, string s, Type t ) : object

An extension method that allows the Nancy JavaScriptSerializer to generically deserialize JSON to a type given at runtime

IsBasic ( this t ) : bool

Checks whether a type is a "basic" type as per the C# specification or a nullable version thereof

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

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

An abstraction over reading a string from a stream
public static AsString ( this s ) : string
s this The stream to read from
Результат string

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

An abstraction over reading a string from a stream
public static AsString ( this s, Encoding encoding ) : string
s this The stream to read from
encoding System.Text.Encoding The encoding used to read the string
Результат string

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

An abstraction over reading a string from a stream
public static AsString ( this s, Encoding encoding, bool detectEncodingFromByteOrderMarks ) : string
s this The stream to read from
encoding System.Text.Encoding The encoding used to read the string
detectEncodingFromByteOrderMarks bool A boolean indicating whether the /// metod should attempt to detect the encoding from the byte order marks
Результат string

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

An abstraction over reading a string from a stream
public static AsString ( this s, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize ) : string
s this The stream to read from
encoding System.Text.Encoding The encoding used to read the string
detectEncodingFromByteOrderMarks bool A boolean indicating whether the /// metod should attempt to detect the encoding from the byte order marks
bufferSize int The size of the buffer used in reading the string
Результат string

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

An abstraction over reading a string from a stream
public static AsString ( this s, bool detectEncodingFromByteOrderMarks ) : string
s this The stream to read from
detectEncodingFromByteOrderMarks bool A boolean indicating whether the /// metod should attempt to detect the encoding from the byte order marks
Результат string

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

Returns the default value for a type, much like the default keyword
public static Default ( this t ) : dynamic
t this The type to get a default value for
Результат dynamic

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

An extension method that allows the Nancy JavaScriptSerializer to generically deserialize JSON to a type given at runtime
public static Deserialize ( this jss, string s, Type t ) : object
jss this The JavaScriptSerializer which preforms the conversion
s string The JSON string to deserialize
t System.Type The type to deserialzie to
Результат object

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

Checks whether a type is a "basic" type as per the C# specification or a nullable version thereof
public static IsBasic ( this t ) : bool
t this The type to check
Результат bool