Skip to content

Commit fb5ef50

Browse files
committed
change some public classes to internal
change some public classes to internal
1 parent 699d4c6 commit fb5ef50

3 files changed

Lines changed: 7 additions & 36 deletions

File tree

src/OutputCacheModuleAsync/HttpCachePolicySettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Microsoft.AspNet.OutputCache {
55
using System.Collections.Generic;
66
using System.Web;
77

8-
public class HttpCachePolicySettings {
8+
internal class HttpCachePolicySettings {
99
public HttpCacheability Cacheability { get; set; }
1010
public IEnumerable<KeyValuePair<HttpCacheValidateHandler, object>> ValidationCallbackInfo { get; set; }
1111
public bool IgnoreRangeRequests { get; set; }

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-
public class HttpRawResponse {
5+
internal class HttpRawResponse {
66
public int StatusCode { get; set; }
77
public string StatusDescription { get; set; }
88
public NameValueCollection Headers { get; set; }

src/OutputCacheModuleAsync/Util.cs

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Globalization;
66
using System.Security.Cryptography;
77

8-
public class InvariantComparer : IComparer {
8+
internal class InvariantComparer : IComparer {
99
private readonly CompareInfo _mCompareInfo;
1010
public static InvariantComparer Default = new InvariantComparer();
1111

@@ -22,36 +22,7 @@ public int Compare(object a, object b) {
2222
}
2323
}
2424

25-
public class CryptoUtil {
26-
/// <summary>
27-
/// Computes the SHA256 hash of a given input.
28-
/// </summary>
29-
/// <param Name="input">The input over which to compute the hash.</param>
30-
/// <param name="input"></param>
31-
/// <returns>The binary hash (32 bytes) of the input.</returns>
32-
public static byte[] ComputeSha256Hash(byte[] input) {
33-
return ComputeSha256Hash(input, 0, input.Length);
34-
}
35-
36-
/// <summary>
37-
/// Computes the SHA256 hash of a given segment in a buffer.
38-
/// </summary>
39-
/// <param Name="buffer">The buffer over which to compute the hash.</param>
40-
/// <param Name="offset">The offset at which to begin computing the hash.</param>
41-
/// <param Name="count">The number of bytes in the buffer to include in the hash.</param>
42-
/// <param name="buffer"></param>
43-
/// <param name="offset"></param>
44-
/// <param name="count"></param>
45-
/// <returns>The binary hash (32 bytes) of the buffer segment.</returns>
46-
public static byte[] ComputeSha256Hash(byte[] buffer, int offset, int count) {
47-
48-
using (SHA256 sha256 = new SHA256Cng()) {
49-
return sha256.ComputeHash(buffer, offset, count);
50-
}
51-
}
52-
}
53-
54-
public class HttpDate {
25+
internal class HttpDate {
5526
private static readonly int[] s_tensDigit = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90};
5627

5728
private static int Atoi2(string s, int startIndex) {
@@ -130,7 +101,7 @@ private static int make_month(string s, int startIndex) {
130101
throw new FormatException("MakeMonthBadstring");
131102
}
132103

133-
public static DateTime UtcParse(string time) {
104+
internal static DateTime UtcParse(string time) {
134105
int i;
135106
int year, month, day, hour, minute, second;
136107
if (time == null) {
@@ -193,7 +164,7 @@ public static DateTime UtcParse(string time) {
193164
}
194165
}
195166

196-
public class HashCodeCombiner {
167+
internal class HashCodeCombiner {
197168
private long _combinedHash;
198169

199170
public HashCodeCombiner() {
@@ -229,7 +200,7 @@ public void AddObject(object o) {
229200
public int CombinedHash32 => _combinedHash.GetHashCode();
230201
}
231202

232-
public class StringUtil {
203+
internal class StringUtil {
233204
public static bool StringArrayEquals(string[] a, string[] b) {
234205
if ((a == null) != (b == null)) {
235206
return false;

0 commit comments

Comments
 (0)