C# Class Rock.Model.ExceptionLogService

The data access/service class for Rock.Model.ExceptionLog entity type objects.
显示文件 Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
GetByParentId ( int parentId ) : IQueryable

Gets a collection of Rock.Model.ExceptionLog entities by the Id of their Parent exceptionId. Under most instances, only one child Rock.Model.ExceptionLog entity will be returned in the collection.

GetBySiteId ( int siteId ) : IQueryable

Gets Exception Logs by Person Id

Gets a collection of Rock.Model.ExceptionLog entities by the Id of the Rock.Model.Site that they occurred on.

LogException ( Exception ex, HttpContext context, int pageId = null, int siteId = null, PersonAlias personAlias = null ) : void

Logs new Rock.Model.ExceptionLog entities. This method serves as an interface to asynchronously log exceptions.

Private Methods

Method Description
LogExceptions ( Exception ex, ExceptionLog log, bool isParent ) : void

Recursively logs exception and any children.

PopulateExceptionLog ( Exception ex, HttpContext context, int pageId, int siteId, PersonAlias personAlias ) : ExceptionLog

Populates the Rock.Model.ExceptionLog entity with the exception data.

Method Details

GetByParentId() public method

Gets a collection of Rock.Model.ExceptionLog entities by the Id of their Parent exceptionId. Under most instances, only one child Rock.Model.ExceptionLog entity will be returned in the collection.
public GetByParentId ( int parentId ) : IQueryable
parentId int An containing the Id of the parent ExceptionLog entity to search by.
return IQueryable

GetBySiteId() public method

Gets Exception Logs by Person Id Gets a collection of Rock.Model.ExceptionLog entities by the Id of the Rock.Model.Site that they occurred on.
public GetBySiteId ( int siteId ) : IQueryable
siteId int An containing the Id of the to search by.
return IQueryable

LogException() public static method

Logs new Rock.Model.ExceptionLog entities. This method serves as an interface to asynchronously log exceptions.
public static LogException ( Exception ex, HttpContext context, int pageId = null, int siteId = null, PersonAlias personAlias = null ) : void
ex System.Exception A object to log.
context System.Web.HttpContext The
pageId int A containing the Id of the that the exception occurred on. /// This parameter is nullable..
siteId int A containing the Id of the that the exception occurred on.
personAlias PersonAlias The person alias.
return void