mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +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
|
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||||
{
|
{
|
||||||
#pragma warning disable SA1649 // File name should match first type name
|
|
||||||
|
|
||||||
public class GenericProperty<T>
|
public class GenericProperty<T>
|
||||||
{
|
{
|
||||||
[JsonPropertyName("value")]
|
[JsonPropertyName("value")]
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
#pragma warning disable SA1649 // File name should match first type name
|
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||||
{
|
{
|
||||||
// Represents a powertoys module settings setnt to the runner.
|
// Represents a powertoys module settings setnt to the runner.
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<Compile Include="Helpers\IThrottledActionInvoker.cs" />
|
<Compile Include="Helpers\IThrottledActionInvoker.cs" />
|
||||||
<Compile Include="Helpers\ThrottledActionInvoker.cs" />
|
<Compile Include="Helpers\ThrottledActionInvoker.cs" />
|
||||||
<Compile Include="Settings\IUserSettings.cs" />
|
<Compile Include="Settings\IUserSettings.cs" />
|
||||||
<Compile Include="Settings\SettingItem.cs" />
|
<Compile Include="Settings\SettingItem`1.cs" />
|
||||||
<Compile Include="Settings\UserSettings.cs" />
|
<Compile Include="Settings\UserSettings.cs" />
|
||||||
<Compile Include="Telemetry\ColorPickerCancelledEvent.cs" />
|
<Compile Include="Telemetry\ColorPickerCancelledEvent.cs" />
|
||||||
<Compile Include="Telemetry\ColorPickerShowEvent.cs" />
|
<Compile Include="Telemetry\ColorPickerShowEvent.cs" />
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System.ComponentModel;
|
|||||||
|
|
||||||
namespace ColorPicker.Settings
|
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
|
public sealed class SettingItem<T> : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
private T _value;
|
private T _value;
|
||||||
@@ -16,7 +16,6 @@ namespace Wox.Infrastructure.Storage
|
|||||||
/// Storage object using binary data
|
/// Storage object using binary data
|
||||||
/// Normally, it has better performance, but not readable
|
/// Normally, it has better performance, but not readable
|
||||||
/// </summary>
|
/// </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>
|
public class BinaryStorage<T> : IStorage<T>
|
||||||
{
|
{
|
||||||
// This storage helper returns whether or not to delete the binary storage items
|
// 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
|
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>
|
public interface IRepository<T>
|
||||||
{
|
{
|
||||||
void Add(T insertedItem);
|
void Add(T insertedItem);
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
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>
|
public interface IStorage<T>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13,7 +13,6 @@ namespace Wox.Infrastructure.Storage
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serialize object using json format.
|
/// Serialize object using json format.
|
||||||
/// </summary>
|
/// </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>
|
public class JsonStorage<T>
|
||||||
{
|
{
|
||||||
private readonly JsonSerializerSettings _serializerSettings;
|
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.
|
/// of the data structure. Currently this is implemented as a list for it's simplicity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">typeof</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 class ListRepository<T> : IRepository<T>, IEnumerable<T>
|
||||||
{
|
{
|
||||||
public IList<T> Items { get { return _items.Values.ToList(); } }
|
public IList<T> Items { get { return _items.Values.ToList(); } }
|
||||||
@@ -6,7 +6,6 @@ using System.IO;
|
|||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
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 class PluginJsonStorage<T> : JsonStorage<T> where T : new()
|
||||||
{
|
{
|
||||||
public PluginJsonStorage()
|
public PluginJsonStorage()
|
||||||
@@ -6,7 +6,6 @@ using System.IO;
|
|||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
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 class WoxJsonStorage<T> : JsonStorage<T> where T : new()
|
||||||
{
|
{
|
||||||
public WoxJsonStorage()
|
public WoxJsonStorage()
|
||||||
Reference in New Issue
Block a user