aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/Profiler.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-10 11:56:36 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-10 11:56:36 -0400
commitff1db0a17341345cb5d625b9a44d02981ce131bf (patch)
tree93f6d3ce16da5f9b930aad05731d74f67f521521 /MediaBrowser.Controller/Library/Profiler.cs
parentd8263c70574c6cb27329e270aebe3ba231f5e9ce (diff)
resharper suggestions in controller project
Diffstat (limited to 'MediaBrowser.Controller/Library/Profiler.cs')
-rw-r--r--MediaBrowser.Controller/Library/Profiler.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/MediaBrowser.Controller/Library/Profiler.cs b/MediaBrowser.Controller/Library/Profiler.cs
index 469d8ef18d..d3a754dc99 100644
--- a/MediaBrowser.Controller/Library/Profiler.cs
+++ b/MediaBrowser.Controller/Library/Profiler.cs
@@ -12,16 +12,16 @@ namespace MediaBrowser.Controller.Library
/// <summary>
/// The name
/// </summary>
- readonly string name;
+ readonly string _name;
/// <summary>
/// The stopwatch
/// </summary>
- readonly Stopwatch stopwatch;
+ readonly Stopwatch _stopwatch;
/// <summary>
/// The _logger
/// </summary>
- private ILogger _logger;
+ private readonly ILogger _logger;
/// <summary>
/// Initializes a new instance of the <see cref="Profiler" /> class.
@@ -30,12 +30,12 @@ namespace MediaBrowser.Controller.Library
/// <param name="logger">The logger.</param>
public Profiler(string name, ILogger logger)
{
- this.name = name;
+ this._name = name;
_logger = logger;
- stopwatch = new Stopwatch();
- stopwatch.Start();
+ _stopwatch = new Stopwatch();
+ _stopwatch.Start();
}
#region IDisposable Members
@@ -56,17 +56,17 @@ namespace MediaBrowser.Controller.Library
{
if (dispose)
{
- stopwatch.Stop();
+ _stopwatch.Stop();
string message;
- if (stopwatch.ElapsedMilliseconds > 300000)
+ if (_stopwatch.ElapsedMilliseconds > 300000)
{
message = string.Format("{0} took {1} minutes.",
- name, ((float)stopwatch.ElapsedMilliseconds / 60000).ToString("F"));
+ _name, ((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F"));
}
else
{
message = string.Format("{0} took {1} seconds.",
- name, ((float)stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000"));
+ _name, ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000"));
}
_logger.Info(message);
}