Skip to content

Commit 87bdef7

Browse files
committed
Merge branch 'develop' of https://github.com/nopSolutions/nopCommerce into develop
2 parents eeebba6 + 4400019 commit 87bdef7

24 files changed

+96
-127
lines changed

src/Libraries/Nop.Core/Caching/MemoryCacheManager.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ public partial class MemoryCacheManager : ILocker, IStaticCacheManager
1515
{
1616
#region Fields
1717

18+
private readonly IMemoryCache _cache;
19+
1820
/// <summary>
1921
/// All keys of cache
2022
/// </summary>
2123
/// <remarks>Dictionary value indicating whether a key still exists in cache</remarks>
2224
protected static readonly ConcurrentDictionary<string, bool> _allKeys;
2325

24-
private readonly IMemoryCache _cache;
25-
2626
/// <summary>
2727
/// Cancellation token for clear cache
2828
/// </summary>
@@ -32,18 +32,11 @@ public partial class MemoryCacheManager : ILocker, IStaticCacheManager
3232

3333
#region Ctor
3434

35-
/// <summary>
36-
/// Ctor
37-
/// </summary>
3835
static MemoryCacheManager()
3936
{
4037
_allKeys = new ConcurrentDictionary<string, bool>();
4138
}
4239

43-
/// <summary>
44-
/// Ctor
45-
/// </summary>
46-
/// <param name="cache">Cache</param>
4740
public MemoryCacheManager(IMemoryCache cache)
4841
{
4942
_cache = cache;
@@ -140,7 +133,7 @@ private void PostEviction(object key, object value, EvictionReason reason, objec
140133
#endregion
141134

142135
#region Methods
143-
136+
144137
/// <summary>
145138
/// Get a cached item. If it's not in the cache yet, then load and cache it
146139
/// </summary>

src/Libraries/Nop.Core/Caching/PerRequestCacheManager.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ public partial class PerRequestCacheManager : ICacheManager
1919

2020
#region Ctor
2121

22-
/// <summary>
23-
/// Gets a key/value collection that can be used to share data within the scope of this request
24-
/// </summary>
2522
public PerRequestCacheManager(IHttpContextAccessor httpContextAccessor)
2623
{
2724
this._httpContextAccessor = httpContextAccessor;
@@ -56,7 +53,7 @@ public virtual T Get<T>(string key, Func<T> acquire, int? cacheTime = null)
5653
var items = GetItems();
5754
if (items == null)
5855
return acquire();
59-
56+
6057
//item already is in cache, so return it
6158
if (items[key] != null)
6259
return (T)items[key];
@@ -151,4 +148,4 @@ public virtual void Dispose()
151148

152149
#endregion
153150
}
154-
}
151+
}

src/Libraries/Nop.Core/Caching/RedisCacheManager.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,15 @@ public partial class RedisCacheManager : IStaticCacheManager
1717

1818
private readonly ICacheManager _perRequestCacheManager;
1919
private readonly IRedisConnectionWrapper _connectionWrapper;
20+
2021
private readonly IDatabase _db;
2122

2223
#endregion
2324

2425
#region Ctor
2526

26-
/// <summary>
27-
/// Ctor
28-
/// </summary>
29-
/// <param name="perRequestCacheManager">Cache manager</param>
30-
/// <param name="connectionWrapper">ConnectionW wrapper</param>
31-
/// <param name="config">Config</param>
3227
public RedisCacheManager(ICacheManager perRequestCacheManager,
33-
IRedisConnectionWrapper connectionWrapper,
28+
IRedisConnectionWrapper connectionWrapper,
3429
NopConfig config)
3530
{
3631
if (string.IsNullOrEmpty(config.RedisCachingConnectionString))

src/Libraries/Nop.Core/Caching/RedisConnectionWrapper.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@ public class RedisConnectionWrapper : IRedisConnectionWrapper, ILocker
1616
#region Fields
1717

1818
private readonly NopConfig _config;
19-
private readonly Lazy<string> _connectionString;
19+
2020
private readonly object _lock = new object();
2121
private volatile ConnectionMultiplexer _connection;
22+
private readonly Lazy<string> _connectionString;
2223
private volatile RedLockFactory _redisLockFactory;
2324

2425
#endregion
2526

2627
#region Ctor
2728

28-
/// <summary>
29-
/// Ctor
30-
/// </summary>
31-
/// <param name="config">Config</param>
3229
public RedisConnectionWrapper(NopConfig config)
3330
{
3431
this._config = config;

src/Libraries/Nop.Core/ComponentModel/GenericDictionaryTypeConverter.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ public class GenericDictionaryTypeConverter<K, V> : TypeConverter
2323
/// </summary>
2424
protected readonly TypeConverter typeConverterValue;
2525

26-
/// <summary>
27-
/// Ctor
28-
/// </summary>
2926
public GenericDictionaryTypeConverter()
3027
{
3128
typeConverterKey = TypeDescriptor.GetConverter(typeof(K));
@@ -61,7 +58,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
6158
/// <returns>Result</returns>
6259
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
6360
{
64-
if (!(value is string))
61+
if (!(value is string))
6562
return base.ConvertFrom(context, culture, value);
6663

6764
var input = (string)value;
@@ -71,12 +68,12 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
7168
Array.ForEach(items, s =>
7269
{
7370
var keyValueStr = string.IsNullOrEmpty(s) ? new string[0] : s.Split(',').Select(x => x.Trim()).ToArray();
74-
if (keyValueStr.Length != 2)
71+
if (keyValueStr.Length != 2)
7572
return;
7673

7774
object dictionaryKey = (K)typeConverterKey.ConvertFromInvariantString(keyValueStr[0]);
7875
object dictionaryValue = (V)typeConverterValue.ConvertFromInvariantString(keyValueStr[1]);
79-
if (dictionaryKey == null || dictionaryValue == null)
76+
if (dictionaryKey == null || dictionaryValue == null)
8077
return;
8178

8279
if (!result.ContainsKey((K)dictionaryKey))
@@ -96,11 +93,11 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
9693
/// <returns>Result</returns>
9794
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
9895
{
99-
if (destinationType != typeof(string))
96+
if (destinationType != typeof(string))
10097
return base.ConvertTo(context, culture, value, destinationType);
10198

10299
var result = string.Empty;
103-
if (value == null)
100+
if (value == null)
104101
return result;
105102

106103
//we don't use string.Join() because it doesn't support invariant culture
@@ -118,4 +115,4 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul
118115
return result;
119116
}
120117
}
121-
}
118+
}

src/Libraries/Nop.Core/ComponentModel/GenericListTypeConverter.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ public class GenericListTypeConverter<T> : TypeConverter
1717
/// </summary>
1818
protected readonly TypeConverter typeConverter;
1919

20-
/// <summary>
21-
/// Ctor
22-
/// </summary>
2320
public GenericListTypeConverter()
2421
{
2522
typeConverter = TypeDescriptor.GetConverter(typeof(T));
@@ -47,7 +44,7 @@ protected virtual string[] GetStringArray(string input)
4744
/// <returns>Result</returns>
4845
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
4946
{
50-
if (sourceType != typeof(string))
47+
if (sourceType != typeof(string))
5148
return base.CanConvertFrom(context, sourceType);
5249

5350
var items = GetStringArray(sourceType.ToString());
@@ -63,7 +60,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
6360
/// <returns>Result</returns>
6461
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
6562
{
66-
if (!(value is string))
63+
if (!(value is string))
6764
return base.ConvertFrom(context, culture, value);
6865

6966
var items = GetStringArray((string)value);
@@ -94,7 +91,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul
9491
return base.ConvertTo(context, culture, value, destinationType);
9592

9693
var result = string.Empty;
97-
if (value == null)
94+
if (value == null)
9895
return result;
9996

10097
//we don't use string.Join() because it doesn't support invariant culture
@@ -110,4 +107,4 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul
110107
return result;
111108
}
112109
}
113-
}
110+
}

src/Libraries/Nop.Core/Domain/Catalog/CatalogSettings.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ namespace Nop.Core.Domain.Catalog
88
/// </summary>
99
public class CatalogSettings : ISettings
1010
{
11-
/// <summary>
12-
/// Ctor
13-
/// </summary>
1411
public CatalogSettings()
1512
{
1613
ProductSortingEnumDisabled = new List<int>();

src/Libraries/Nop.Core/Domain/Cms/WidgetSettings.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ namespace Nop.Core.Domain.Cms
88
/// </summary>
99
public class WidgetSettings : ISettings
1010
{
11-
/// <summary>
12-
/// Ctor
13-
/// </summary>
1411
public WidgetSettings()
1512
{
1613
ActiveWidgetSystemNames = new List<string>();

src/Libraries/Nop.Core/Domain/Common/CommonSettings.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ namespace Nop.Core.Domain.Common
88
/// </summary>
99
public class CommonSettings : ISettings
1010
{
11-
/// <summary>
12-
/// Ctor
13-
/// </summary>
1411
public CommonSettings()
1512
{
1613
SitemapCustomUrls = new List<string>();

src/Libraries/Nop.Core/Domain/Configuration/Setting.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ namespace Nop.Core.Domain.Configuration
77
/// </summary>
88
public partial class Setting : BaseEntity, ILocalizedEntity
99
{
10-
/// <summary>
11-
/// Ctor
12-
/// </summary>
1310
public Setting()
1411
{
1512
}
@@ -20,13 +17,13 @@ public Setting()
2017
/// <param name="name">Name</param>
2118
/// <param name="value">Value</param>
2219
/// <param name="storeId">Store identifier</param>
23-
public Setting(string name, string value, int storeId = 0)
20+
public Setting(string name, string value, int storeId = 0)
2421
{
2522
this.Name = name;
2623
this.Value = value;
2724
this.StoreId = storeId;
2825
}
29-
26+
3027
/// <summary>
3128
/// Gets or sets the name
3229
/// </summary>
@@ -51,4 +48,4 @@ public override string ToString()
5148
return Name;
5249
}
5350
}
54-
}
51+
}

0 commit comments

Comments
 (0)