예제 #1
0
 public Enum(string statusCode, IEnumerable <T> data, PaginationCursor current, int itemsCount, string description = null, string userDescription = null)
     : base(HttpStatusCode, current, itemsCount, data, statusCode: statusCode, description: description, userDescription: userDescription)
 {
     if (statusCode == null)
     {
         throw new ArgumentNullException(nameof(statusCode));
     }
     StatusCode.CheckValidOkCodeOrThrow(statusCode);
 }
예제 #2
0
 public ApiEnumResponse(Status status, PaginationCursor current, bool hasNextPage, IEnumerable <T> data) : base(status)
 {
     Data = data;
     if (current == null)
     {
         throw new ArgumentNullException(nameof(current));
     }
     Navigation = new PaginationInfo
     {
         PaginationCursor = current,
         HasNextPage      = hasNextPage
     };
 }
예제 #3
0
 public ApiEnumResponse(Status status, PaginationCursor current, int itemsCount, IEnumerable <T> data) : base(status)
 {
     Data = data;
     if (current == null)
     {
         throw new ArgumentNullException(nameof(current));
     }
     if (itemsCount < 0)
     {
         throw new ArgumentOutOfRangeException(nameof(itemsCount), FormatSystemMessage(ExceptionMessages.InvalidItemsCount));
     }
     Navigation = new PaginationInfo
     {
         PaginationCursor = current,
         ItemsCount       = itemsCount
     };
 }
예제 #4
0
 public Enum(IEnumerable <T> data, PaginationCursor current, int itemsCount, string description = null, string userDescription = null)
     : base(HttpStatusCode, current, itemsCount, data, statusCode: ApiStatusCode, description: description, userDescription: userDescription)
 {
 }
예제 #5
0
 public Enum(IEnumerable <T> data, PaginationCursor current, bool hasNextPage, string description = null, string userDescription = null)
     : base(HttpStatusCode, current, hasNextPage, data, statusCode: ApiStatusCode, description: description, userDescription: userDescription)
 {
 }
예제 #6
0
 public ApiEnumResponse(int httpCode, PaginationCursor current, bool hasNextPage, IEnumerable <T> data, string statusCode = null, string description = null, string userDescription = null)
     : this(new Status(httpCode, statusCode, description, userDescription), current, hasNextPage, data)
 {
 }