Skip to content

Commit

Permalink
Update project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
a-gubskiy committed Oct 13, 2024
1 parent 90e5ce4 commit 6d64f0e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
23 changes: 3 additions & 20 deletions src/X.PagedList.Mvc.Core/AjaxOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public virtual IEnumerable<HtmlAttribute> ToUnobtrusiveHtmlAttributes()
}

/// <summary>
/// The HTTP method to make the request with. Default value is "GET".
/// The HTTP method to make the request with. The default value is "GET".
/// </summary>
public string HttpMethod { get; set; } = "GET";

/// <summary>
/// The mode used to handle the data received as response. Default value is "Replace".
/// The mode used to handle the data received as response. The default value is "Replace".
/// </summary>
public InsertionMode InsertionMode { get; set; } = InsertionMode.Replace;

Expand All @@ -82,21 +82,4 @@ public virtual IEnumerable<HtmlAttribute> ToUnobtrusiveHtmlAttributes()
public string? OnSuccess { get; set; }
public string? Url { get; set; }
public bool AllowCache { get; set; }
}

public enum InsertionMode
{
Replace
}

/// <summary>
/// Represents one attribute of a DOM element
/// </summary>
/// <remarks>
/// Setting <see cref="Key"/> and <see cref="Value"/> is required.
/// </remarks>
public class HtmlAttribute
{
public string Key { get; set; } = "";
public object? Value { get; set; }
}
}
13 changes: 13 additions & 0 deletions src/X.PagedList.Mvc.Core/HtmlAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace X.PagedList.Mvc.Core;

/// <summary>
/// Represents one attribute of a DOM element
/// </summary>
/// <remarks>
/// Setting <see cref="Key"/> and <see cref="Value"/> is required.
/// </remarks>
public class HtmlAttribute
{
public string Key { get; set; } = "";
public object? Value { get; set; }
}
9 changes: 9 additions & 0 deletions src/X.PagedList.Mvc.Core/InsertionMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace X.PagedList.Mvc.Core;

/// <summary>
/// Enumerates the different modes of inserting content into the DOM
/// </summary>
public enum InsertionMode
{
Replace
}
2 changes: 1 addition & 1 deletion src/X.PagedList/OrderedPagedList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public PagedList(IEnumerable<T> superset, Func<T, TKey> keySelectorMethod, int p
throw new ArgumentNullException(nameof(superset));
}

// add items to internal list
// add items to the internal list
if (TotalItemCount > 0)
{
var skip = (pageNumber - 1) * pageSize;
Expand Down
2 changes: 1 addition & 1 deletion src/X.PagedList/StaticPagedList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public StaticPagedList(IEnumerable<T> subset, int pageNumber, int pageSize, int
}

/// <summary>
/// Create empty static paged list
/// Create an empty static paged list
/// </summary>
/// <param name="pageSize"></param>
/// <returns></returns>
Expand Down

0 comments on commit 6d64f0e

Please sign in to comment.