Skip to content

Commit f546646

Browse files
authored
Merge pull request #121 from programcsharp/cookie-refactor
Cookie refactor
2 parents 34ccb16 + 8e63504 commit f546646

Some content is hidden

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

51 files changed

+3585
-3957
lines changed

Build/CommonAssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
//
1616
// You can specify all the values or you can default the Revision and Build Numbers
1717
// by using the '*' as shown below:
18-
[assembly: AssemblyVersion("3.6.41")]
19-
[assembly: AssemblyFileVersion("3.6.41")]
18+
[assembly: AssemblyVersion("3.7.4")]
19+
[assembly: AssemblyFileVersion("3.7.4")]
2020
//[assembly: AssemblyInformationalVersion("2.5-filters")]
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
namespace Griddly.Mvc
1+
namespace Griddly.Mvc;
2+
3+
//TODO: Put GriddlySettings into GriddlyContext so that it doesn't need to be passed in separately
4+
public class EmptyGridMessageTemplateParams
25
{
3-
//TODO: Put GriddlySettings into GriddlyContext so that it doesn't need to be passed in separately
4-
public class EmptyGridMessageTemplateParams
5-
{
6-
public GriddlyResultPage ResultPage { get; set; }
7-
public GriddlySettings Settings { get; set; }
8-
}
6+
public GriddlyResultPage ResultPage { get; set; }
7+
public GriddlySettings Settings { get; set; }
98
}
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
using System;
1+
namespace Griddly.Mvc.Exceptions;
22

3-
namespace Griddly.Mvc.Exceptions
3+
public class DapperGriddlyException : Exception
44
{
5-
public class DapperGriddlyException : Exception
6-
{
7-
public string Sql { get; protected set; }
8-
public object Params { get; protected set; }
5+
public string Sql { get; protected set; }
6+
public object Params { get; protected set; }
97

10-
public DapperGriddlyException(string message, string sql, object param = null, Exception ex = null)
11-
: base(message, ex)
12-
{
13-
Sql = sql;
14-
Params = param;
15-
}
8+
public DapperGriddlyException(string message, string sql, object param = null, Exception ex = null)
9+
: base(message, ex)
10+
{
11+
Sql = sql;
12+
Params = param;
1613
}
1714
}

Griddly.Mvc/GlobalEventArgs.cs

+47-70
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,58 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
4-
using System.Collections.Specialized;
5-
using System.Linq;
6-
using System.Linq.Expressions;
7-
using System.Reflection;
8-
using System.Web;
9-
#if NETFRAMEWORK
10-
using System.Web.Helpers;
11-
using System.Web.Mvc;
12-
using System.Web.Routing;
13-
using IHtmlHelper = System.Web.Mvc.HtmlHelper;
14-
using ActionContext = System.Web.Mvc.ControllerContext;
15-
#else
16-
using Microsoft.AspNetCore.Html;
17-
using Microsoft.AspNetCore.Mvc;
18-
using Microsoft.AspNetCore.Mvc.Rendering;
19-
using Microsoft.AspNetCore.Mvc.ViewFeatures;
20-
using Microsoft.AspNetCore.Routing;
21-
#endif
1+
namespace Griddly.Mvc;
222

23-
namespace Griddly.Mvc
3+
public class HandleCustomExportArgs
244
{
25-
public class HandleCustomExportArgs
5+
public HandleCustomExportArgs(GriddlyResult result, NameValueCollection formValues, ActionContext context)
266
{
27-
public HandleCustomExportArgs(GriddlyResult result, NameValueCollection formValues, ActionContext context)
28-
{
29-
Result = result;
30-
FormValues = formValues;
31-
ActionContext = context;
32-
}
33-
34-
public GriddlyResult Result { get; set; }
35-
public NameValueCollection FormValues { get; set; }
36-
public ActionContext ActionContext { get; set; }
7+
Result = result;
8+
FormValues = formValues;
9+
ActionContext = context;
3710
}
38-
public class BeforeRenderArgs
39-
{
40-
public BeforeRenderArgs(GriddlySettings settings, GriddlyResultPage resultPage, IHtmlHelper html, bool isFirstRender)
41-
{
42-
Settings = settings;
43-
ResultPage = resultPage;
44-
Html = html;
45-
IsFirstRender = isFirstRender;
46-
}
4711

48-
public GriddlySettings Settings { get; set; }
49-
public GriddlyResultPage ResultPage { get; set; }
50-
public IHtmlHelper Html { get; set; }
51-
public bool IsFirstRender { get; set; }
52-
}
53-
public class GriddlyResultExecutingArgs
12+
public GriddlyResult Result { get; set; }
13+
public NameValueCollection FormValues { get; set; }
14+
public ActionContext ActionContext { get; set; }
15+
}
16+
public class BeforeRenderArgs
17+
{
18+
public BeforeRenderArgs(GriddlySettings settings, GriddlyResultPage resultPage, IHtmlHelper html, bool isFirstRender)
5419
{
55-
public GriddlyResultExecutingArgs(GriddlyResult result, GriddlySettings settings, ActionContext context)
56-
{
57-
Result = result;
58-
Settings = settings;
59-
ActionContext = context;
60-
}
61-
62-
public GriddlyResult Result { get; }
63-
public GriddlySettings Settings { get; set; }
64-
public ActionContext ActionContext { get; set; }
20+
Settings = settings;
21+
ResultPage = resultPage;
22+
Html = html;
23+
IsFirstRender = isFirstRender;
6524
}
66-
public class GriddlyPageExecutingArgs
25+
26+
public GriddlySettings Settings { get; set; }
27+
public GriddlyResultPage ResultPage { get; set; }
28+
public IHtmlHelper Html { get; set; }
29+
public bool IsFirstRender { get; set; }
30+
}
31+
public class GriddlyResultExecutingArgs
32+
{
33+
public GriddlyResultExecutingArgs(GriddlyResult result, GriddlySettings settings, ActionContext context)
6734
{
68-
public GriddlyPageExecutingArgs(GriddlyResult result, GriddlySettings settings, GriddlyContext griddlyContext, ActionContext actionContext)
69-
{
70-
Result = result;
71-
Settings = settings;
72-
GriddlyContext = griddlyContext;
73-
ActionContext = actionContext;
74-
}
35+
Result = result;
36+
Settings = settings;
37+
ActionContext = context;
38+
}
7539

76-
public GriddlyResult Result { get; }
77-
public GriddlySettings Settings { get; set; }
78-
public GriddlyContext GriddlyContext { get; set; }
79-
public ActionContext ActionContext { get; set; }
40+
public GriddlyResult Result { get; }
41+
public GriddlySettings Settings { get; set; }
42+
public ActionContext ActionContext { get; set; }
43+
}
44+
public class GriddlyPageExecutingArgs
45+
{
46+
public GriddlyPageExecutingArgs(GriddlyResult result, GriddlySettings settings, GriddlyContext griddlyContext, ActionContext actionContext)
47+
{
48+
Result = result;
49+
Settings = settings;
50+
GriddlyContext = griddlyContext;
51+
ActionContext = actionContext;
8052
}
53+
54+
public GriddlyResult Result { get; }
55+
public GriddlySettings Settings { get; set; }
56+
public GriddlyContext GriddlyContext { get; set; }
57+
public ActionContext ActionContext { get; set; }
8158
}

Griddly.Mvc/GlobalUsings.cs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
global using System;
2+
global using System.Collections;
3+
global using System.Collections.Generic;
4+
global using System.Collections.Specialized;
5+
global using System.Linq;
6+
global using System.Linq.Expressions;
7+
global using System.Reflection;
8+
global using System.Web;
9+
10+
#if NETFRAMEWORK
11+
global using System.Web.Mvc;
12+
global using System.Web.Helpers;
13+
global using System.Web.Routing;
14+
global using IHtmlHelper = System.Web.Mvc.HtmlHelper;
15+
global using ActionContext = System.Web.Mvc.ControllerContext;
16+
global using HttpMethod = System.Web.Mvc.HttpVerbs;
17+
#else
18+
global using System.Net.Http;
19+
global using Microsoft.AspNetCore.Html;
20+
global using Microsoft.AspNetCore.Mvc;
21+
global using Microsoft.AspNetCore.Mvc.Rendering;
22+
global using Microsoft.AspNetCore.Mvc.ViewFeatures;
23+
global using Microsoft.AspNetCore.Routing;
24+
global using HttpRequest = Microsoft.AspNetCore.Http.HttpRequest;
25+
global using HttpContext = Microsoft.AspNetCore.Http.HttpContext;
26+
global using HttpContextBase = Microsoft.AspNetCore.Http.HttpContext;
27+
global using HelperResult = Microsoft.AspNetCore.Html.IHtmlContent;
28+
#endif

Griddly.Mvc/Griddly.Mvc.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
55
<RootNamespace>Griddly.Mvc</RootNamespace>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
7+
<LangVersion>10</LangVersion>
78
</PropertyGroup>
89

910
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
@@ -17,14 +18,14 @@
1718
<ItemGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
1819
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
1920
<PackageReference Include="PluralizeService.Core" Version="1.0.0.5" />
20-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.9.2" />
21+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.8" />
2122
</ItemGroup>
2223

2324
<ItemGroup>
2425
<PackageReference Include="CsvHelper" Version="27.1.1" />
2526
<PackageReference Include="Dapper" Version="2.0.90" />
2627
<PackageReference Include="EPPlus" Version="4.5.3" />
27-
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
28+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2829
</ItemGroup>
2930

3031
<ItemGroup>

0 commit comments

Comments
 (0)