Incremental fix for StyleCop on Infra (#5729)

* Fixes file names and classes don't match.  All but PluginsSettings

* making it pluginsettings

* fixing due to conflict
This commit is contained in:
Clint Rutkas
2020-08-07 10:45:50 -07:00
committed by GitHub
parent 63c36d0dbf
commit 34c3b50b48
19 changed files with 223 additions and 194 deletions

View File

@@ -16,6 +16,7 @@ namespace Wox.Infrastructure.Storage
/// Storage object using binary data
/// Normally, it has better performance, but not readable
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public class BinaryStorage<T> : IStorage<T>
{
// This storage helper returns whether or not to delete the binary storage items

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
namespace Wox.Infrastructure.Storage
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public interface IRepository<T>
{
void Add(T insertedItem);

View File

@@ -4,18 +4,19 @@
namespace Wox.Infrastructure.Storage
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public interface IStorage<T>
{
/// <summary>
/// Saves the data
/// </summary>
/// <param name="data"></param>
/// <param name="data">data to be saved</param>
void Save(T data);
/// <summary>
/// Attempts to load data, otherwise it will return the default provided
/// </summary>
/// <param name="defaultData"></param>
/// <param name="defaultData">default data value</param>
/// <returns>The loaded data or default</returns>
T TryLoad(T defaultData);
}

View File

@@ -13,6 +13,7 @@ namespace Wox.Infrastructure.Storage
/// <summary>
/// Serialize object using json format.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public class JsonStorage<T>
{
private readonly JsonSerializerSettings _serializerSettings;

View File

@@ -15,7 +15,8 @@ namespace Wox.Infrastructure.Storage
/// The intent of this class is to provide a basic subset of 'list' like operations, without exposing callers to the internal representation
/// of the data structure. Currently this is implemented as a list for it's simplicity.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="T">typeof</typeparam>
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public class ListRepository<T> : IRepository<T>, IEnumerable<T>
{
public IList<T> Items { get { return _items.Values.ToList(); } }

View File

@@ -6,6 +6,7 @@ using System.IO;
namespace Wox.Infrastructure.Storage
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public class PluginJsonStorage<T> : JsonStorage<T> where T : new()
{
public PluginJsonStorage()

View File

@@ -6,6 +6,7 @@ using System.IO;
namespace Wox.Infrastructure.Storage
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
public class WoxJsonStorage<T> : JsonStorage<T> where T : new()
{
public WoxJsonStorage()