Skip to content

Commit 42294ed

Browse files
committed
cleanup
1 parent 96394b8 commit 42294ed

12 files changed

Lines changed: 328 additions & 364 deletions

src/OutputCacheModuleAsync/CacheDirectives.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ static class CacheDirectives {
55
public const string NoStore = "no-store";
66
public const string MaxAge = "max-age=";
77
public const string MinFresh = "min-fresh=";
8-
public const string CacheControl = "Cache-Control";
9-
public const string Pragma = "Pragma";
10-
public const string Range = "Range";
118
}
129
}

src/OutputCacheModuleAsync/CachedRawResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Microsoft.AspNet.OutputCache {
22
using System;
33

4-
class CachedRawResponse {
4+
sealed class CachedRawResponse {
55

66
public Guid CachedVaryId { get; set; }
77

src/OutputCacheModuleAsync/CachedVary.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Microsoft.AspNet.OutputCache {
22
using System;
33

4-
class CachedVary {
4+
sealed class CachedVary {
55
public string[] ContentEncodings { get; set; }
66
public string[] Headers { get; set; }
77
public string[] Params { get; set; }
@@ -14,7 +14,7 @@ public CachedVary() {
1414
}
1515

1616
public override bool Equals(object obj) {
17-
if (Object.ReferenceEquals(obj,this)) {
17+
if (Object.ReferenceEquals(obj, this)) {
1818
return true;
1919
}
2020
var cv = obj as CachedVary;
@@ -27,6 +27,7 @@ public override bool Equals(object obj) {
2727
&& StringUtil.StringArrayEquals(Headers, cv.Headers)
2828
&& StringUtil.StringArrayEquals(Params, cv.Params);
2929
}
30+
3031
public override int GetHashCode() {
3132
return base.GetHashCode();
3233
}

src/OutputCacheModuleAsync/HttpMethods.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Security.Policy;
5-
using System.Text;
6-
using System.Threading.Tasks;
7-
8-
namespace Microsoft.AspNet.OutputCache {
1+
namespace Microsoft.AspNet.OutputCache {
92
static class HttpMethods {
103
public const string POST = "POST";
114
public const string HEAD = "HEAD";

src/OutputCacheModuleAsync/HttpRawResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections;
33
using System.Collections.Specialized;
44

5-
class HttpRawResponse {
5+
sealed class HttpRawResponse {
66
public int StatusCode { get; set; }
77
public string StatusDescription { get; set; }
88
public NameValueCollection Headers { get; set; }

src/OutputCacheModuleAsync/InMemoryOutputCacheProvider.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public override object Add(string key, object entry, DateTime utcExpiry) {
3535
return _cache.Add(key, entry, expiration) ? entry : null;
3636
}
3737

38-
public void Add(string depKey, DependencyCacheEntryWrapper dcew, DateTimeOffset dateTimeOffsetValue) {
39-
_cache.Add(depKey, dcew, dateTimeOffsetValue);
40-
}
41-
4238
public override void Set(string key, object entry, DateTime utcExpiry) {
4339
DateTimeOffset expiration = (utcExpiry == Cache.NoAbsoluteExpiration) ? ObjectCache.InfiniteAbsoluteExpiration : utcExpiry;
4440
_cache.Set(key, entry, expiration);

src/OutputCacheModuleAsync/Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@
7979
<LastGenOutput>SR.Designer.cs</LastGenOutput>
8080
</EmbeddedResource>
8181
</ItemGroup>
82-
<ItemGroup>
83-
<None Include="35MSSharedLib1024.snk" />
84-
</ItemGroup>
8582
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8683
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8784
Other similar extension points exist, see Microsoft.Common.targets.

src/OutputCacheModuleAsync/OutputCacheHelper.cs

Lines changed: 314 additions & 328 deletions
Large diffs are not rendered by default.

src/OutputCacheModuleAsync/OutputCacheModuleAsync.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
namespace Microsoft.AspNet.OutputCache {
2-
using System.Collections.Generic;
32
using System;
4-
using System.Linq;
53
using System.Threading.Tasks;
6-
using System.Globalization;
74
using System.Web;
85
using System.Web.Caching;
9-
using System.Collections.Specialized;
106
using System.Web.Configuration;
117
using System.Configuration;
128

@@ -56,7 +52,7 @@ private async Task OnEnterAsync(object source, EventArgs eventArgs) {
5652
string key = OutputCacheHelper.CreateOutputCachedItemKey(context, null);
5753

5854
// Lookup the cache vary using the key
59-
object item = await OutputCacheHelper.GetItemAsync(key);
55+
object item = await OutputCacheHelper.GetAsync(key);
6056
if (item == null) {
6157
return;
6258
}

src/OutputCacheModuleAsync/TaskWrapperAsyncResults.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public TaskWrapperAsyncResult(Task task, object asyncState) {
1313
}
1414

1515
public object AsyncState { get; }
16+
1617
public WaitHandle AsyncWaitHandle => ((IAsyncResult) Task).AsyncWaitHandle;
1718

1819
public bool CompletedSynchronously

0 commit comments

Comments
 (0)