ReSharper: remove redundant code

This commit is contained in:
bao-qian
2016-01-06 21:34:42 +00:00
parent ae42c4df16
commit 0daa3a8f57
65 changed files with 279 additions and 250 deletions

View File

@@ -15,7 +15,7 @@ namespace Wox.Storage
private List<HistoryItem> History = new List<HistoryItem>();
private int MaxHistory = 300;
private int cursor = 0;
private int cursor;
public static PluginMetadata MetaData { get; } = new PluginMetadata
{ ID = "Query history", Name = "Query history" };
@@ -61,7 +61,7 @@ namespace Wox.Storage
}
else
{
History.Add(new HistoryItem()
History.Add(new HistoryItem
{
Query = query,
ExecutedDateTime = DateTime.Now

View File

@@ -3,6 +3,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using Wox.Infrastructure.Storage;
using Wox.Plugin;
namespace Wox.Storage
{
@@ -20,7 +21,7 @@ namespace Wox.Storage
get { return "TopMostRecords"; }
}
internal bool IsTopMost(Plugin.Result result)
internal bool IsTopMost(Result result)
{
return records.Any(o => o.Value.Title == result.Title
&& o.Value.SubTitle == result.SubTitle
@@ -28,7 +29,7 @@ namespace Wox.Storage
&& o.Key == result.OriginQuery.RawQuery);
}
internal void Remove(Plugin.Result result)
internal void Remove(Result result)
{
if (records.ContainsKey(result.OriginQuery.RawQuery))
{
@@ -37,7 +38,7 @@ namespace Wox.Storage
}
}
internal void AddOrUpdate(Plugin.Result result)
internal void AddOrUpdate(Result result)
{
if (records.ContainsKey(result.OriginQuery.RawQuery))
{
@@ -47,11 +48,11 @@ namespace Wox.Storage
}
else
{
records.Add(result.OriginQuery.RawQuery, new TopMostRecord()
{
records.Add(result.OriginQuery.RawQuery, new TopMostRecord
{
PluginID = result.PluginID,
Title = result.Title,
SubTitle = result.SubTitle,
SubTitle = result.SubTitle
});
}