Skip to content

Commit 3405240

Browse files
committed
Remove 'this' prefix
1 parent ea82a65 commit 3405240

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3348
-3351
lines changed

src/Enyim.Caching/Configuration/AuthenticationConfiguration.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ namespace Enyim.Caching.Configuration
66
{
77
public class AuthenticationConfiguration : IAuthenticationConfiguration
88
{
9-
private Type authenticator;
10-
private Dictionary<string, object> parameters;
9+
private Type _authenticator;
10+
private Dictionary<string, object> _parameters;
1111

1212
Type IAuthenticationConfiguration.Type
1313
{
14-
get { return this.authenticator; }
14+
get { return _authenticator; }
1515
set
1616
{
1717
ConfigurationHelper.CheckForInterface(value, typeof(ISaslAuthenticationProvider));
18-
this.authenticator = value;
18+
_authenticator = value;
1919
}
2020
}
2121

2222
Dictionary<string, object> IAuthenticationConfiguration.Parameters
2323
{
24-
get { return this.parameters ?? (this.parameters = new Dictionary<string, object>()); }
24+
get { return _parameters ?? (_parameters = new Dictionary<string, object>()); }
2525
}
2626
}
2727
}

src/Enyim.Caching/Configuration/JsonVBucketConfig.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// /// </summary>
1515
// public class JsonVBucketConfig : IVBucketConfiguration
1616
// {
17-
// private Func<HashAlgorithm> factory;
18-
// private IPEndPoint[] servers;
19-
// private VBucket[] buckets;
17+
// private Func<HashAlgorithm> _factory;
18+
// private IPEndPoint[] _servers;
19+
// private VBucket[] _buckets;
2020

2121
// public JsonVBucketConfig(string json)
2222
// {
@@ -25,11 +25,11 @@
2525
// if (config.numReplicas < 0)
2626
// throw new ArgumentException("Invalid numReplicas: " + config.numReplicas, "json");
2727

28-
// if (hashFactory.TryGetValue(config.hashAlgorithm, out this.factory))
28+
// if (hashFactory.TryGetValue(config.hashAlgorithm, out _factory))
2929
// throw new ArgumentException("Unknown hash algorithm: " + config.hashAlgorithm, "json");
3030

31-
// this.servers = config.serverList.Select(endpoint => ConfigurationHelper.ResolveToEndPoint(endpoint)).ToArray();
32-
// this.buckets = config.vBucketMap.Select((bucket, index) =>
31+
// _servers = config.serverList.Select(endpoint => ConfigurationHelper.ResolveToEndPoint(endpoint)).ToArray();
32+
// _buckets = config.vBucketMap.Select((bucket, index) =>
3333
// {
3434
// if (bucket == null || bucket.Length != config.numReplicas + 1)
3535
// throw new ArgumentException("Invalid bucket definition at index " + index, "json");
@@ -58,12 +58,12 @@
5858

5959
// IList<IPEndPoint> IVBucketConfiguration.Servers
6060
// {
61-
// get { return this.servers; }
61+
// get { return _servers; }
6262
// }
6363

6464
// IList<VBucket> IVBucketConfiguration.Buckets
6565
// {
66-
// get { return this.buckets; }
66+
// get { return _buckets; }
6767
// }
6868

6969
// #endregion

src/Enyim.Caching/Configuration/MemcachedClientConfiguration.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Enyim.Caching.Configuration
1818
public class MemcachedClientConfiguration : IMemcachedClientConfiguration
1919
{
2020
// these are lazy initialized in the getters
21-
private Type nodeLocator;
21+
private Type _nodeLocator;
2222
private ITranscoder _transcoder;
2323
private IMemcachedKeyTransformer _keyTransformer;
2424
private ILogger<MemcachedClientConfiguration> _logger;
@@ -137,7 +137,7 @@ public MemcachedClientConfiguration(
137137
}
138138
else if (keyTransformer != null)
139139
{
140-
this._keyTransformer = keyTransformer;
140+
_keyTransformer = keyTransformer;
141141
_logger.LogDebug($"Use KeyTransformer Type : '{keyTransformer.ToString()}'");
142142
}
143143

@@ -167,7 +167,7 @@ public MemcachedClientConfiguration(
167167
}
168168
else if (transcoder != null)
169169
{
170-
this._transcoder = transcoder;
170+
_transcoder = transcoder;
171171
_logger.LogDebug($"Use Transcoder Type : '{transcoder.ToString()}'");
172172
}
173173

@@ -218,7 +218,7 @@ private void ConfigureServers(MemcachedClientOptions options)
218218
/// <param name="address">The address and the port of the server in the format 'host:port'.</param>
219219
public void AddServer(string address)
220220
{
221-
this.Servers.Add(ConfigurationHelper.ResolveToEndPoint(address));
221+
Servers.Add(ConfigurationHelper.ResolveToEndPoint(address));
222222
}
223223

224224
/// <summary>
@@ -228,7 +228,7 @@ public void AddServer(string address)
228228
/// <param name="port">The port number of the memcached instance.</param>
229229
public void AddServer(string host, int port)
230230
{
231-
this.Servers.Add(new DnsEndPoint(host, port));
231+
Servers.Add(new DnsEndPoint(host, port));
232232
}
233233

234234
/// <summary>
@@ -251,8 +251,8 @@ public void AddServer(string host, int port)
251251
/// </summary>
252252
public IMemcachedKeyTransformer KeyTransformer
253253
{
254-
get { return this._keyTransformer ?? (this._keyTransformer = new DefaultKeyTransformer()); }
255-
set { this._keyTransformer = value; }
254+
get { return _keyTransformer ?? (_keyTransformer = new DefaultKeyTransformer()); }
255+
set { _keyTransformer = value; }
256256
}
257257

258258
/// <summary>
@@ -261,11 +261,11 @@ public IMemcachedKeyTransformer KeyTransformer
261261
/// <remarks>If both <see cref="M:NodeLocator"/> and <see cref="M:NodeLocatorFactory"/> are assigned then the latter takes precedence.</remarks>
262262
public Type NodeLocator
263263
{
264-
get { return this.nodeLocator; }
264+
get { return _nodeLocator; }
265265
set
266266
{
267267
ConfigurationHelper.CheckForInterface(value, typeof(IMemcachedNodeLocator));
268-
this.nodeLocator = value;
268+
_nodeLocator = value;
269269
}
270270
}
271271

@@ -293,48 +293,48 @@ public ITranscoder Transcoder
293293

294294
IList<EndPoint> IMemcachedClientConfiguration.Servers
295295
{
296-
get { return this.Servers; }
296+
get { return Servers; }
297297
}
298298

299299
ISocketPoolConfiguration IMemcachedClientConfiguration.SocketPool
300300
{
301-
get { return this.SocketPool; }
301+
get { return SocketPool; }
302302
}
303303

304304
IAuthenticationConfiguration IMemcachedClientConfiguration.Authentication
305305
{
306-
get { return this.Authentication; }
306+
get { return Authentication; }
307307
}
308308

309309
IMemcachedKeyTransformer IMemcachedClientConfiguration.CreateKeyTransformer()
310310
{
311-
return this.KeyTransformer;
311+
return KeyTransformer;
312312
}
313313

314314
IMemcachedNodeLocator IMemcachedClientConfiguration.CreateNodeLocator()
315315
{
316-
var f = this.NodeLocatorFactory;
316+
var f = NodeLocatorFactory;
317317
if (f != null) return f.Create();
318318

319-
return this.NodeLocator == null
319+
return NodeLocator == null
320320
? new SingleNodeLocator()
321-
: (IMemcachedNodeLocator)FastActivator.Create(this.NodeLocator);
321+
: (IMemcachedNodeLocator)FastActivator.Create(NodeLocator);
322322
}
323323

324324
ITranscoder IMemcachedClientConfiguration.CreateTranscoder()
325325
{
326-
return this.Transcoder;
326+
return Transcoder;
327327
}
328328

329329
IServerPool IMemcachedClientConfiguration.CreatePool()
330330
{
331-
switch (this.Protocol)
331+
switch (Protocol)
332332
{
333333
case MemcachedProtocol.Text: return new DefaultServerPool(this, new Memcached.Protocol.Text.TextOperationFactory(), _logger);
334334
case MemcachedProtocol.Binary: return new BinaryPool(this, _logger);
335335
}
336336

337-
throw new ArgumentOutOfRangeException("Unknown protocol: " + (int)this.Protocol);
337+
throw new ArgumentOutOfRangeException("Unknown protocol: " + (int)Protocol);
338338
}
339339

340340
public bool UseSslStream { get; private set; }

src/Enyim.Caching/Configuration/SocketPoolConfiguration.cs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ namespace Enyim.Caching.Configuration
88
{
99
public class SocketPoolConfiguration : ISocketPoolConfiguration
1010
{
11-
private int minPoolSize = 5;
12-
private int maxPoolSize = 100;
13-
private bool useSslStream = false;
14-
private TimeSpan connectionTimeout = new TimeSpan(0, 0, 10);
15-
private TimeSpan receiveTimeout = new TimeSpan(0, 0, 10);
16-
private TimeSpan deadTimeout = new TimeSpan(0, 0, 10);
17-
private TimeSpan queueTimeout = new TimeSpan(0, 0, 0, 0, 100);
11+
private int _minPoolSize = 5;
12+
private int _maxPoolSize = 100;
13+
private bool _useSslStream = false;
14+
private TimeSpan _connectionTimeout = new TimeSpan(0, 0, 10);
15+
private TimeSpan _receiveTimeout = new TimeSpan(0, 0, 10);
16+
private TimeSpan _deadTimeout = new TimeSpan(0, 0, 10);
17+
private TimeSpan _queueTimeout = new TimeSpan(0, 0, 0, 0, 100);
1818
private TimeSpan _initPoolTimeout = new TimeSpan(0, 1, 0);
19-
private INodeFailurePolicyFactory FailurePolicyFactory = new ThrottlingFailurePolicyFactory(5, TimeSpan.FromMilliseconds(2000));
19+
private INodeFailurePolicyFactory _failurePolicyFactory = new ThrottlingFailurePolicyFactory(5, TimeSpan.FromMilliseconds(2000));
2020

2121
int ISocketPoolConfiguration.MinPoolSize
2222
{
23-
get { return this.minPoolSize; }
24-
set { this.minPoolSize = value; }
23+
get { return _minPoolSize; }
24+
set { _minPoolSize = value; }
2525
}
2626

2727
/// <summary>
@@ -31,43 +31,43 @@ int ISocketPoolConfiguration.MinPoolSize
3131
/// <remarks>It should be 0.75 * (number of threads) for optimal performance.</remarks>
3232
int ISocketPoolConfiguration.MaxPoolSize
3333
{
34-
get { return this.maxPoolSize; }
35-
set { this.maxPoolSize = value; }
34+
get { return _maxPoolSize; }
35+
set { _maxPoolSize = value; }
3636
}
3737

3838
TimeSpan ISocketPoolConfiguration.ConnectionTimeout
3939
{
40-
get { return this.connectionTimeout; }
40+
get { return _connectionTimeout; }
4141
set
4242
{
4343
if (value < TimeSpan.Zero)
4444
throw new ArgumentOutOfRangeException("value", "value must be positive");
4545

46-
this.connectionTimeout = value;
46+
_connectionTimeout = value;
4747
}
4848
}
4949

5050
TimeSpan ISocketPoolConfiguration.ReceiveTimeout
5151
{
52-
get { return this.receiveTimeout; }
52+
get { return _receiveTimeout; }
5353
set
5454
{
5555
if (value < TimeSpan.Zero)
5656
throw new ArgumentOutOfRangeException("value", "value must be positive");
5757

58-
this.receiveTimeout = value;
58+
_receiveTimeout = value;
5959
}
6060
}
6161

6262
TimeSpan ISocketPoolConfiguration.QueueTimeout
6363
{
64-
get { return this.queueTimeout; }
64+
get { return _queueTimeout; }
6565
set
6666
{
6767
if (value < TimeSpan.Zero)
6868
throw new ArgumentOutOfRangeException("value", "value must be positive");
6969

70-
this.queueTimeout = value;
70+
_queueTimeout = value;
7171
}
7272
}
7373

@@ -85,25 +85,25 @@ TimeSpan ISocketPoolConfiguration.InitPoolTimeout
8585

8686
TimeSpan ISocketPoolConfiguration.DeadTimeout
8787
{
88-
get { return this.deadTimeout; }
88+
get { return _deadTimeout; }
8989
set
9090
{
9191
if (value < TimeSpan.Zero)
9292
throw new ArgumentOutOfRangeException("value", "value must be positive");
9393

94-
this.deadTimeout = value;
94+
_deadTimeout = value;
9595
}
9696
}
9797

9898
INodeFailurePolicyFactory ISocketPoolConfiguration.FailurePolicyFactory
9999
{
100-
get { return this.FailurePolicyFactory; }
100+
get { return _failurePolicyFactory; }
101101
set
102102
{
103103
if (value == null)
104104
throw new ArgumentNullException("value");
105105

106-
this.FailurePolicyFactory = value;
106+
_failurePolicyFactory = value;
107107
}
108108
}
109109
}

0 commit comments

Comments
 (0)