From 1b77d4fe510defd9ed9c811a03b845ee47b034c6 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 17 Jan 2023 00:40:35 +0100 Subject: [PATCH] Apply IDE0003 codefix to solution (simply names) --- samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs | 2 +- samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs | 6 ++++-- .../ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs | 6 ++++-- .../Controls/AnimatedComputeShaderPanel.cs | 8 ++++---- src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs | 8 ++++---- .../Graphics/Resources/Abstract/TransferTexture2D{T}.cs | 2 +- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs index fe9bf060..5dd2acb4 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs +++ b/samples/ComputeSharp.SwapChain.Uwp/App.xaml.cs @@ -25,7 +25,7 @@ sealed partial class App : Application /// public App() { - this.InitializeComponent(); + InitializeComponent(); } /// diff --git a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs index dac017c5..489cf3ee 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs +++ b/samples/ComputeSharp.SwapChain.Uwp/Views/MainView.xaml.cs @@ -17,8 +17,9 @@ public sealed partial class MainView : UserControl { public MainView() { - this.InitializeComponent(); - this.DataContext = App.Current.Services.GetRequiredService(); + InitializeComponent(); + + DataContext = App.Current.Services.GetRequiredService(); } /// @@ -32,6 +33,7 @@ public sealed partial class MainView : UserControl App.Current.Services.GetRequiredService().Log(Event.OpenShaderSelectionPanel); _ = this.Root.Resources.Remove("ShaderSelectionPanel"); + this.Root.Children.Add(this.ShaderSelectionPanel); } diff --git a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs index 0d03b5a1..59f54119 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs +++ b/samples/ComputeSharp.SwapChain.WinUI/Views/MainWindow.xaml.cs @@ -20,8 +20,9 @@ public sealed partial class MainWindow : Window public MainWindow() { - this.InitializeComponent(); - this.ExtendsContentIntoTitleBar = true; + InitializeComponent(); + + ExtendsContentIntoTitleBar = true; SetTitleBar(this.TitleBarRectangle); @@ -50,6 +51,7 @@ public sealed partial class MainWindow : Window private void OpenShaderSelectionPanelButton_Click(object sender, RoutedEventArgs e) { _ = this.Root.Resources.Remove("ShaderSelectionPanel"); + this.Root.Children.Add(this.ShaderSelectionPanel); } diff --git a/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs b/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs index ab611e3c..d486235a 100644 --- a/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs +++ b/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs @@ -47,10 +47,10 @@ public sealed partial class AnimatedComputeShaderPanel : SwapChainPanel, IDispos { this.swapChainManager = new SwapChainManager(this, device); - this.Loaded += AnimatedComputeShaderPanel_Loaded; - this.Unloaded += AnimatedComputeShaderPanel_Unloaded; - this.SizeChanged += AnimatedComputeShaderPanel_SizeChanged; - this.CompositionScaleChanged += AnimatedComputeShaderPanel_CompositionScaleChanged; + Loaded += AnimatedComputeShaderPanel_Loaded; + Unloaded += AnimatedComputeShaderPanel_Unloaded; + SizeChanged += AnimatedComputeShaderPanel_SizeChanged; + CompositionScaleChanged += AnimatedComputeShaderPanel_CompositionScaleChanged; } // Initializes the swap chain and starts the render thread diff --git a/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs index a0edfa80..dfeb8554 100644 --- a/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs +++ b/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs @@ -47,10 +47,10 @@ public sealed partial class ComputeShaderPanel : SwapChainPanel, IDisposable { this.swapChainManager = new SwapChainManager(this, device); - this.Loaded += ComputeShaderPanel_Loaded; - this.Unloaded += ComputeShaderPanel_Unloaded; - this.SizeChanged += ComputeShaderPanel_SizeChanged; - this.CompositionScaleChanged += ComputeShaderPanel_CompositionScaleChanged; + Loaded += ComputeShaderPanel_Loaded; + Unloaded += ComputeShaderPanel_Unloaded; + SizeChanged += ComputeShaderPanel_SizeChanged; + CompositionScaleChanged += ComputeShaderPanel_CompositionScaleChanged; } // Initializes the swap chain and starts the render thread diff --git a/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture2D{T}.cs b/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture2D{T}.cs index 179b93a4..7dd4d2a3 100644 --- a/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture2D{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Abstract/TransferTexture2D{T}.cs @@ -124,7 +124,7 @@ public abstract unsafe partial class TransferTexture2D : IReferenceTrackedObj [MethodImpl(MethodImplOptions.AggressiveInlining)] get { - using ReferenceTracker.Lease _0 = this.GetReferenceTracker().GetLease(); + using ReferenceTracker.Lease _0 = GetReferenceTracker().GetLease(); return new(this.mappedData, Width, Height, (int)this.d3D12PlacedSubresourceFootprint.Footprint.RowPitch); }