From 2e548f5d43aa08f534d66ca47991b7704a4d81b3 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 16 Sep 2024 11:38:33 -0500 Subject: [PATCH 1/4] Fix analyzer warnings for CsWinRTAotWarningLevel 2 --- .../Animations/src/Expressions/ExpressionNodes/BooleanNode.cs | 2 +- .../Animations/src/Expressions/ExpressionNodes/ColorNode.cs | 2 +- .../src/Expressions/ExpressionNodes/Matrix3x2Node.cs | 2 +- .../src/Expressions/ExpressionNodes/QuaternionNode.cs | 2 +- .../Animations/src/Expressions/ExpressionNodes/ScalarNode.cs | 2 +- .../Animations/src/Expressions/ExpressionNodes/Vector2Node.cs | 2 +- .../Animations/src/Expressions/ExpressionNodes/Vector3Node.cs | 2 +- .../Animations/src/Expressions/ExpressionNodes/Vector4Node.cs | 2 +- .../Expressions/ReferenceNodes/AmbientLightReferenceNode.cs | 2 +- .../src/Expressions/ReferenceNodes/ColorBrushReferenceNode.cs | 2 +- .../Expressions/ReferenceNodes/DistantLightReferenceNode.cs | 2 +- .../src/Expressions/ReferenceNodes/DropShadowReferenceNode.cs | 2 +- .../src/Expressions/ReferenceNodes/InsetClipReferenceNode.cs | 2 +- .../ReferenceNodes/InteractionTrackerReferenceNode.cs | 2 +- .../ReferenceNodes/ManipulationPropertySetReferenceNode.cs | 2 +- .../Expressions/ReferenceNodes/NineGridBrushReferenceNode.cs | 2 +- .../src/Expressions/ReferenceNodes/PointLightReferenceNode.cs | 2 +- .../ReferenceNodes/PointerPositionPropertySetReferenceNode.cs | 2 +- .../Expressions/ReferenceNodes/PropertySetReferenceNode.cs | 2 +- .../src/Expressions/ReferenceNodes/SpotLightReferenceNode.cs | 2 +- .../Expressions/ReferenceNodes/SurfaceBrushReferenceNode.cs | 2 +- .../src/Expressions/ReferenceNodes/VisualReferenceNode.cs | 2 +- components/Behaviors/src/FocusTargetList.cs | 2 +- .../AdvancedCollectionView/AdvancedCollectionView.Defer.cs | 2 +- components/Helpers/src/CameraHelper/CameraHelper.cs | 2 +- components/Helpers/src/ThemeListener.cs | 2 +- .../Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs | 4 ++-- .../Primitives/src/StaggeredLayout/StaggeredColumnLayout.cs | 2 +- components/RichSuggestBox/src/RichSuggestToken.cs | 2 +- components/SettingsControls/src/Helpers/StyleExtensions.cs | 2 +- .../TokenizingTextBox/src/InterspersedObservableCollection.cs | 2 +- tooling | 2 +- 32 files changed, 33 insertions(+), 33 deletions(-) diff --git a/components/Animations/src/Expressions/ExpressionNodes/BooleanNode.cs b/components/Animations/src/Expressions/ExpressionNodes/BooleanNode.cs index 552c6a74..69415ed0 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/BooleanNode.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/BooleanNode.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class BooleanNode. This class cannot be inherited. /// /// -public sealed class BooleanNode : ExpressionNode +public sealed partial class BooleanNode : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/ColorNode.cs b/components/Animations/src/Expressions/ExpressionNodes/ColorNode.cs index 8e8cb601..9bf4a263 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/ColorNode.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/ColorNode.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class ColorNode. This class cannot be inherited. /// /// -public sealed class ColorNode : ExpressionNode +public sealed partial class ColorNode : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/Matrix3x2Node.cs b/components/Animations/src/Expressions/ExpressionNodes/Matrix3x2Node.cs index efbf7830..bf1768c7 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/Matrix3x2Node.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/Matrix3x2Node.cs @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class Matrix3x2Node. This class cannot be inherited. /// /// -public sealed class Matrix3x2Node : ExpressionNode +public sealed partial class Matrix3x2Node : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/QuaternionNode.cs b/components/Animations/src/Expressions/ExpressionNodes/QuaternionNode.cs index 3855712e..03687905 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/QuaternionNode.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/QuaternionNode.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class QuaternionNode. This class cannot be inherited. /// /// -public sealed class QuaternionNode : ExpressionNode +public sealed partial class QuaternionNode : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/ScalarNode.cs b/components/Animations/src/Expressions/ExpressionNodes/ScalarNode.cs index a9e34a3c..b6769076 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/ScalarNode.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/ScalarNode.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class ScalarNode. This class cannot be inherited. /// /// -public sealed class ScalarNode : ExpressionNode +public sealed partial class ScalarNode : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/Vector2Node.cs b/components/Animations/src/Expressions/ExpressionNodes/Vector2Node.cs index 03396cc9..b914a6b2 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/Vector2Node.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/Vector2Node.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class Vector2Node. This class cannot be inherited. /// /// -public sealed class Vector2Node : ExpressionNode +public sealed partial class Vector2Node : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/Vector3Node.cs b/components/Animations/src/Expressions/ExpressionNodes/Vector3Node.cs index e90fe38f..571ca765 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/Vector3Node.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/Vector3Node.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class Vector3Node. This class cannot be inherited. /// /// -public sealed class Vector3Node : ExpressionNode +public sealed partial class Vector3Node : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ExpressionNodes/Vector4Node.cs b/components/Animations/src/Expressions/ExpressionNodes/Vector4Node.cs index 49f8451d..94ae79eb 100644 --- a/components/Animations/src/Expressions/ExpressionNodes/Vector4Node.cs +++ b/components/Animations/src/Expressions/ExpressionNodes/Vector4Node.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class Vector4Node. This class cannot be inherited. /// /// -public sealed class Vector4Node : ExpressionNode +public sealed partial class Vector4Node : ExpressionNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs index 57d8b193..8cc54dd9 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class AmbientLightReferenceNode. This class cannot be inherited. /// /// -public sealed class AmbientLightReferenceNode : ReferenceNode +public sealed partial class AmbientLightReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/ColorBrushReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/ColorBrushReferenceNode.cs index cfb802af..3f639247 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/ColorBrushReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/ColorBrushReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class ColorBrushReferenceNode. This class cannot be inherited. /// /// -public sealed class ColorBrushReferenceNode : ReferenceNode +public sealed partial class ColorBrushReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/DistantLightReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/DistantLightReferenceNode.cs index 560d980e..1f59f918 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/DistantLightReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/DistantLightReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class DistantLightReferenceNode. This class cannot be inherited. /// /// -public sealed class DistantLightReferenceNode : ReferenceNode +public sealed partial class DistantLightReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/DropShadowReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/DropShadowReferenceNode.cs index 6602249c..fde3b8fc 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/DropShadowReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/DropShadowReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class DropShadowReferenceNode. This class cannot be inherited. /// /// -public sealed class DropShadowReferenceNode : ReferenceNode +public sealed partial class DropShadowReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/InsetClipReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/InsetClipReferenceNode.cs index 720414b2..e976f940 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/InsetClipReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/InsetClipReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class InsetClipReferenceNode. This class cannot be inherited. /// /// -public sealed class InsetClipReferenceNode : ReferenceNode +public sealed partial class InsetClipReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/InteractionTrackerReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/InteractionTrackerReferenceNode.cs index 867800e3..90f08196 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/InteractionTrackerReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/InteractionTrackerReferenceNode.cs @@ -16,7 +16,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class InteractionTrackerReferenceNode. This class cannot be inherited. /// /// -public sealed class InteractionTrackerReferenceNode : ReferenceNode +public sealed partial class InteractionTrackerReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/ManipulationPropertySetReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/ManipulationPropertySetReferenceNode.cs index 377cc6e0..6faa3776 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/ManipulationPropertySetReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/ManipulationPropertySetReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class ManipulationPropertySetReferenceNode. This class cannot be inherited. /// /// -public sealed class ManipulationPropertySetReferenceNode : PropertySetReferenceNode +public sealed partial class ManipulationPropertySetReferenceNode : PropertySetReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/NineGridBrushReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/NineGridBrushReferenceNode.cs index a7f1e96a..097b5996 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/NineGridBrushReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/NineGridBrushReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class NineGridBrushReferenceNode. This class cannot be inherited. /// /// -public sealed class NineGridBrushReferenceNode : ReferenceNode +public sealed partial class NineGridBrushReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/PointLightReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/PointLightReferenceNode.cs index e7fbf3ee..4f5974f8 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/PointLightReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/PointLightReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class PointLightReferenceNode. This class cannot be inherited. /// /// -public sealed class PointLightReferenceNode : ReferenceNode +public sealed partial class PointLightReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/PointerPositionPropertySetReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/PointerPositionPropertySetReferenceNode.cs index 59b5f2d3..7ecffb5c 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/PointerPositionPropertySetReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/PointerPositionPropertySetReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class PointerPositionPropertySetReferenceNode. This class cannot be inherited. /// /// -public sealed class PointerPositionPropertySetReferenceNode : PropertySetReferenceNode +public sealed partial class PointerPositionPropertySetReferenceNode : PropertySetReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/PropertySetReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/PropertySetReferenceNode.cs index c33e8ce1..40bc3825 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/PropertySetReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/PropertySetReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class PropertySetReferenceNode. /// /// -public class PropertySetReferenceNode : ReferenceNode +public partial class PropertySetReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/SpotLightReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/SpotLightReferenceNode.cs index b97b9e2d..6cba9c1c 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/SpotLightReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/SpotLightReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class SpotLightReferenceNode. This class cannot be inherited. /// /// -public sealed class SpotLightReferenceNode : ReferenceNode +public sealed partial class SpotLightReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/SurfaceBrushReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/SurfaceBrushReferenceNode.cs index cd180501..51082a9a 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/SurfaceBrushReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/SurfaceBrushReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class SurfaceBrushReferenceNode. This class cannot be inherited. /// /// -public sealed class SurfaceBrushReferenceNode : ReferenceNode +public sealed partial class SurfaceBrushReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Animations/src/Expressions/ReferenceNodes/VisualReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/VisualReferenceNode.cs index 171fb4eb..d04538f8 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/VisualReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/VisualReferenceNode.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// Class VisualReferenceNode. This class cannot be inherited. /// /// -public sealed class VisualReferenceNode : ReferenceNode +public sealed partial class VisualReferenceNode : ReferenceNode { /// /// Initializes a new instance of the class. diff --git a/components/Behaviors/src/FocusTargetList.cs b/components/Behaviors/src/FocusTargetList.cs index 65ae0778..1ef261aa 100644 --- a/components/Behaviors/src/FocusTargetList.cs +++ b/components/Behaviors/src/FocusTargetList.cs @@ -7,6 +7,6 @@ namespace CommunityToolkit.WinUI.Behaviors; /// /// A collection of . /// -public sealed class FocusTargetList : List +public sealed partial class FocusTargetList : List { } diff --git a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Defer.cs b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Defer.cs index 42f0bbcb..92ef1355 100644 --- a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Defer.cs +++ b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Defer.cs @@ -22,7 +22,7 @@ public IDisposable DeferRefresh() /// Notification deferrer helper class /// #pragma warning disable CA1063 // Implement IDisposable Correctly - public class NotificationDeferrer : IDisposable + public partial class NotificationDeferrer : IDisposable #pragma warning restore CA1063 // Implement IDisposable Correctly { private readonly AdvancedCollectionView _acvs; diff --git a/components/Helpers/src/CameraHelper/CameraHelper.cs b/components/Helpers/src/CameraHelper/CameraHelper.cs index 831d89f6..3f166791 100644 --- a/components/Helpers/src/CameraHelper/CameraHelper.cs +++ b/components/Helpers/src/CameraHelper/CameraHelper.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Helpers; /// Make sure you have the capability webcam enabled for your app to access the device's camera. /// #pragma warning disable CA1063 // Implement IDisposable Correctly -public class CameraHelper : IDisposable +public partial class CameraHelper : IDisposable { private static IReadOnlyList? _frameSourceGroups; #pragma warning disable CA2213 // Disposable fields should be disposed diff --git a/components/Helpers/src/ThemeListener.cs b/components/Helpers/src/ThemeListener.cs index af35e3d9..ecd04b13 100644 --- a/components/Helpers/src/ThemeListener.cs +++ b/components/Helpers/src/ThemeListener.cs @@ -26,7 +26,7 @@ namespace CommunityToolkit.WinUI.Helpers; /// and Signals an Event when they occur. /// [AllowForWeb] -public sealed class ThemeListener : IDisposable +public sealed partial class ThemeListener : IDisposable { /// /// Gets the Name of the Current Theme. diff --git a/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs b/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs index d30e29ac..f056151f 100644 --- a/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs +++ b/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Media; /// An implementation that can be easily used inside a block /// #pragma warning disable CA1001 // Types that own disposable fields should be disposable -internal sealed class AsyncMutex +internal sealed partial class AsyncMutex #pragma warning restore CA1001 // Types that own disposable fields should be disposable { /// @@ -32,7 +32,7 @@ public async Task LockAsync() /// /// Private class that implements the automatic release of the semaphore /// - private sealed class Lock : IDisposable + private sealed partial class Lock : IDisposable { /// /// The instance of the parent class diff --git a/components/Primitives/src/StaggeredLayout/StaggeredColumnLayout.cs b/components/Primitives/src/StaggeredLayout/StaggeredColumnLayout.cs index 89191aa4..49d6d157 100644 --- a/components/Primitives/src/StaggeredLayout/StaggeredColumnLayout.cs +++ b/components/Primitives/src/StaggeredLayout/StaggeredColumnLayout.cs @@ -5,7 +5,7 @@ namespace CommunityToolkit.WinUI.Controls; [DebuggerDisplay("Count = {Count}, Height = {Height}")] -internal class StaggeredColumnLayout : List +internal partial class StaggeredColumnLayout : List { public double Height { get; private set; } diff --git a/components/RichSuggestBox/src/RichSuggestToken.cs b/components/RichSuggestBox/src/RichSuggestToken.cs index 5a66f6eb..69443f33 100644 --- a/components/RichSuggestBox/src/RichSuggestToken.cs +++ b/components/RichSuggestBox/src/RichSuggestToken.cs @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// RichSuggestToken describes a suggestion token in the document. /// -public class RichSuggestToken : INotifyPropertyChanged +public partial class RichSuggestToken : INotifyPropertyChanged { /// public event PropertyChangedEventHandler? PropertyChanged; diff --git a/components/SettingsControls/src/Helpers/StyleExtensions.cs b/components/SettingsControls/src/Helpers/StyleExtensions.cs index 830799f7..2a44d465 100644 --- a/components/SettingsControls/src/Helpers/StyleExtensions.cs +++ b/components/SettingsControls/src/Helpers/StyleExtensions.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI.Controls; public static partial class StyleExtensions { // Used to distinct normal ResourceDictionary and the one we add. - private sealed class StyleExtensionResourceDictionary : ResourceDictionary + private sealed partial class StyleExtensionResourceDictionary : ResourceDictionary { } diff --git a/components/TokenizingTextBox/src/InterspersedObservableCollection.cs b/components/TokenizingTextBox/src/InterspersedObservableCollection.cs index 74a3b81c..c2296ff3 100644 --- a/components/TokenizingTextBox/src/InterspersedObservableCollection.cs +++ b/components/TokenizingTextBox/src/InterspersedObservableCollection.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Controls; #pragma warning disable CS8622 #pragma warning disable CS8603 #pragma warning disable CS8714 -internal class InterspersedObservableCollection : IList, IEnumerable, INotifyCollectionChanged +internal partial class InterspersedObservableCollection : IList, IEnumerable, INotifyCollectionChanged { public IList ItemsSource { get; private set; } diff --git a/tooling b/tooling index 0a9aa0e6..79bd7eba 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 0a9aa0e6065b0adf23e66ba1361534ce1240f7bb +Subproject commit 79bd7eba78747d40f4919b7e170e771176c11105 From 749f641414526691fa91ac45669915ccbf35ee69 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 17 Sep 2024 13:03:45 -0500 Subject: [PATCH 2/4] Removed partials used by AoT analyzers. Not needed for types never passed to a native WinRT method. See https://github.com/CommunityToolkit/Windows/pull/507#discussion_r1761576930 --- .../Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs b/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs index f056151f..d30e29ac 100644 --- a/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs +++ b/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Media; /// An implementation that can be easily used inside a block /// #pragma warning disable CA1001 // Types that own disposable fields should be disposable -internal sealed partial class AsyncMutex +internal sealed class AsyncMutex #pragma warning restore CA1001 // Types that own disposable fields should be disposable { /// @@ -32,7 +32,7 @@ public async Task LockAsync() /// /// Private class that implements the automatic release of the semaphore /// - private sealed partial class Lock : IDisposable + private sealed class Lock : IDisposable { /// /// The instance of the parent class From 3250380ce4280b36f177cfaf041975de2951f5d2 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 17 Sep 2024 13:59:26 -0500 Subject: [PATCH 3/4] Pragma warning disable CsWinRT1028 as needed --- .../Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs b/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs index d30e29ac..cc6e47cc 100644 --- a/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs +++ b/components/Media/src/Extensions/System.Threading.Tasks/AsyncMutex.cs @@ -10,7 +10,9 @@ namespace CommunityToolkit.WinUI.Media; /// An implementation that can be easily used inside a block /// #pragma warning disable CA1001 // Types that own disposable fields should be disposable +#pragma warning disable CsWinRT1028 // Partial not required for types never passed to native WinRT method. internal sealed class AsyncMutex +#pragma warning restore CsWinRT1028 #pragma warning restore CA1001 // Types that own disposable fields should be disposable { /// @@ -32,7 +34,9 @@ public async Task LockAsync() /// /// Private class that implements the automatic release of the semaphore /// +#pragma warning disable CsWinRT1028 // Partial not required for types never passed to native WinRT method. private sealed class Lock : IDisposable +#pragma warning restore CsWinRT1028 { /// /// The instance of the parent class From a6645c13772ca1f11d975db18a6e1c4d025ee382 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 17 Sep 2024 18:00:41 -0500 Subject: [PATCH 4/4] Updated tooling to latest main --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 79bd7eba..cba322e2 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 79bd7eba78747d40f4919b7e170e771176c11105 +Subproject commit cba322e223f936e38f43ad54a04726c3b93d03ca