mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
in theory this fixes all SA1649 issues now with any project with stylecop enabled (#5786)
This commit is contained in:
@@ -7,8 +7,6 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
#pragma warning disable SA1649 // File name should match first type name
|
||||
|
||||
public class GenericProperty<T>
|
||||
{
|
||||
[JsonPropertyName("value")]
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
using System.Text.Json;
|
||||
|
||||
#pragma warning disable SA1649 // File name should match first type name
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
// Represents a powertoys module settings setnt to the runner.
|
||||
@@ -103,7 +103,7 @@
|
||||
<Compile Include="Helpers\IThrottledActionInvoker.cs" />
|
||||
<Compile Include="Helpers\ThrottledActionInvoker.cs" />
|
||||
<Compile Include="Settings\IUserSettings.cs" />
|
||||
<Compile Include="Settings\SettingItem.cs" />
|
||||
<Compile Include="Settings\SettingItem`1.cs" />
|
||||
<Compile Include="Settings\UserSettings.cs" />
|
||||
<Compile Include="Telemetry\ColorPickerCancelledEvent.cs" />
|
||||
<Compile Include="Telemetry\ColorPickerShowEvent.cs" />
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.ComponentModel;
|
||||
|
||||
namespace ColorPicker.Settings
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "Generic, file is named correctly")]
|
||||
public sealed class SettingItem<T> : INotifyPropertyChanged
|
||||
{
|
||||
private T _value;
|
||||
@@ -16,7 +16,6 @@ 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
|
||||
@@ -6,7 +6,6 @@ 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);
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
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>
|
||||
@@ -13,7 +13,6 @@ 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;
|
||||
@@ -16,7 +16,6 @@ namespace Wox.Infrastructure.Storage
|
||||
/// of the data structure. Currently this is implemented as a list for it's simplicity.
|
||||
/// </summary>
|
||||
/// <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(); } }
|
||||
@@ -6,7 +6,6 @@ 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()
|
||||
@@ -6,7 +6,6 @@ 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()
|
||||
Reference in New Issue
Block a user