+18
-37
lines changedFilter options
+18
-37
lines changed Original file line number Diff line number Diff line change
@@ -16,18 +16,11 @@
16
16
</ItemGroup>
17
17
18
18
<ItemGroup>
19
-
<PackageReference Include="System.Data.SqlClient" Version="4.6.1" />
19
+
<PackageReference Include="System.Data.SqlClient" Version="4.7.0" />
20
20
</ItemGroup>
21
21
22
22
<ItemGroup>
23
23
<ProjectReference Include="..\Signum.Entities\Signum.Entities.csproj" />
24
24
<ProjectReference Include="..\Signum.Utilities\Signum.Utilities.csproj" />
25
25
</ItemGroup>
26
-
27
-
<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
28
-
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
29
-
<Exec command="dotnet "D:\Signum\southwind\Framework\Signum.MSBuildTask\bin\x64\Debug\netcoreapp2.1\Signum.MSBuildTask.dll" "@(IntermediateAssembly)" "$(BaseIntermediateOutputPath)SignumReferences.txt"" ConsoleToMSBuild="false">
30
-
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
31
-
</Exec>
32
-
</Target>
33
26
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1
1
<Project Sdk="Microsoft.NET.Sdk">
2
-
2
+
3
3
<PropertyGroup>
4
4
<TargetFramework>netcoreapp3.0</TargetFramework>
5
5
<LangVersion>preview</LangVersion>
@@ -10,26 +10,20 @@
10
10
<NoWarn>NU1605</NoWarn>
11
11
</PropertyGroup>
12
12
13
-
14
-
13
+
14
+
15
15
<ItemGroup>
16
16
<PackageReference Include="Signum.Analyzer" Version="2.4.5" />
17
17
<PackageReference Include="Signum.MSBuildTask" Version="1.0.7" />
18
18
</ItemGroup>
19
-
19
+
20
20
<ItemGroup>
21
21
<ProjectReference Include="..\Signum.Utilities\Signum.Utilities.csproj" />
22
22
</ItemGroup>
23
23
24
-
<ItemGroup>
24
+
<ItemGroup>
25
25
<None Update="Translations\*.xml">
26
26
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27
27
</None>
28
28
</ItemGroup>
29
-
<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
30
-
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
31
-
<Exec command="dotnet "D:\Signum\southwind\Framework\Signum.MSBuildTask\bin\x64\Debug\netcoreapp2.1\Signum.MSBuildTask.dll" "@(IntermediateAssembly)" "$(BaseIntermediateOutputPath)SignumReferences.txt"" ConsoleToMSBuild="false">
32
-
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
33
-
</Exec>
34
-
</Target>
35
29
</Project>
Original file line number Diff line number Diff line change
@@ -3,11 +3,13 @@
3
3
using Microsoft.AspNetCore.Mvc;
4
4
using Microsoft.AspNetCore.Mvc.Filters;
5
5
using Microsoft.AspNetCore.Mvc.Routing;
6
+
using Microsoft.AspNetCore.WebUtilities;
6
7
using Signum.Entities.Basics;
7
8
using Signum.Utilities;
8
9
using System;
9
10
using System.Collections.Generic;
10
11
using System.Globalization;
12
+
using System.Threading.Tasks;
11
13
12
14
namespace Signum.React.Filters
13
15
{
@@ -160,7 +162,7 @@ public static string Action<T>(this UrlHelper helper, string action, object valu
160
162
}
161
163
}
162
164
163
-
public abstract class SignumDisposableResourceFilter : IResourceFilter
165
+
public abstract class SignumDisposableResourceFilter : IAsyncResourceFilter
164
166
{
165
167
public string ResourceKey;
166
168
@@ -171,18 +173,10 @@ public SignumDisposableResourceFilter(string key)
171
173
172
174
public abstract IDisposable? GetResource(ResourceExecutingContext context);
173
175
174
-
public void OnResourceExecuting(ResourceExecutingContext context)
175
-
{
176
-
context.HttpContext.Items[ResourceKey] = GetResource(context);
177
-
}
178
-
179
-
public void OnResourceExecuted(ResourceExecutedContext context)
176
+
public async Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)
180
177
{
181
-
if (context.HttpContext.Items.TryGetValue(ResourceKey, out object? result))
182
-
{
183
-
if (result != null)
184
-
((IDisposable)result).Dispose();
185
-
}
178
+
using (GetResource(context))
179
+
await next();
186
180
}
187
181
}
188
182
}
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@
33
33
</PropertyGroup>
34
34
35
35
<ItemGroup>
36
-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0-preview8.19405.7" />
37
-
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.5.3">
36
+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
37
+
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.6.3">
38
38
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
39
39
<PrivateAssets>all</PrivateAssets>
40
40
</PackageReference>
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@
16
16
17
17
<ItemGroup>
18
18
<PackageReference Include="dotMorten.Microsoft.SqlServer.Types" Version="1.1.0" />
19
-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
20
-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
21
-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="2.2.0" />
22
-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
19
+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.0.0" />
20
+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.0.0" />
21
+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.0.0" />
22
+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
23
23
<PackageReference Include="Signum.Analyzer" Version="2.4.5" />
24
24
<PackageReference Include="xunit" Version="2.4.1" />
25
25
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4