Skip to content

Commit 1d78902

Browse files
committed
Update Eexamples. Update project versions. Update referenced packages.
1 parent 81700c4 commit 1d78902

File tree

490 files changed

+210
-104609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

490 files changed

+210
-104609
lines changed

X.PagedList.sln

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "X.PagedList.Tests", "tests\
1919
EndProject
2020
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X.PagedList.Mvc.Example", "examples\X.PagedList.Mvc.Example\X.PagedList.Mvc.Example.csproj", "{7DA46F0E-B5DD-4A4C-8B18-645101E1C3B0}"
2121
EndProject
22-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "X.PagedList.Mvc.Example.Core", "examples\X.PagedList.Mvc.Example.Core\X.PagedList.Mvc.Example.Core.csproj", "{89EA823D-1A1B-4569-B33B-A54CEFAFE480}"
23-
EndProject
2422
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "X.PagedList.Web.Common", "src\X.PagedList.Web.Common\X.PagedList.Web.Common.csproj", "{A83A2188-D9AB-4A53-9888-D00EBCAC5160}"
2523
EndProject
2624
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "X.PagedList.EF", "src\X.PagedList.EF\X.PagedList.EF.csproj", "{5D72EF31-35AD-4FB6-987A-5644B8CFD918}"
2725
EndProject
2826
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "X.PagedList.EF.Tests", "tests\X.PagedList.EF.Tests\X.PagedList.EF.Tests.csproj", "{75367B5D-FB8B-4B1C-884C-DB52B316EB7C}"
2927
EndProject
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X.PagedList.Mvc.Example.Core", "examples\X.PagedList.Mvc.Example.Core\X.PagedList.Mvc.Example.Core.csproj", "{288F5726-904F-48B8-8363-EA1A22D331D1}"
29+
EndProject
3030
Global
3131
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3232
Debug|Any CPU = Debug|Any CPU
@@ -53,10 +53,6 @@ Global
5353
{7DA46F0E-B5DD-4A4C-8B18-645101E1C3B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
5454
{7DA46F0E-B5DD-4A4C-8B18-645101E1C3B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
5555
{7DA46F0E-B5DD-4A4C-8B18-645101E1C3B0}.Release|Any CPU.Build.0 = Release|Any CPU
56-
{89EA823D-1A1B-4569-B33B-A54CEFAFE480}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57-
{89EA823D-1A1B-4569-B33B-A54CEFAFE480}.Debug|Any CPU.Build.0 = Debug|Any CPU
58-
{89EA823D-1A1B-4569-B33B-A54CEFAFE480}.Release|Any CPU.ActiveCfg = Release|Any CPU
59-
{89EA823D-1A1B-4569-B33B-A54CEFAFE480}.Release|Any CPU.Build.0 = Release|Any CPU
6056
{A83A2188-D9AB-4A53-9888-D00EBCAC5160}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6157
{A83A2188-D9AB-4A53-9888-D00EBCAC5160}.Debug|Any CPU.Build.0 = Debug|Any CPU
6258
{A83A2188-D9AB-4A53-9888-D00EBCAC5160}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -69,6 +65,10 @@ Global
6965
{75367B5D-FB8B-4B1C-884C-DB52B316EB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
7066
{75367B5D-FB8B-4B1C-884C-DB52B316EB7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
7167
{75367B5D-FB8B-4B1C-884C-DB52B316EB7C}.Release|Any CPU.Build.0 = Release|Any CPU
68+
{288F5726-904F-48B8-8363-EA1A22D331D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69+
{288F5726-904F-48B8-8363-EA1A22D331D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
70+
{288F5726-904F-48B8-8363-EA1A22D331D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
71+
{288F5726-904F-48B8-8363-EA1A22D331D1}.Release|Any CPU.Build.0 = Release|Any CPU
7272
EndGlobalSection
7373
GlobalSection(SolutionProperties) = preSolution
7474
HideSolutionNode = FALSE
@@ -79,10 +79,10 @@ Global
7979
{3FB17E16-B671-450F-81BD-FD607D6A78C4} = {BDDADD09-D112-418E-8469-BC762EC09936}
8080
{C78B1316-1EF9-45C3-A3FD-9A131BA3DD62} = {0170B742-C624-4C22-9DE1-2A93CF9C12D6}
8181
{7DA46F0E-B5DD-4A4C-8B18-645101E1C3B0} = {309A8FC8-4784-4D8D-903F-BD54EBB0F1D7}
82-
{89EA823D-1A1B-4569-B33B-A54CEFAFE480} = {309A8FC8-4784-4D8D-903F-BD54EBB0F1D7}
8382
{A83A2188-D9AB-4A53-9888-D00EBCAC5160} = {BDDADD09-D112-418E-8469-BC762EC09936}
8483
{5D72EF31-35AD-4FB6-987A-5644B8CFD918} = {BDDADD09-D112-418E-8469-BC762EC09936}
8584
{75367B5D-FB8B-4B1C-884C-DB52B316EB7C} = {0170B742-C624-4C22-9DE1-2A93CF9C12D6}
85+
{288F5726-904F-48B8-8363-EA1A22D331D1} = {309A8FC8-4784-4D8D-903F-BD54EBB0F1D7}
8686
EndGlobalSection
8787
GlobalSection(ExtensibilityGlobals) = postSolution
8888
SolutionGuid = {1A82D446-6F26-48B2-8085-DFA5F87453FC}

examples/X.PagedList.Mvc.Example.Core/.bowerrc

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
using System.IO;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
25
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.Extensions.Configuration;
7+
using Microsoft.Extensions.Hosting;
8+
using Microsoft.Extensions.Logging;
39

410
namespace X.PagedList.Mvc.Example.Core
511
{
612
public class Program
713
{
814
public static void Main(string[] args)
915
{
10-
var host = new WebHostBuilder()
11-
.UseKestrel()
12-
.UseContentRoot(Directory.GetCurrentDirectory())
13-
.UseIISIntegration()
14-
.UseStartup<Startup>()
15-
.Build();
16-
17-
host.Run();
16+
CreateHostBuilder(args).Build().Run();
1817
}
18+
19+
public static IHostBuilder CreateHostBuilder(string[] args) =>
20+
Host.CreateDefaultBuilder(args)
21+
.ConfigureWebHostDefaults(webBuilder =>
22+
{
23+
webBuilder.UseStartup<Startup>();
24+
});
1925
}
2026
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{
1+
{
22
"iisSettings": {
3-
"windowsAuthentication": false,
4-
"anonymousAuthentication": true,
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
55
"iisExpress": {
6-
"applicationUrl": "http://localhost:49951/",
7-
"sslPort": 0
6+
"applicationUrl": "http://localhost:55924",
7+
"sslPort": 44326
88
}
99
},
1010
"profiles": {
@@ -16,7 +16,12 @@
1616
}
1717
},
1818
"X.PagedList.Mvc.Example.Core": {
19-
"commandName": "Project"
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
22+
"environmentVariables": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
}
2025
}
2126
}
22-
}
27+
}

examples/X.PagedList.Mvc.Example.Core/Startup.cs

+22-21
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
1-
using Microsoft.AspNetCore.Builder;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Builder;
26
using Microsoft.AspNetCore.Hosting;
7+
using Microsoft.AspNetCore.HttpsPolicy;
38
using Microsoft.Extensions.Configuration;
49
using Microsoft.Extensions.DependencyInjection;
5-
using Microsoft.Extensions.Logging;
10+
using Microsoft.Extensions.Hosting;
611

712
namespace X.PagedList.Mvc.Example.Core
813
{
914
public class Startup
1015
{
11-
public Startup(IHostingEnvironment env)
16+
public Startup(IConfiguration configuration)
1217
{
13-
var builder = new ConfigurationBuilder()
14-
.SetBasePath(env.ContentRootPath)
15-
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
16-
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
17-
.AddEnvironmentVariables();
18-
Configuration = builder.Build();
18+
Configuration = configuration;
1919
}
2020

21-
public IConfigurationRoot Configuration { get; }
21+
public IConfiguration Configuration { get; }
2222

2323
// This method gets called by the runtime. Use this method to add services to the container.
2424
public void ConfigureServices(IServiceCollection services)
2525
{
26-
// Add framework services.
27-
services.AddMvc();
26+
services.AddControllersWithViews();
2827
}
2928

3029
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
31-
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
30+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
3231
{
33-
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
34-
loggerFactory.AddDebug();
35-
3632
if (env.IsDevelopment())
3733
{
3834
app.UseDeveloperExceptionPage();
39-
app.UseBrowserLink();
4035
}
4136
else
4237
{
4338
app.UseExceptionHandler("/Home/Error");
39+
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
40+
app.UseHsts();
4441
}
45-
42+
app.UseHttpsRedirection();
4643
app.UseStaticFiles();
4744

48-
app.UseMvc(routes =>
45+
app.UseRouting();
46+
47+
app.UseAuthorization();
48+
49+
app.UseEndpoints(endpoints =>
4950
{
50-
routes.MapRoute(
51+
endpoints.MapControllerRoute(
5152
name: "default",
52-
template: "{controller=Home}/{action=Index}/{id?}");
53+
pattern: "{controller=Home}/{action=Index}/{id?}");
5354
});
5455
}
5556
}

examples/X.PagedList.Mvc.Example.Core/Views/Bootstrap41/Index.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@*import this so we can cast our list to IPagedList (only necessary because ViewBag is dynamic)*@
1010

1111
<!-- import the included stylesheet for some (very basic) default styling -->
12-
<link href="/Content/PagedList.css" rel="stylesheet" type="text/css" />
12+
<link href="/css/PagedList.css" rel="stylesheet" type="text/css" />
1313

1414
<!-- loop through each of your products and display it however you want. we're just printing the name here -->
1515
<section class="mt-4">

examples/X.PagedList.Mvc.Example.Core/Views/Home/Index.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
<!-- import the included stylesheet for some (very basic) default styling -->
13-
<link href="/Content/PagedList.css" rel="stylesheet" type="text/css" />
13+
<link href="/css/PagedList.css" rel="stylesheet" type="text/css" />
1414

1515
<!-- loop through each of your products and display it however you want. we're just printing the name here -->
1616
<h2>List of Products</h2>

examples/X.PagedList.Mvc.Example.Core/Views/Shared/_Layout-41.cshtml

+9-26
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>@ViewData["Title"] - X.PagedList.Mvc.Example.Core</title>
77

8+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" />
9+
810
<environment names="Development">
9-
<link rel="stylesheet" href="~/lib/bootstrap-modern/dist/css/bootstrap.css" />
1011
<link rel="stylesheet" href="~/css/site.css" />
1112
<link rel="stylesheet" href="~/css/PagedList.css" />
1213
</environment>
1314
<environment names="Staging,Production">
14-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
15-
asp-fallback-href="~/lib/bootstrap-modern/dist/css/bootstrap.css"
16-
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
1715
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
16+
<link rel="stylesheet" href="~/css/PagedList.css" />
1817
</environment>
1918
</head>
2019
<body>
@@ -45,28 +44,12 @@
4544
</footer>
4645
</div>
4746

48-
<environment names="Development">
49-
<script src="~/lib/jquery/dist/jquery.js"></script>
50-
<script src="~/lib/bootstrap-modern/dist/js/bootstrap.js"></script>
51-
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.js"></script>
52-
<script src="~/js/site.js" asp-append-version="true"></script>
53-
</environment>
54-
<environment names="Staging,Production">
55-
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
56-
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
57-
asp-fallback-test="window.jQuery"
58-
crossorigin="anonymous"
59-
integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
60-
</script>
61-
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"></script>
62-
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
63-
asp-fallback-src="~/lib/bootstrap-modern/dist/js/bootstrap.js"
64-
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
65-
crossorigin="anonymous"
66-
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy">
67-
</script>
68-
<script src="~/js/site.min.js" asp-append-version="true"></script>
69-
</environment>
47+
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"></script>
48+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
49+
<script src="/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.js"></script>
50+
51+
52+
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.4/jquery.validate.unobtrusive.js"></script>-->
7053

7154
@RenderSection("Scripts", required: false)
7255
</body>

examples/X.PagedList.Mvc.Example.Core/Views/Shared/_Layout.cshtml

+6-27
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>@ViewData["Title"] - X.PagedList.Mvc.Example.Core</title>
7-
7+
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css" />
88
<environment names="Development">
9-
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
109
<link rel="stylesheet" href="~/css/site.css" />
1110
<link rel="stylesheet" href="~/css/PagedList.css" />
1211
</environment>
1312
<environment names="Staging,Production">
14-
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
15-
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
16-
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
1713
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
1814
</environment>
1915
</head>
@@ -46,29 +42,12 @@
4642
<p>&copy; @DateTime.Now.Year - X.PagedList.Mvc.Example.Core</p>
4743
</footer>
4844
</div>
45+
46+
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"></script>
47+
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
48+
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.11/jquery.validate.unobtrusive.min.js"></script>-->
49+
<script src="/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.js"></script>
4950

50-
<environment names="Development">
51-
<script src="~/lib/jquery/dist/jquery.js"></script>
52-
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
53-
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.js"></script>
54-
<script src="~/js/site.js" asp-append-version="true"></script>
55-
</environment>
56-
<environment names="Staging,Production">
57-
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
58-
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
59-
asp-fallback-test="window.jQuery"
60-
crossorigin="anonymous"
61-
integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
62-
</script>
63-
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"></script>
64-
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
65-
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
66-
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
67-
crossorigin="anonymous"
68-
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
69-
</script>
70-
<script src="~/js/site.min.js" asp-append-version="true"></script>
71-
</environment>
7251

7352
@RenderSection("Scripts", required: false)
7453
</body>
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
</PropertyGroup>
6-
7-
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
9-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
10-
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
11-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.2.0" />
12-
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
13-
</ItemGroup>
146

157
<ItemGroup>
168
<ProjectReference Include="..\..\src\X.PagedList.Mvc.Core\X.PagedList.Mvc.Core.csproj" />
9+
<ProjectReference Include="..\..\src\X.PagedList\X.PagedList.csproj" />
1710
</ItemGroup>
11+
12+
13+
1814
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
{
1+
{
22
"Logging": {
3-
"IncludeScopes": false,
43
"LogLevel": {
5-
"Default": "Debug",
6-
"System": "Information",
7-
"Microsoft": "Information"
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
87
}
98
}
109
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{
1+
{
22
"Logging": {
3-
"IncludeScopes": false,
43
"LogLevel": {
5-
"Default": "Warning"
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
67
}
7-
}
8+
},
9+
"AllowedHosts": "*"
810
}

examples/X.PagedList.Mvc.Example.Core/bower.json

-12
This file was deleted.

0 commit comments

Comments
 (0)