From 279c464dc2e59c361bcb854f337d3af7530c75c8 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 18 Jun 2022 13:01:43 +0200 Subject: [PATCH] Remove unnecessary modifiers for partial types --- .../AutoConstructorGenerator.cs | 2 +- .../SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs | 2 +- src/ComputeSharp.D2D1/Helpers/ThrowHelper.cs | 2 +- .../__Internals/ShaderMethodSourceAttribute.HlslGeneration.cs | 2 +- .../Shaders/Translation/ShaderCompiler.LibraryLoading.cs | 2 +- .../SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs | 2 +- src/ComputeSharp/Core/Dispatch/ThreadIds.Normalized.cs | 2 +- .../Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs | 2 +- .../Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs | 2 +- src/ComputeSharp/Graphics/Helpers/DeviceHelper.Enumerator.cs | 2 +- src/ComputeSharp/Graphics/Helpers/DeviceHelper.Factory.cs | 2 +- .../Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs | 2 +- src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ComputeSharp.Core.SourceGenerators/AutoConstructorGenerator.cs b/src/ComputeSharp.Core.SourceGenerators/AutoConstructorGenerator.cs index 111cf414..b7584b81 100644 --- a/src/ComputeSharp.Core.SourceGenerators/AutoConstructorGenerator.cs +++ b/src/ComputeSharp.Core.SourceGenerators/AutoConstructorGenerator.cs @@ -16,7 +16,7 @@ namespace ComputeSharp.Core.SourceGenerators; /// A source generator creating constructors for types annotated with . /// [Generator(LanguageNames.CSharp)] -public sealed partial class AutoConstructorGenerator : IIncrementalGenerator +public sealed class AutoConstructorGenerator : IIncrementalGenerator { /// public void Initialize(IncrementalGeneratorInitializationContext context) diff --git a/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs b/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs index d722dd00..8e6bc2eb 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs @@ -7,7 +7,7 @@ using static ComputeSharp.D2D1.SourceGenerators.Diagnostics.DiagnosticDescriptor namespace ComputeSharp.D2D1.SourceGenerators.SyntaxRewriters; /// -internal abstract partial class HlslSourceRewriter : CSharpSyntaxRewriter +partial class HlslSourceRewriter : CSharpSyntaxRewriter { /// public override SyntaxNode? VisitAnonymousObjectCreationExpression(AnonymousObjectCreationExpressionSyntax node) diff --git a/src/ComputeSharp.D2D1/Helpers/ThrowHelper.cs b/src/ComputeSharp.D2D1/Helpers/ThrowHelper.cs index a2163e54..36fd8f77 100644 --- a/src/ComputeSharp.D2D1/Helpers/ThrowHelper.cs +++ b/src/ComputeSharp.D2D1/Helpers/ThrowHelper.cs @@ -6,7 +6,7 @@ namespace ComputeSharp.D2D1.Helpers; /// /// Helper methods to efficiently throw exceptions. /// -internal static partial class ThrowHelper +internal static class ThrowHelper { /// /// Throws a new . diff --git a/src/ComputeSharp.Dynamic/Attributes/__Internals/ShaderMethodSourceAttribute.HlslGeneration.cs b/src/ComputeSharp.Dynamic/Attributes/__Internals/ShaderMethodSourceAttribute.HlslGeneration.cs index dd8e84ae..5c8031db 100644 --- a/src/ComputeSharp.Dynamic/Attributes/__Internals/ShaderMethodSourceAttribute.HlslGeneration.cs +++ b/src/ComputeSharp.Dynamic/Attributes/__Internals/ShaderMethodSourceAttribute.HlslGeneration.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace ComputeSharp.__Internals; /// -public sealed partial class ShaderMethodSourceAttribute : Attribute +partial class ShaderMethodSourceAttribute : Attribute { /// /// Appends the mapped source code for the current method. diff --git a/src/ComputeSharp.Dynamic/Shaders/Translation/ShaderCompiler.LibraryLoading.cs b/src/ComputeSharp.Dynamic/Shaders/Translation/ShaderCompiler.LibraryLoading.cs index bfb872b0..437ae750 100644 --- a/src/ComputeSharp.Dynamic/Shaders/Translation/ShaderCompiler.LibraryLoading.cs +++ b/src/ComputeSharp.Dynamic/Shaders/Translation/ShaderCompiler.LibraryLoading.cs @@ -9,7 +9,7 @@ using TerraFX.Interop.Windows; namespace ComputeSharp.Shaders.Translation; /// -internal sealed unsafe partial class ShaderCompiler +unsafe partial class ShaderCompiler { /// /// Initializes the DLL resolvers for the dxcompiler.dll and dxil.dll libraries. diff --git a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs index a22fb426..93b62925 100644 --- a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs +++ b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/HlslSourceRewriter.Diagnostics.cs @@ -7,7 +7,7 @@ using static ComputeSharp.SourceGenerators.Diagnostics.DiagnosticDescriptors; namespace ComputeSharp.SourceGenerators.SyntaxRewriters; /// -internal abstract partial class HlslSourceRewriter : CSharpSyntaxRewriter +partial class HlslSourceRewriter : CSharpSyntaxRewriter { /// public override SyntaxNode? VisitAnonymousObjectCreationExpression(AnonymousObjectCreationExpressionSyntax node) diff --git a/src/ComputeSharp/Core/Dispatch/ThreadIds.Normalized.cs b/src/ComputeSharp/Core/Dispatch/ThreadIds.Normalized.cs index 602258e3..75023d16 100644 --- a/src/ComputeSharp/Core/Dispatch/ThreadIds.Normalized.cs +++ b/src/ComputeSharp/Core/Dispatch/ThreadIds.Normalized.cs @@ -3,7 +3,7 @@ namespace ComputeSharp; /// -public static partial class ThreadIds +partial class ThreadIds { /// /// A that indicates the normalized ids of a given GPU thread running a compute shader. diff --git a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs index e1c65de6..a434df13 100644 --- a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs +++ b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs @@ -7,7 +7,7 @@ using ComputeSharp.Resources; namespace ComputeSharp; /// -public static partial class GraphicsDeviceExtensions +partial class GraphicsDeviceExtensions { /// /// Allocates a new constant buffer with the specified parameters. diff --git a/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs b/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs index ee8772d1..76c15576 100644 --- a/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs +++ b/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs @@ -21,7 +21,7 @@ using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.In namespace ComputeSharp.Graphics.Extensions; /// -internal static unsafe partial class IWICStreamExtensions +unsafe partial class IWICStreamExtensions { /// /// Initializes an input wrapping a given instance. diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Enumerator.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Enumerator.cs index 795cc5d2..019ef47d 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Enumerator.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Enumerator.cs @@ -15,7 +15,7 @@ using static TerraFX.Interop.DirectX.DXGI_GPU_PREFERENCE; namespace ComputeSharp.Graphics.Helpers; /// -internal static partial class DeviceHelper +partial class DeviceHelper { /// /// A custom query type that iterates through devices matching a given predicate. diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Factory.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Factory.cs index 95b02175..8445a801 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Factory.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.Factory.cs @@ -6,7 +6,7 @@ using TerraFX.Interop.Windows; namespace ComputeSharp.Graphics.Helpers; /// -internal static partial class DeviceHelper +partial class DeviceHelper { /// /// The local cache of instances that are currently usable. diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs index d8c521c4..029bbf27 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs @@ -15,7 +15,7 @@ using Enum = ComputeSharp.NetStandard.System.Enum; namespace ComputeSharp.Graphics.Helpers; /// -internal static partial class DeviceHelper +partial class DeviceHelper { /// /// A shared used from to create messages. diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs index c85dcb01..cb693974 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs @@ -15,7 +15,7 @@ using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.In namespace ComputeSharp.Graphics.Helpers; /// -internal static partial class DeviceHelper +partial class DeviceHelper { /// /// The creation flags for instances.