From bc2cf1223ed5a6f905193f3ac1a9bf3a4d6e1ea6 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Tue, 1 Jul 2014 16:24:27 -0700 Subject: [PATCH] #89 - Rename OnRequestAborted to RequestAborted. --- src/Microsoft.AspNet.Http/HttpContext.cs | 2 +- .../IHttpRequestLifetimeFeature.cs | 2 +- src/Microsoft.AspNet.Owin/OwinEnvironment.cs | 2 +- src/Microsoft.AspNet.Owin/OwinFeatureCollection.cs | 2 +- src/Microsoft.AspNet.PipelineCore/DefaultHttpContext.cs | 4 ++-- test/Microsoft.AspNet.Owin.Tests/OwinEnvironmentTests.cs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.AspNet.Http/HttpContext.cs b/src/Microsoft.AspNet.Http/HttpContext.cs index f14a8b059b..89c421e5cb 100644 --- a/src/Microsoft.AspNet.Http/HttpContext.cs +++ b/src/Microsoft.AspNet.Http/HttpContext.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Http public abstract IServiceProvider RequestServices { get; set; } - public abstract CancellationToken OnRequestAborted { get; } + public abstract CancellationToken RequestAborted { get; } public abstract bool IsWebSocketRequest { get; } diff --git a/src/Microsoft.AspNet.HttpFeature/IHttpRequestLifetimeFeature.cs b/src/Microsoft.AspNet.HttpFeature/IHttpRequestLifetimeFeature.cs index dca2418de9..b6bcee9c32 100644 --- a/src/Microsoft.AspNet.HttpFeature/IHttpRequestLifetimeFeature.cs +++ b/src/Microsoft.AspNet.HttpFeature/IHttpRequestLifetimeFeature.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.HttpFeature [AssemblyNeutral] public interface IHttpRequestLifetimeFeature { - CancellationToken OnRequestAborted { get; } + CancellationToken RequestAborted { get; } void Abort(); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Owin/OwinEnvironment.cs b/src/Microsoft.AspNet.Owin/OwinEnvironment.cs index 5250b58479..914837c083 100644 --- a/src/Microsoft.AspNet.Owin/OwinEnvironment.cs +++ b/src/Microsoft.AspNet.Owin/OwinEnvironment.cs @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Owin _context = context; _entries = new Dictionary() { - { OwinConstants.CallCancelled, new FeatureMap(feature => feature.OnRequestAborted) }, + { OwinConstants.CallCancelled, new FeatureMap(feature => feature.RequestAborted) }, { OwinConstants.RequestProtocol, new FeatureMap(feature => feature.Protocol, (feature, value) => feature.Protocol = Convert.ToString(value)) }, { OwinConstants.RequestScheme, new FeatureMap(feature => feature.Scheme, (feature, value) => feature.Scheme = Convert.ToString(value)) }, { OwinConstants.RequestMethod, new FeatureMap(feature => feature.Method, (feature, value) => feature.Method = Convert.ToString(value)) }, diff --git a/src/Microsoft.AspNet.Owin/OwinFeatureCollection.cs b/src/Microsoft.AspNet.Owin/OwinFeatureCollection.cs index acd3b2f850..f546eaa930 100644 --- a/src/Microsoft.AspNet.Owin/OwinFeatureCollection.cs +++ b/src/Microsoft.AspNet.Owin/OwinFeatureCollection.cs @@ -218,7 +218,7 @@ namespace Microsoft.AspNet.Owin return Prop(OwinConstants.CommonKeys.ClientCertificate); } - CancellationToken IHttpRequestLifetimeFeature.OnRequestAborted + CancellationToken IHttpRequestLifetimeFeature.RequestAborted { get { return Prop(OwinConstants.CallCancelled); } } diff --git a/src/Microsoft.AspNet.PipelineCore/DefaultHttpContext.cs b/src/Microsoft.AspNet.PipelineCore/DefaultHttpContext.cs index b8383d05fe..a6b56103f8 100644 --- a/src/Microsoft.AspNet.PipelineCore/DefaultHttpContext.cs +++ b/src/Microsoft.AspNet.PipelineCore/DefaultHttpContext.cs @@ -109,14 +109,14 @@ namespace Microsoft.AspNet.PipelineCore public int Revision { get { return _features.Revision; } } - public override CancellationToken OnRequestAborted + public override CancellationToken RequestAborted { get { var lifetime = LifetimeFeature; if (lifetime != null) { - return lifetime.OnRequestAborted; + return lifetime.RequestAborted; } return CancellationToken.None; } diff --git a/test/Microsoft.AspNet.Owin.Tests/OwinEnvironmentTests.cs b/test/Microsoft.AspNet.Owin.Tests/OwinEnvironmentTests.cs index ddab64dca8..d7ce8ae590 100644 --- a/test/Microsoft.AspNet.Owin.Tests/OwinEnvironmentTests.cs +++ b/test/Microsoft.AspNet.Owin.Tests/OwinEnvironmentTests.cs @@ -155,7 +155,7 @@ namespace Microsoft.AspNet.Owin private class MoqHttpRequestLifetimeFeature : IHttpRequestLifetimeFeature { - public CancellationToken OnRequestAborted { get; private set; } + public CancellationToken RequestAborted { get; private set; } public void Abort() {