diff options
| author | Bond_009 <Bond.009@outlook.com> | 2020-08-07 19:26:28 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-08-19 17:50:50 +0200 |
| commit | 2b400c99ef946ef1e52e3f01cb18bc008a369c59 (patch) | |
| tree | 9a62d2b991840d5c2c2403d1e2acb34e7aee4d5d /MediaBrowser.Controller/Library/Profiler.cs | |
| parent | 634ee2d1e913277ea8f419aca9d91a8e58426642 (diff) | |
Fix warnings
Diffstat (limited to 'MediaBrowser.Controller/Library/Profiler.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/Profiler.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Library/Profiler.cs b/MediaBrowser.Controller/Library/Profiler.cs index 399378a09..5efdc6a48 100644 --- a/MediaBrowser.Controller/Library/Profiler.cs +++ b/MediaBrowser.Controller/Library/Profiler.cs @@ -1,5 +1,6 @@ using System; using System.Diagnostics; +using System.Globalization; using Microsoft.Extensions.Logging; namespace MediaBrowser.Controller.Library @@ -13,6 +14,7 @@ namespace MediaBrowser.Controller.Library /// The name. /// </summary> readonly string _name; + /// <summary> /// The stopwatch. /// </summary> @@ -44,6 +46,7 @@ namespace MediaBrowser.Controller.Library public void Dispose() { Dispose(true); + GC.SuppressFinalize(this); } /// <summary> @@ -58,13 +61,19 @@ namespace MediaBrowser.Controller.Library string message; if (_stopwatch.ElapsedMilliseconds > 300000) { - message = string.Format("{0} took {1} minutes.", - _name, ((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F")); + message = string.Format( + CultureInfo.InvariantCulture, + "{0} took {1} minutes.", + _name, + ((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F", CultureInfo.InvariantCulture)); } else { - message = string.Format("{0} took {1} seconds.", - _name, ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000")); + message = string.Format( + CultureInfo.InvariantCulture, + "{0} took {1} seconds.", + _name, + ((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000", CultureInfo.InvariantCulture)); } _logger.LogInformation(message); |
