Skip to content

Commit b9783c5

Browse files
committed
refactor code for code review and finish signed build scripts
1 parent d837210 commit b9783c5

27 files changed

Lines changed: 1111 additions & 642 deletions

Microsoft.AspNet.OutputCache.sln

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCache", "src\OutputCacheModuleAsync\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.csproj", "{3B446E33-7B1C-4A32-AEB8-92DC6CE94F77}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCache.OutputCacheModuleAsync", "src\OutputCacheModuleAsync\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.csproj", "{3B446E33-7B1C-4A32-AEB8-92DC6CE94F77}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomOutputCacheProvider", "src\CustomOutputCacheProvider\Microsoft.AspNet.OutputCache.CustomOutputCacheProvider.csproj", "{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCache.CustomOutputCacheProvider", "src\CustomOutputCacheProvider\Microsoft.AspNet.OutputCache.CustomOutputCacheProvider.csproj", "{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testnewcache", "..\..\testoutputcache\testnewcache\testnewcache.csproj", "{1D14BBD9-C8D6-4A08-949C-2395005E22A4}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComparewithOldCache", "ComparewithOldCache\ComparewithOldCache.csproj", "{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}"
913
EndProject
1014
Global
1115
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,6 +25,14 @@ Global
2125
{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}.Debug|Any CPU.Build.0 = Debug|Any CPU
2226
{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}.Release|Any CPU.ActiveCfg = Release|Any CPU
2327
{A8F3E399-BCAF-4F3E-BC16-5CA98A779916}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{1D14BBD9-C8D6-4A08-949C-2395005E22A4}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{DA686514-993E-4FA9-8B1D-9A5DCCF9CD4E}.Release|Any CPU.Build.0 = Release|Any CPU
2436
EndGlobalSection
2537
GlobalSection(SolutionProperties) = preSolution
2638
HideSolutionNode = FALSE

MicrosoftAspNetOutputCache.msbuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="tools\MicrosoftAspNetOutputCache.settings.targets"/>
3-
3+
44
<ItemGroup>
55
<AssemblyProject Include="src\OutputCacheModuleAsync\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.csproj" />
66
<AssemblyProject Include="src\CustomOutputCacheProvider\Microsoft.AspNet.OutputCache.CustomOutputCacheProvider.csproj" />
@@ -28,7 +28,7 @@
2828

2929
<!-- Packages build -->
3030

31-
<Target Name="BuildPackages" DependsOnTargets="CopyInstallScripts;RestorePackages">
31+
<Target Name="BuildPackages" DependsOnTargets="RestorePackages">
3232
<MSBuild Targets="" Projects="@(PackageProject)" />
3333
</Target>
3434

src/CustomOutputCacheProvider/CustomOutputCacheProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Microsoft.AspNet.OutputCache.CustomOutputCacheProvider {
77

8-
internal class CustomOutputCacheItem {
8+
class CustomOutputCacheItem {
99
public object Obj;
1010
public DateTime UtcExpiry;
1111
public CustomOutputCacheItem(object entry, DateTime utcExpiryIn) {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Microsoft.AspNet.OutputCache {
2+
3+
static class CacheDirectives {
4+
public const string NoCache = "no-cache";
5+
public const string NoStore = "no-store";
6+
public const string MaxAge = "max-age=";
7+
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";
11+
}
12+
}

src/OutputCacheModuleAsync/CachedVary.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ public override bool Equals(object obj) {
2727
&& StringUtil.StringArrayEquals(Headers, cv.Headers)
2828
&& StringUtil.StringArrayEquals(Params, cv.Params);
2929
}
30+
public override int GetHashCode() {
31+
return base.GetHashCode();
32+
}
3033
}
3134
}

src/OutputCacheModuleAsync/DependencyCacheEntry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
using System;
33
using System.Web.Caching;
44

5-
class DependencyCacheEntry {
5+
sealed class DependencyCacheEntry {
66
public string RawResponseKey;
77
public string KernelCacheUrl;
88
public string Name;
99
}
1010

11-
class DependencyCacheEntryWrapper {
11+
sealed class DependencyCacheEntryWrapper {
1212
public DependencyCacheEntry DependencyCacheEntry;
1313
public CacheDependency Dependencies;
1414
public TimeSpan DependencyCacheTimeSpan;

src/OutputCacheModuleAsync/HttpCachePolicySettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
using System.Collections.Generic;
44
using System.Web;
55
using System.Linq;
6-
class HttpCachePolicySettings {
6+
7+
sealed class HttpCachePolicySettings {
78
public HttpCacheability Cacheability { get; set; }
89
public IEnumerable<KeyValuePair<HttpCacheValidateHandler, object>> ValidationCallbackInfo { get; set; }
910
public bool IgnoreRangeRequests { get; set; }

src/OutputCacheModuleAsync/HttpRawResponse.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ class HttpRawResponse {
77
public string StatusDescription { get; set; }
88
public NameValueCollection Headers { get; set; }
99
public ArrayList Buffers { get; set; }
10-
public bool HasSubstBlocks { get; set; }
1110
}
1211
}
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
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 HttpRequestHeaders {
10-
public const string IfModifiedSite = "If-Modified-Since";
3+
public const string IfModifiedSince = "If-Modified-Since";
114
public const string IfNoneMatch = "If-None-Match";
125
public const string AcceptEncoding = "Accept-Encoding";
136
public const string ContentEncoding = "Content-Encoding";
147
public const string CacheControl = "Cache-Control";
158
public const string Pragma = "Pragma";
169
public const string Range = "Range";
1710
}
18-
static class CacheDirectives {
19-
public const string NoCache = "no-cache";
20-
public const string NoStore = "no-store";
21-
public const string MaxAge = "max-age=";
22-
public const string MinFresh = "min-fresh=";
23-
public const string CacheControl = "Cache-Control";
24-
public const string Pragma = "Pragma";
25-
public const string Range = "Range";
26-
}
2711
}

src/OutputCacheModuleAsync/InMemoryOutputCacheProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
using System.Runtime.Caching;
44
using System.Threading.Tasks;
55
using System.Web.Caching;
6-
using Microsoft.AspNet.OutputCache.Resource;
6+
using Resource;
7+
78
class InMemoryOutputCacheProvider : OutputCacheProviderAsync {
89
private readonly MemoryCache _cache = new MemoryCache(SR.Microsoft_AspNet_OutputCache_Default_InMemory_Provider);
910

0 commit comments

Comments
 (0)