Skip to content

Commit

Permalink
Treewide: Provide specific namespace for Extensions (again)
Browse files Browse the repository at this point in the history
As discussed in [1], using a separate namespace for Extensions has several
advantages. Unfortunately, the dedicated namespace for the PagedListExtensions
has been removed during the package name rearrangements and not added back
after.

This commit adds it back and essentially reverts the namespace scheme to
where it was in v10.0.3, like already done for the rest of the code.

To indicate this more prominently, the PagedListExtensions.cs class is moved
into an "Extensions" subfolder, so the namespace now also matches the folder
structure.

From the released packages, this affects X.PagedList and X.PagedList.Mvc.Core.

[1] 6ae094e ("Treewide: Provide specific namespaces for Extensions")

Fixes: dncuug#290
  • Loading branch information
adschmu committed Oct 7, 2024
1 parent 650339b commit 14e6f89
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/Example.Website/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using X.PagedList;
using X.PagedList.Extensions;

namespace Example.Website.Controllers;

Expand Down
1 change: 1 addition & 0 deletions examples/Example.Website/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using X.PagedList;
using X.PagedList.Extensions;

namespace Example.Website.Controllers;

Expand Down
1 change: 1 addition & 0 deletions src/X.PagedList.Mvc.Core/Fluent/HtmlPagerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using JetBrains.Annotations;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using X.PagedList.Extensions;

namespace X.PagedList.Mvc.Core.Fluent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Linq.Expressions;
using JetBrains.Annotations;

namespace X.PagedList;
namespace X.PagedList.Extensions;

/// <summary>
/// Container for extension methods designed to simplify the creation of instances of <see cref="PagedList{T}"/>.
Expand Down
6 changes: 3 additions & 3 deletions src/X.PagedList/X.PagedList.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</PropertyGroup>

<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath=""/>
<None Include="../../LICENSE.md" Pack="true" PackagePath=""/>
<None Include="../../README.md" Pack="true" PackagePath="" />
<None Include="../../LICENSE.md" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="all"/>
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="all" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions tests/X.PagedList.Tests/PagedListExample.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Linq;
using X.PagedList.Extensions;

namespace X.PagedList.Tests;

Expand Down
1 change: 1 addition & 0 deletions tests/X.PagedList.Tests/PagedListFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using X.PagedList.Extensions;
using Xunit;

namespace X.PagedList.Tests;
Expand Down
1 change: 1 addition & 0 deletions tests/X.PagedList.Tests/PagedListTheories.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AutoFixture;
using System.Linq;
using X.PagedList.Extensions;
using Xunit;

namespace X.PagedList.Tests;
Expand Down
1 change: 1 addition & 0 deletions tests/X.PagedList.Tests/SplitAndPartitionFacts.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using X.PagedList.Extensions;
using Xunit;

namespace X.PagedList.Tests;
Expand Down

0 comments on commit 14e6f89

Please sign in to comment.