avoid warning message while compile

This commit is contained in:
kimw
2016-01-04 23:57:30 +08:00
parent 64390d45ac
commit 9194b0325f
2 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ namespace Shadowsocks.Encryption
{
FileManager.UncompressFile(dllPath, Resources.libsscrypto_dll);
}
catch (IOException ex)
catch (IOException)
{
}
catch (Exception e)
@@ -3,17 +3,17 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Shadowsocks.Controller;
using Shadowsocks.Controller.Strategy;
using SimpleJson;
using Newtonsoft.Json;
using Shadowsocks.Controller;
namespace Shadowsocks.Model
{
[Serializable]
public class StatisticsStrategyConfiguration
{
public static readonly string ID = "com.shadowsocks.strategy.statistics";
public static readonly string ID = "com.shadowsocks.strategy.statistics";
private bool _statisticsEnabled = true;
private bool _byIsp = false;
private bool _byHourOfDay = false;
@@ -21,7 +21,6 @@ namespace Shadowsocks.Model
private int _dataCollectionMinutes = 10;
private int _repeatTimesNum = 4;
private const string ConfigFile = "statistics-config.json";
public static StatisticsStrategyConfiguration Load()
@@ -32,7 +31,7 @@ namespace Shadowsocks.Model
var configuration = JsonConvert.DeserializeObject<StatisticsStrategyConfiguration>(content);
return configuration;
}
catch (FileNotFoundException e)
catch (FileNotFoundException)
{
var configuration = new StatisticsStrategyConfiguration();
Save(configuration);
@@ -62,10 +61,10 @@ namespace Shadowsocks.Model
public StatisticsStrategyConfiguration()
{
var availabilityStatisticsType = typeof (AvailabilityStatistics);
var availabilityStatisticsType = typeof(AvailabilityStatistics);
var statisticsData = availabilityStatisticsType.GetNestedType("StatisticsData");
var properties = statisticsData.GetFields(BindingFlags.Instance | BindingFlags.Public);
Calculations = properties.ToDictionary(p => p.Name, _ => (float) 0);
Calculations = properties.ToDictionary(p => p.Name, _ => (float)0);
}
public bool StatisticsEnabled