Skip to content

Commit

Permalink
Refactoring page interfaces for search queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuck committed Dec 10, 2020
1 parent ac936ae commit 34d25c4
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 8 deletions.
1 change: 1 addition & 0 deletions YuckQi.Domain.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AROUND_REGION/@EntryValue">2</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LINES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand Down
8 changes: 8 additions & 0 deletions src/YuckQi.Domain/Application/Abstract/IPage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace YuckQi.Domain.Application.Abstract
{
public interface IPage
{
int PageNumber { get; set; }
int PageSize { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using YuckQi.Domain.Application.Abstract;

namespace YuckQi.Domain.Application.Queries.Abstract
{
public interface ISearchQuery : IPage
{
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using System.Collections.Generic;
using YuckQi.Domain.Application.Abstract;
using YuckQi.Domain.Entities.Abstract;

namespace YuckQi.Domain.RequestResults
namespace YuckQi.Domain.Application.Results
{
public class Page<TEntity, TKey> where TEntity : class, IEntity<TKey> where TKey : struct
public class Page<TEntity, TKey> : IPage where TEntity : class, IEntity<TKey> where TKey : struct
{
#region Properties

public IReadOnlyCollection<TEntity> Items { get; }
public int PageNumber { get; }
public int PageSize { get; }
public int PageNumber { get; set; }
public int PageSize { get; set; }
public int TotalCount { get; }

#endregion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;

namespace YuckQi.Domain.RequestResults
namespace YuckQi.Domain.Application.Results
{
public class Result
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace YuckQi.Domain.RequestResults
namespace YuckQi.Domain.Application.Results
{
public readonly struct ResultCode
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace YuckQi.Domain.RequestResults
namespace YuckQi.Domain.Application.Results
{
public class ResultDetail
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace YuckQi.Domain.RequestResults
namespace YuckQi.Domain.Application.Results
{
public enum ResultType
{
Expand Down

0 comments on commit 34d25c4

Please sign in to comment.