C# Class Elmah.ErrorJson

Responsible for primarily encoding the JSON representation of Error objects.
Mostra file Open project: elmah/Elmah Class Usage Examples

Public Methods

Method Description
Encode ( Error error, TextWriter writer ) : void

Encodes the default JSON representation of an Error object to a TextWriter.

Only properties and collection entires with non-null and non-empty strings are emitted.

EncodeMembers ( Error error, JsonTextWriter writer ) : void
EncodeString ( Error error ) : string

Encodes the default JSON representation of an Error object to a string.

Only properties and collection entires with non-null and non-empty strings are emitted.

Private Methods

Method Description
EncodeEnclosed ( Error error, JsonTextWriter writer ) : void
Member ( JsonTextWriter writer, string name, System.DateTime value, System.DateTime defaultValue ) : void
Member ( JsonTextWriter writer, string name, System.Collections.Specialized.NameValueCollection collection ) : void
Member ( JsonTextWriter writer, string name, int value, int defaultValue ) : void
Member ( JsonTextWriter writer, string name, string value ) : void

Method Details

Encode() public static method

Encodes the default JSON representation of an Error object to a TextWriter.
Only properties and collection entires with non-null and non-empty strings are emitted.
public static Encode ( Error error, TextWriter writer ) : void
error Error
writer System.IO.TextWriter
return void

EncodeMembers() public static method

public static EncodeMembers ( Error error, JsonTextWriter writer ) : void
error Error
writer JsonTextWriter
return void

EncodeString() public static method

Encodes the default JSON representation of an Error object to a string.
Only properties and collection entires with non-null and non-empty strings are emitted.
public static EncodeString ( Error error ) : string
error Error
return string