Skip to content

Commit 5cd531c

Browse files
Adjust coding style according to this comment: #31 (comment)
Specifically, removed regions and moved using statements outside of main namespace.
1 parent 19dce14 commit 5cd531c

File tree

2 files changed

+12
-35
lines changed

2 files changed

+12
-35
lines changed

src/Umbraco.Deploy.Contrib.Connectors/Caching/Comparers/StringArrayComparer.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
namespace Umbraco.Deploy.Contrib.Connectors.Caching.Comparers
2-
{
1+
using System.Collections.Generic;
2+
using System.Linq;
33

4-
// Namespaces.
5-
using System.Collections.Generic;
6-
using System.Linq;
4+
namespace Umbraco.Deploy.Contrib.Connectors.Caching.Comparers
5+
{
76

87
/// <summary>
98
/// Compares an array of strings.
@@ -14,8 +13,6 @@
1413
public class StringArrayComparer : IEqualityComparer<string[]>
1514
{
1615

17-
#region Methods
18-
1916
/// <summary>
2017
/// Check if the arrays are equal.
2118
/// </summary>
@@ -75,8 +72,6 @@ public int GetHashCode(string[] items)
7572
}
7673
}
7774

78-
#endregion
79-
8075
}
8176

8277
}

src/Umbraco.Deploy.Contrib.Connectors/Caching/InstanceByKeyCache.cs

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace Umbraco.Deploy.Contrib.Connectors.Caching
2-
{
1+
using System;
2+
using System.Collections.Generic;
3+
using Umbraco.Deploy.Contrib.Connectors.Caching.Comparers;
34

4-
// Namespaces.
5-
using Comparers;
6-
using System;
7-
using System.Collections.Generic;
5+
namespace Umbraco.Deploy.Contrib.Connectors.Caching
6+
{
87

98
/// <summary>
109
/// Caches instance variables by key in a dictionary-like structure.
@@ -21,14 +20,11 @@
2120
public class InstanceByKeyCache<T, TKey>
2221
{
2322

24-
#region Static Variables
25-
23+
/// <summary>
24+
/// An empty array (convenience variable).
25+
/// </summary>
2626
private static string[] EmptyArray = new string[] { };
2727

28-
#endregion
29-
30-
#region Properties
31-
3228
/// <summary>
3329
/// The instances stored by their key, then again by a contextual key.
3430
/// </summary>
@@ -39,10 +35,6 @@ public class InstanceByKeyCache<T, TKey>
3935
/// </summary>
4036
private object InstancesLock { get; set; }
4137

42-
#endregion
43-
44-
#region Constructors
45-
4638
/// <summary>
4739
/// Default constructor.
4840
/// </summary>
@@ -52,10 +44,6 @@ public InstanceByKeyCache()
5244
Instances = new Dictionary<TKey, Tuple<Dictionary<string[], T>, DateTime>>();
5345
}
5446

55-
#endregion
56-
57-
#region Methods
58-
5947
/// <summary>
6048
/// Gets the instance variable (either from the cache or from the specified function).
6149
/// </summary>
@@ -151,10 +139,6 @@ public void ClearKeys(IEnumerable<TKey> keys)
151139
}
152140
}
153141

154-
#endregion
155-
156-
#region Private Methods
157-
158142
/// <summary>
159143
/// Trys to get the value by the specified keys.
160144
/// </summary>
@@ -258,8 +242,6 @@ private void UpdateValueByKeysWithoutLock(string[] keys, TKey accessKey,
258242

259243
}
260244

261-
#endregion
262-
263245
}
264246

265247
}

0 commit comments

Comments
 (0)