C# Class Elmah.SqlServerCompactErrorLog

An ErrorLog implementation that uses SQL Server Compact 4 as its backing store.
Inheritance: Elmah.ErrorLog
ファイルを表示 Open project: elmah/Elmah

Public Methods

Method Description
GetError ( string id ) : ErrorLogEntry

Returns the specified error from the database, or null if it does not exist.

GetErrors ( int pageIndex, int pageSize, ICollection errorEntryList ) : int

Returns a page of errors from the databse in descending order of logged time.

Log ( Error error ) : string

Logs an error to the database.

Use the stored procedure called by this implementation to set a policy on how long errors are kept in the log. The default implementation stores all errors for an indefinite time.

SqlServerCompactErrorLog ( System.Collections.IDictionary config ) : System

Initializes a new instance of the SqlServerCompactErrorLog class using a dictionary of configured settings.

SqlServerCompactErrorLog ( string connectionString ) : System

Initializes a new instance of the SqlServerCompactErrorLog class to use a specific connection string for connecting to the database.

Private Methods

Method Description
InitializeDatabase ( ) : void

Method Details

GetError() public method

Returns the specified error from the database, or null if it does not exist.
public GetError ( string id ) : ErrorLogEntry
id string
return ErrorLogEntry

GetErrors() public method

Returns a page of errors from the databse in descending order of logged time.
public GetErrors ( int pageIndex, int pageSize, ICollection errorEntryList ) : int
pageIndex int
pageSize int
errorEntryList ICollection
return int

Log() public method

Logs an error to the database.
Use the stored procedure called by this implementation to set a policy on how long errors are kept in the log. The default implementation stores all errors for an indefinite time.
public Log ( Error error ) : string
error Error
return string

SqlServerCompactErrorLog() public method

Initializes a new instance of the SqlServerCompactErrorLog class using a dictionary of configured settings.
public SqlServerCompactErrorLog ( System.Collections.IDictionary config ) : System
config System.Collections.IDictionary
return System

SqlServerCompactErrorLog() public method

Initializes a new instance of the SqlServerCompactErrorLog class to use a specific connection string for connecting to the database.
public SqlServerCompactErrorLog ( string connectionString ) : System
connectionString string
return System