mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[Chore] Run solution code cleanup (#20584)
This commit is contained in:
@@ -53,9 +53,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode
|
||||
{
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
#pragma warning disable CA2000 // Do not dispose here
|
||||
thumbnail = GetThumbnail(reader);
|
||||
#pragma warning restore CA2000
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_markdownPreviewHandlerControl.Dispose();
|
||||
_markdownPreviewHandlerControl.Dispose();
|
||||
}
|
||||
|
||||
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Microsoft.PowerToys.PreviewHandler.Monaco
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using interop;
|
||||
|
||||
namespace Microsoft.PowerToys.PreviewHandler.Monaco.Helpers
|
||||
{
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Text;
|
||||
using Common.ComInterlop;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Pdf;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Common.ComInterlop;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Svg;
|
||||
|
||||
@@ -48,9 +48,7 @@ namespace Common.Utilities
|
||||
foreach (XElement element in elements)
|
||||
{
|
||||
// Using Invariant since we are doing an exact match for HTML tags and we want it to behave the same in every culture
|
||||
#pragma warning disable CA1308 // Normalize strings to uppercase
|
||||
var elementName = element?.Name?.LocalName?.ToLowerInvariant();
|
||||
#pragma warning restore CA1308 // Normalize strings to uppercase
|
||||
if (elementName != null && blockedElementsName.ContainsKey(elementName))
|
||||
{
|
||||
foundBlockedElement = true;
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace Common.ComInterlop
|
||||
/// The COLORREF value is used to specify an RGB color.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1815:Override equals and operator equals on value types", Justification = "Interop")]
|
||||
public struct COLORREF
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace Common.ComInterlop
|
||||
/// <summary>
|
||||
/// Specifies the alpha type of the image.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Interop")]
|
||||
public enum WTS_ALPHATYPE : int
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace Common.ComInterlop
|
||||
/// Defines the attributes of a font.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1815:Override equals and operator equals on value types", Justification = "Interop")]
|
||||
public struct LOGFONT
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace Common.ComInterlop
|
||||
/// Contains message information from a thread's message queue.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1815:Override equals and operator equals on value types", Justification = "Interop")]
|
||||
public struct MSG
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace Common.ComInterlop
|
||||
/// The RECT structure defines a rectangle by the coordinates of its upper-left and lower-right corners.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1815:Override equals and operator equals on value types", Justification = "Interop")]
|
||||
public struct RECT
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using PreviewHandlerCommon.ComInterop;
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using Common.ComInterlop;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user