Visual Studio Reformat: Emby.Server.Implementations Part T-T

This commit is contained in:
Erwin de Haan
2019-01-13 20:22:56 +01:00
parent 0efc699e3d
commit 25f0315e91
39 changed files with 1054 additions and 892 deletions

View File

@@ -3,33 +3,33 @@ using System.Collections.Generic;
namespace NLangDetect.Core
{
public class ProbVector
{
private readonly Dictionary<int, double> _dict = new Dictionary<int, double>();
public double this[int key]
public class ProbVector
{
get
{
double value;
private readonly Dictionary<int, double> _dict = new Dictionary<int, double>();
return _dict.TryGetValue(key, out value) ? value : 0.0;
}
set
{
if (Math.Abs(value) < double.Epsilon)
public double this[int key]
{
if (_dict.ContainsKey(key))
{
_dict.Remove(key);
}
get
{
double value;
return;
return _dict.TryGetValue(key, out value) ? value : 0.0;
}
set
{
if (Math.Abs(value) < double.Epsilon)
{
if (_dict.ContainsKey(key))
{
_dict.Remove(key);
}
return;
}
_dict[key] = value;
}
}
_dict[key] = value;
}
}
}
}