From b9541be20dc7b63b9880f7eab8a8619d1b1be4b0 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 5 Jul 2017 09:59:14 -0700 Subject: [PATCH] React to ISession cancellation changes --- .../ViewComponentTests.cs | 5 +++-- .../ViewFeatures/SessionStateTempDataProviderTest.cs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentTests.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentTests.cs index 40718d8a69..772d5be1be 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewComponentTests.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.Encodings.Web; +using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; @@ -276,12 +277,12 @@ namespace Microsoft.AspNetCore.Mvc public bool IsAvailable { get; } = true; - public Task LoadAsync() + public Task LoadAsync(CancellationToken cancellationToken = default(CancellationToken)) { return Task.FromResult(0); } - public Task CommitAsync() + public Task CommitAsync(CancellationToken cancellationToken = default(CancellationToken)) { return Task.FromResult(0); } diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/SessionStateTempDataProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/SessionStateTempDataProviderTest.cs index 1d3887ca32..3df754fa95 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/SessionStateTempDataProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/ViewFeatures/SessionStateTempDataProviderTest.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; @@ -305,12 +306,12 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures public bool IsAvailable { get; } = true; - public Task LoadAsync() + public Task LoadAsync(CancellationToken cancellationToken = default(CancellationToken)) { return Task.FromResult(0); } - public Task CommitAsync() + public Task CommitAsync(CancellationToken cancellationToken = default(CancellationToken)) { return Task.FromResult(0); }