Skip to content

Commit 14e6f89

Browse files
committed
Treewide: Provide specific namespace for Extensions (again)
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: #290
1 parent 650339b commit 14e6f89

File tree

9 files changed

+11
-4
lines changed

9 files changed

+11
-4
lines changed

examples/Example.Website/Controllers/AdminController.cs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Microsoft.AspNetCore.Mvc;
33
using System.Collections.Generic;
44
using X.PagedList;
5+
using X.PagedList.Extensions;
56

67
namespace Example.Website.Controllers;
78

examples/Example.Website/Controllers/HomeController.cs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Microsoft.AspNetCore.Mvc;
33
using System.Collections.Generic;
44
using X.PagedList;
5+
using X.PagedList.Extensions;
56

67
namespace Example.Website.Controllers;
78

src/X.PagedList.Mvc.Core/Fluent/HtmlPagerExtensions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using JetBrains.Annotations;
33
using Microsoft.AspNetCore.Html;
44
using Microsoft.AspNetCore.Mvc.Rendering;
5+
using X.PagedList.Extensions;
56

67
namespace X.PagedList.Mvc.Core.Fluent;
78

src/X.PagedList/PagedListExtensions.cs src/X.PagedList/Extensions/PagedListExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Linq.Expressions;
55
using JetBrains.Annotations;
66

7-
namespace X.PagedList;
7+
namespace X.PagedList.Extensions;
88

99
/// <summary>
1010
/// Container for extension methods designed to simplify the creation of instances of <see cref="PagedList{T}"/>.

src/X.PagedList/X.PagedList.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<None Include="../../README.md" Pack="true" PackagePath=""/>
15-
<None Include="../../LICENSE.md" Pack="true" PackagePath=""/>
14+
<None Include="../../README.md" Pack="true" PackagePath="" />
15+
<None Include="../../LICENSE.md" Pack="true" PackagePath="" />
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="all"/>
19+
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="all" />
2020
</ItemGroup>
2121

2222
</Project>

tests/X.PagedList.Tests/PagedListExample.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using X.PagedList.Extensions;
34

45
namespace X.PagedList.Tests;
56

tests/X.PagedList.Tests/PagedListFacts.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Linq.Expressions;
6+
using X.PagedList.Extensions;
67
using Xunit;
78

89
namespace X.PagedList.Tests;

tests/X.PagedList.Tests/PagedListTheories.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using AutoFixture;
22
using System.Linq;
3+
using X.PagedList.Extensions;
34
using Xunit;
45

56
namespace X.PagedList.Tests;

tests/X.PagedList.Tests/SplitAndPartitionFacts.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Linq;
2+
using X.PagedList.Extensions;
23
using Xunit;
34

45
namespace X.PagedList.Tests;

0 commit comments

Comments
 (0)