mirror of https://github.com/abpframework/abp.git
4 changed files with 136 additions and 1 deletions
@ -0,0 +1,73 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Volo.Abp.Paging |
|||
{ |
|||
public class PagedResult<T> : ListResultDto<T>, IPagedResult<T> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public long TotalCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Creates a new <see cref="PagedResult{T}"/> object.
|
|||
/// </summary>
|
|||
public PagedResult() |
|||
{ |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Creates a new <see cref="PagedResult{T}"/> object.
|
|||
/// </summary>
|
|||
/// <param name="totalCount">Total count of Items</param>
|
|||
/// <param name="items">List of items in current page</param>
|
|||
public PagedResult(long totalCount, IReadOnlyList<T> items) |
|||
: base(items) |
|||
{ |
|||
TotalCount = totalCount; |
|||
} |
|||
} |
|||
|
|||
public class ListResultDto<T> : IListResult<T> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public IReadOnlyList<T> Items |
|||
{ |
|||
get { return _items ?? (_items = new List<T>()); } |
|||
set { _items = value; } |
|||
} |
|||
private IReadOnlyList<T> _items; |
|||
|
|||
/// <summary>
|
|||
/// Creates a new <see cref="ListResultDto{T}"/> object.
|
|||
/// </summary>
|
|||
public ListResultDto() |
|||
{ |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Creates a new <see cref="ListResultDto{T}"/> object.
|
|||
/// </summary>
|
|||
/// <param name="items">List of items</param>
|
|||
public ListResultDto(IReadOnlyList<T> items) |
|||
{ |
|||
Items = items; |
|||
} |
|||
} |
|||
|
|||
public interface IListResult<T> |
|||
{ |
|||
IReadOnlyList<T> Items { get; set; } |
|||
} |
|||
|
|||
public interface IPagedResult<T> : IListResult<T>, IHasTotalCount |
|||
{ |
|||
} |
|||
|
|||
public interface IHasTotalCount |
|||
{ |
|||
long TotalCount { get; set; } |
|||
} |
|||
} |
|||
@ -1,10 +1,20 @@ |
|||
using System; |
|||
using System.Net; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Volo.Abp.AuditLogging |
|||
{ |
|||
public interface IAuditLogRepository : IBasicRepository<AuditLog, Guid> |
|||
{ |
|||
|
|||
Task<Paging.PagedResult<AuditLog>> GetListAsync( |
|||
string sorting = null, |
|||
int maxResultCount = 50, |
|||
int skipCount = 0, |
|||
string filter = null, |
|||
string httpMethod = null, |
|||
string url = null, |
|||
HttpStatusCode? httpStatusCode = null, |
|||
bool includeDetails = false); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue