C# Класс Elmah.SqlErrorLog

An ErrorLog implementation that uses Microsoft SQL Server 2000 as its backing store.
Наследование: Elmah.ErrorLog
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
BeginGetErrors ( int pageIndex, int pageSize, ICollection errorEntryList, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult

Begins an asynchronous version of GetErrors.

EndGetErrors ( IAsyncResult asyncResult ) : int

Ends an asynchronous version of ErrorLog.GetErrors.

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.

GetErrorsAsync ( int pageIndex, int pageSize, ICollection errorEntryList, CancellationToken cancellationToken ) : Task

Asynchronous version of GetErrors.

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.

SqlErrorLog ( System.Collections.IDictionary config ) : System

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

SqlErrorLog ( string connectionString ) : System

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

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

Метод Описание
ErrorsXmlToList ( XmlReader reader, ICollection errorEntryList ) : void
ErrorsXmlToList ( string xml, ICollection errorEntryList ) : void
ReadSingleXmlStringResult ( SqlDataReader reader ) : string

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

BeginGetErrors() публичный Метод

Begins an asynchronous version of GetErrors.
public BeginGetErrors ( int pageIndex, int pageSize, ICollection errorEntryList, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
pageIndex int
pageSize int
errorEntryList ICollection
asyncCallback AsyncCallback
asyncState object
Результат IAsyncResult

EndGetErrors() публичный Метод

Ends an asynchronous version of ErrorLog.GetErrors.
public EndGetErrors ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
Результат int

GetError() публичный Метод

Returns the specified error from the database, or null if it does not exist.
public GetError ( string id ) : ErrorLogEntry
id string
Результат ErrorLogEntry

GetErrors() публичный Метод

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
Результат int

GetErrorsAsync() публичный Метод

Asynchronous version of GetErrors.
public GetErrorsAsync ( int pageIndex, int pageSize, ICollection errorEntryList, CancellationToken cancellationToken ) : Task
pageIndex int
pageSize int
errorEntryList ICollection
cancellationToken CancellationToken
Результат Task

Log() публичный Метод

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
Результат string

SqlErrorLog() публичный Метод

Initializes a new instance of the SqlErrorLog class using a dictionary of configured settings.
public SqlErrorLog ( System.Collections.IDictionary config ) : System
config System.Collections.IDictionary
Результат System

SqlErrorLog() публичный Метод

Initializes a new instance of the SqlErrorLog class to use a specific connection string for connecting to the database.
public SqlErrorLog ( string connectionString ) : System
connectionString string
Результат System