diff --git a/CommunityToolkit.Common/Deferred/DeferredEventArgs.cs b/CommunityToolkit.Common/Deferred/DeferredEventArgs.cs index 8eab42d..3cf67b4 100644 --- a/CommunityToolkit.Common/Deferred/DeferredEventArgs.cs +++ b/CommunityToolkit.Common/Deferred/DeferredEventArgs.cs @@ -41,7 +41,7 @@ public EventDeferral GetDeferral() /// </summary> /// <returns>Internal EventDeferral reference</returns> #if !NETSTANDARD1_4 - [Browsable(false)] + [Browsable(false)] #endif [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This is an internal only method to be used by EventHandler extension classes, public callers should call GetDeferral() instead.")] diff --git a/CommunityToolkit.Common/Deferred/EventDeferral.cs b/CommunityToolkit.Common/Deferred/EventDeferral.cs index cd04701..33b6d54 100644 --- a/CommunityToolkit.Common/Deferred/EventDeferral.cs +++ b/CommunityToolkit.Common/Deferred/EventDeferral.cs @@ -34,7 +34,7 @@ internal EventDeferral() /// <param name="cancellationToken"><see cref="CancellationToken"/>.</param> /// <returns><see cref="Task"/>.</returns> #if !NETSTANDARD1_4 - [Browsable(false)] + [Browsable(false)] #endif [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This is an internal only method to be used by EventHandler extension classes, public callers should call GetDeferral() instead on the DeferredEventArgs.")] diff --git a/CommunityToolkit.Common/Extensions/ISettingsStorageHelperExtensions.cs b/CommunityToolkit.Common/Extensions/ISettingsStorageHelperExtensions.cs index a4a01e0..84fffce 100644 --- a/CommunityToolkit.Common/Extensions/ISettingsStorageHelperExtensions.cs +++ b/CommunityToolkit.Common/Extensions/ISettingsStorageHelperExtensions.cs @@ -47,7 +47,7 @@ public static class ISettingsStorageHelperExtensions public static TValue? Read<TKey, TValue>(this ISettingsStorageHelper<TKey> storageHelper, TKey key) where TKey : notnull { - if (storageHelper.TryRead<TValue>(key, out TValue? value)) + if (storageHelper.TryRead(key, out TValue? value)) { return value; } diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.Collection.Generic.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.Collection.Generic.ThrowHelper.cs index e2ced36..8c00e24 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.Collection.Generic.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.Collection.Generic.ThrowHelper.cs @@ -18,7 +18,7 @@ public static partial class Guard private static partial class ThrowHelper { /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotEmpty{T}(Span{T},string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEmpty{T}(Span{T},string)"/> fails. /// </summary> /// <typeparam name="T">The item of items in the input <see cref="Span{T}"/> instance.</typeparam> /// <remarks>This method is needed because <see cref="Span{T}"/> can't be used as a generic type parameter.</remarks> @@ -29,7 +29,7 @@ public static void ThrowArgumentExceptionForIsNotEmptyWithSpan<T>(string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotEmpty{T}(ReadOnlySpan{T},string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEmpty{T}(ReadOnlySpan{T},string)"/> fails. /// </summary> /// <typeparam name="T">The item of items in the input <see cref="ReadOnlySpan{T}"/> instance.</typeparam> /// <remarks>This method is needed because <see cref="ReadOnlySpan{T}"/> can't be used as a generic type parameter.</remarks> @@ -40,7 +40,7 @@ public static void ThrowArgumentExceptionForIsNotEmptyWithReadOnlySpan<T>(string } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotEmpty{T}(T[],string)"/> (or an overload) fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEmpty{T}(T[],string)"/> (or an overload) fails. /// </summary> /// <typeparam name="T">The item of items in the input collection.</typeparam> [DoesNotReturn] diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Generic.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Generic.ThrowHelper.cs index e548132..fb7a12b 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Generic.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Generic.ThrowHelper.cs @@ -18,7 +18,7 @@ public static partial class Guard private static partial class ThrowHelper { /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsDefault{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsDefault{T}"/> fails. /// </summary> /// <typeparam name="T">The type of <see langword="struct"/> value type being tested.</typeparam> [DoesNotReturn] @@ -29,7 +29,7 @@ public static void ThrowArgumentExceptionForIsDefault<T>(T value, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotDefault{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotDefault{T}"/> fails. /// </summary> /// <typeparam name="T">The type of <see langword="struct"/> value type being tested.</typeparam> [DoesNotReturn] @@ -40,7 +40,7 @@ public static void ThrowArgumentExceptionForIsNotDefault<T>(string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -50,7 +50,7 @@ public static void ThrowArgumentExceptionForIsEqualTo<T>(T value, T target, stri } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -60,7 +60,7 @@ public static void ThrowArgumentExceptionForIsNotEqualTo<T>(T value, T target, s } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsBitwiseEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsBitwiseEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of input values being compared.</typeparam> [DoesNotReturn] @@ -71,7 +71,7 @@ public static void ThrowArgumentExceptionForBitwiseEqualTo<T>(T value, T target, } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsLessThan{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsLessThan{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -81,7 +81,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsLessThan<T>(T value, T m } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsLessThanOrEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsLessThanOrEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -91,7 +91,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo<T>(T v } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsGreaterThan{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsGreaterThan{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -101,7 +101,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsGreaterThan<T>(T value, } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsGreaterThanOrEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsGreaterThanOrEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -111,7 +111,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo<T>( } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsInRange{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsInRange{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -121,7 +121,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsInRange<T>(T value, T mi } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsInRange{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsInRange{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -131,7 +131,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsNotInRange<T>(T value, T } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsBetween{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsBetween{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -141,7 +141,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsBetween<T>(T value, T mi } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsNotBetween{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsNotBetween{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -151,7 +151,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsNotBetween<T>(T value, T } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsBetweenOrEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsBetweenOrEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] @@ -161,7 +161,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo<T>(T va } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsNotBetweenOrEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsNotBetweenOrEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of values being tested.</typeparam> [DoesNotReturn] diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Numeric.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Numeric.ThrowHelper.cs index 211a67e..1e237dc 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Numeric.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.Comparable.Numeric.ThrowHelper.cs @@ -18,7 +18,7 @@ public static partial class Guard private static partial class ThrowHelper { /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCloseTo(int,int,uint,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCloseTo(int,int,uint,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCloseTo(int value, int target, uint delta, string name) @@ -27,7 +27,7 @@ public static void ThrowArgumentExceptionForIsCloseTo(int value, int target, uin } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCloseTo(int,int,uint,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCloseTo(int,int,uint,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCloseTo(int value, int target, uint delta, string name) @@ -36,7 +36,7 @@ public static void ThrowArgumentExceptionForIsNotCloseTo(int value, int target, } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCloseTo(long,long,ulong,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCloseTo(long,long,ulong,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCloseTo(long value, long target, ulong delta, string name) @@ -45,7 +45,7 @@ public static void ThrowArgumentExceptionForIsCloseTo(long value, long target, u } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCloseTo(long,long,ulong,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCloseTo(long,long,ulong,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCloseTo(long value, long target, ulong delta, string name) @@ -54,7 +54,7 @@ public static void ThrowArgumentExceptionForIsNotCloseTo(long value, long target } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCloseTo(float,float,float,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCloseTo(float,float,float,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCloseTo(float value, float target, float delta, string name) @@ -63,7 +63,7 @@ public static void ThrowArgumentExceptionForIsCloseTo(float value, float target, } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCloseTo(float,float,float,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCloseTo(float,float,float,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCloseTo(float value, float target, float delta, string name) @@ -72,7 +72,7 @@ public static void ThrowArgumentExceptionForIsNotCloseTo(float value, float targ } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCloseTo(double,double,double,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCloseTo(double,double,double,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCloseTo(double value, double target, double delta, string name) @@ -81,7 +81,7 @@ public static void ThrowArgumentExceptionForIsCloseTo(double value, double targe } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCloseTo(double,double,double,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCloseTo(double,double,double,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCloseTo(double value, double target, double delta, string name) @@ -90,7 +90,7 @@ public static void ThrowArgumentExceptionForIsNotCloseTo(double value, double ta } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCloseTo(nint,nint,nuint,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCloseTo(nint,nint,nuint,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCloseTo(nint value, nint target, nuint delta, string name) @@ -99,7 +99,7 @@ public static void ThrowArgumentExceptionForIsCloseTo(nint value, nint target, n } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCloseTo(nint,nint,nuint,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCloseTo(nint,nint,nuint,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCloseTo(nint value, nint target, nuint delta, string name) diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.IO.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.IO.ThrowHelper.cs index 85c1975..1511a5f 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.IO.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.IO.ThrowHelper.cs @@ -19,7 +19,7 @@ public static partial class Guard private static partial class ThrowHelper { /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.CanRead"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="CanRead"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForCanRead(Stream stream, string name) @@ -28,7 +28,7 @@ public static void ThrowArgumentExceptionForCanRead(Stream stream, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.CanWrite"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="CanWrite"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForCanWrite(Stream stream, string name) @@ -37,7 +37,7 @@ public static void ThrowArgumentExceptionForCanWrite(Stream stream, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.CanSeek"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="CanSeek"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForCanSeek(Stream stream, string name) @@ -46,7 +46,7 @@ public static void ThrowArgumentExceptionForCanSeek(Stream stream, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsAtStartPosition"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsAtStartPosition"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsAtStartPosition(Stream stream, string name) diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.String.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.String.ThrowHelper.cs index 85c7f11..72bb0f8 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.String.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.String.ThrowHelper.cs @@ -19,7 +19,7 @@ public static partial class Guard private static partial class ThrowHelper { /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNullOrEmpty"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNullOrEmpty"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNullOrEmpty(string? text, string name) @@ -28,7 +28,7 @@ public static void ThrowArgumentExceptionForIsNullOrEmpty(string? text, string n } /// <summary> - /// Throws an <see cref="ArgumentNullException"/> or <see cref="ArgumentException"/> when <see cref="Guard.IsNotNullOrEmpty"/> fails. + /// Throws an <see cref="ArgumentNullException"/> or <see cref="ArgumentException"/> when <see cref="IsNotNullOrEmpty"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotNullOrEmpty(string? text, string name) @@ -48,7 +48,7 @@ static Exception GetException(string? text, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNullOrWhitespace"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNullOrWhitespace"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNullOrWhiteSpace(string? text, string name) @@ -57,7 +57,7 @@ public static void ThrowArgumentExceptionForIsNullOrWhiteSpace(string? text, str } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotNullOrWhitespace"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotNullOrWhitespace"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotNullOrWhiteSpace(string? text, string name) @@ -77,7 +77,7 @@ static Exception GetException(string? text, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsEmpty"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsEmpty"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsEmpty(string text, string name) @@ -86,7 +86,7 @@ public static void ThrowArgumentExceptionForIsEmpty(string text, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotEmpty"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotEmpty"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotEmpty(string text, string name) @@ -95,7 +95,7 @@ public static void ThrowArgumentExceptionForIsNotEmpty(string text, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsWhitespace"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsWhitespace"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsWhiteSpace(string text, string name) @@ -104,7 +104,7 @@ public static void ThrowArgumentExceptionForIsWhiteSpace(string text, string nam } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotWhitespace"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotWhitespace"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotWhiteSpace(string text, string name) @@ -113,7 +113,7 @@ public static void ThrowArgumentExceptionForIsNotWhiteSpace(string text, string } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeEqualTo(string,int,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeEqualTo(string,int,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeEqualTo(string text, int size, string name) @@ -122,7 +122,7 @@ public static void ThrowArgumentExceptionForHasSizeEqualTo(string text, int size } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeNotEqualTo"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeNotEqualTo"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeNotEqualTo(string text, int size, string name) @@ -131,7 +131,7 @@ public static void ThrowArgumentExceptionForHasSizeNotEqualTo(string text, int s } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeGreaterThan"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeGreaterThan"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeGreaterThan(string text, int size, string name) @@ -140,7 +140,7 @@ public static void ThrowArgumentExceptionForHasSizeGreaterThan(string text, int } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeGreaterThanOrEqualTo"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeGreaterThanOrEqualTo"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(string text, int size, string name) @@ -149,7 +149,7 @@ public static void ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(string t } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeLessThan"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeLessThan"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeLessThan(string text, int size, string name) @@ -158,7 +158,7 @@ public static void ThrowArgumentExceptionForHasSizeLessThan(string text, int siz } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeLessThanOrEqualTo(string,int,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeLessThanOrEqualTo(string,int,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(string text, int size, string name) @@ -167,7 +167,7 @@ public static void ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(string text } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeEqualTo(string,string,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeEqualTo(string,string,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeEqualTo(string source, string destination, string name) @@ -176,7 +176,7 @@ public static void ThrowArgumentExceptionForHasSizeEqualTo(string source, string } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasSizeLessThanOrEqualTo(string,string,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasSizeLessThanOrEqualTo(string,string,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(string source, string destination, string name) @@ -185,7 +185,7 @@ public static void ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(string sour } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsInRangeFor(int,string,string)"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsInRangeFor(int,string,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentOutOfRangeExceptionForIsInRangeFor(int index, string text, string name) @@ -194,7 +194,7 @@ public static void ThrowArgumentOutOfRangeExceptionForIsInRangeFor(int index, st } /// <summary> - /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="Guard.IsNotInRangeFor(int,string,string)"/> fails. + /// Throws an <see cref="ArgumentOutOfRangeException"/> when <see cref="IsNotInRangeFor(int,string,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(int index, string text, string name) diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.Tasks.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.Tasks.ThrowHelper.cs index b7007b3..dbdf45b 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.Tasks.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.Tasks.ThrowHelper.cs @@ -19,7 +19,7 @@ public static partial class Guard private static partial class ThrowHelper { /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCompleted"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCompleted"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCompleted(Task task, string name) @@ -28,7 +28,7 @@ public static void ThrowArgumentExceptionForIsCompleted(Task task, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCompleted"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCompleted"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCompleted(Task task, string name) @@ -37,7 +37,7 @@ public static void ThrowArgumentExceptionForIsNotCompleted(Task task, string nam } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCompletedSuccessfully"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCompletedSuccessfully"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCompletedSuccessfully(Task task, string name) @@ -46,7 +46,7 @@ public static void ThrowArgumentExceptionForIsCompletedSuccessfully(Task task, s } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCompletedSuccessfully"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCompletedSuccessfully"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCompletedSuccessfully(Task task, string name) @@ -55,7 +55,7 @@ public static void ThrowArgumentExceptionForIsNotCompletedSuccessfully(Task task } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsFaulted"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsFaulted"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsFaulted(Task task, string name) @@ -64,7 +64,7 @@ public static void ThrowArgumentExceptionForIsFaulted(Task task, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotFaulted"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotFaulted"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotFaulted(Task task, string name) @@ -73,7 +73,7 @@ public static void ThrowArgumentExceptionForIsNotFaulted(Task task, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsCanceled"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsCanceled"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsCanceled(Task task, string name) @@ -82,7 +82,7 @@ public static void ThrowArgumentExceptionForIsCanceled(Task task, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotCanceled"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotCanceled"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotCanceled(Task task, string name) @@ -91,7 +91,7 @@ public static void ThrowArgumentExceptionForIsNotCanceled(Task task, string name } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasStatusEqualTo"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasStatusEqualTo"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasStatusEqualTo(Task task, TaskStatus status, string name) @@ -100,7 +100,7 @@ public static void ThrowArgumentExceptionForHasStatusEqualTo(Task task, TaskStat } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.HasStatusNotEqualTo"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="HasStatusNotEqualTo"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForHasStatusNotEqualTo(Task task, TaskStatus status, string name) diff --git a/CommunityToolkit.Diagnostics/Internals/Guard.ThrowHelper.cs b/CommunityToolkit.Diagnostics/Internals/Guard.ThrowHelper.cs index 1c477a0..af727a5 100644 --- a/CommunityToolkit.Diagnostics/Internals/Guard.ThrowHelper.cs +++ b/CommunityToolkit.Diagnostics/Internals/Guard.ThrowHelper.cs @@ -35,7 +35,7 @@ private static string AssertString(object? obj) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNull{T}(T,string)"/> (where <typeparamref name="T"/> is <see langword="class"/>) fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNull{T}(T,string)"/> (where <typeparamref name="T"/> is <see langword="class"/>) fails. /// </summary> /// <typeparam name="T">The type of the input value.</typeparam> [DoesNotReturn] @@ -46,7 +46,7 @@ public static void ThrowArgumentExceptionForIsNull<T>(T value, string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNull{T}(T,string)"/> (where <typeparamref name="T"/> is <see langword="struct"/>) fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNull{T}(T,string)"/> (where <typeparamref name="T"/> is <see langword="struct"/>) fails. /// </summary> /// <typeparam name="T">The type of the input value.</typeparam> [DoesNotReturn] @@ -57,7 +57,7 @@ public static void ThrowArgumentExceptionForIsNull<T>(T? value, string name) } /// <summary> - /// Throws an <see cref="ArgumentNullException"/> when <see cref="Guard.IsNotNull{T}(T,string)"/> fails. + /// Throws an <see cref="ArgumentNullException"/> when <see cref="IsNotNull{T}(T,string)"/> fails. /// </summary> /// <typeparam name="T">The type of the input value.</typeparam> [DoesNotReturn] @@ -67,7 +67,7 @@ public static void ThrowArgumentNullExceptionForIsNotNull<T>(string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsOfType{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsOfType{T}"/> fails. /// </summary> /// <typeparam name="T">The type of the input value.</typeparam> [DoesNotReturn] @@ -77,7 +77,7 @@ public static void ThrowArgumentExceptionForIsOfType<T>(object value, string nam } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotOfType{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotOfType{T}"/> fails. /// </summary> /// <typeparam name="T">The type of the input value.</typeparam> [DoesNotReturn] @@ -87,7 +87,7 @@ public static void ThrowArgumentExceptionForIsNotOfType<T>(object value, string } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsOfType"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsOfType"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsOfType(object value, Type type, string name) @@ -96,7 +96,7 @@ public static void ThrowArgumentExceptionForIsOfType(object value, Type type, st } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotOfType"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotOfType"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotOfType(object value, Type type, string name) @@ -105,7 +105,7 @@ public static void ThrowArgumentExceptionForIsNotOfType(object value, Type type, } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsAssignableToType{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsAssignableToType{T}"/> fails. /// </summary> /// <typeparam name="T">The type being checked against.</typeparam> [DoesNotReturn] @@ -115,7 +115,7 @@ public static void ThrowArgumentExceptionForIsAssignableToType<T>(object value, } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotAssignableToType{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsNotAssignableToType{T}"/> fails. /// </summary> /// <typeparam name="T">The type being checked against.</typeparam> [DoesNotReturn] @@ -125,7 +125,7 @@ public static void ThrowArgumentExceptionForIsNotAssignableToType<T>(object valu } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsAssignableToType"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsAssignableToType"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsAssignableToType(object value, Type type, string name) @@ -134,7 +134,7 @@ public static void ThrowArgumentExceptionForIsAssignableToType(object value, Typ } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsAssignableToType"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsAssignableToType"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsNotAssignableToType(object value, Type type, string name) @@ -143,7 +143,7 @@ public static void ThrowArgumentExceptionForIsNotAssignableToType(object value, } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsReferenceEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsReferenceEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of input value being compared.</typeparam> [DoesNotReturn] @@ -154,7 +154,7 @@ public static void ThrowArgumentExceptionForIsReferenceEqualTo<T>(string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsReferenceNotEqualTo{T}"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsReferenceNotEqualTo{T}"/> fails. /// </summary> /// <typeparam name="T">The type of input value being compared.</typeparam> [DoesNotReturn] @@ -165,7 +165,7 @@ public static void ThrowArgumentExceptionForIsReferenceNotEqualTo<T>(string name } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsTrue(bool,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsTrue(bool,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsTrue(string name) @@ -174,7 +174,7 @@ public static void ThrowArgumentExceptionForIsTrue(string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsTrue(bool,string,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsTrue(bool,string,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsTrue(string name, string message) @@ -183,7 +183,7 @@ public static void ThrowArgumentExceptionForIsTrue(string name, string message) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsFalse(bool,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsFalse(bool,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsFalse(string name) @@ -192,7 +192,7 @@ public static void ThrowArgumentExceptionForIsFalse(string name) } /// <summary> - /// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsFalse(bool,string,string)"/> fails. + /// Throws an <see cref="ArgumentException"/> when <see cref="IsFalse(bool,string,string)"/> fails. /// </summary> [DoesNotReturn] public static void ThrowArgumentExceptionForIsFalse(string name, string message) diff --git a/CommunityToolkit.HighPerformance/Box{T}.cs b/CommunityToolkit.HighPerformance/Box{T}.cs index 837b33e..c530fcf 100644 --- a/CommunityToolkit.HighPerformance/Box{T}.cs +++ b/CommunityToolkit.HighPerformance/Box{T}.cs @@ -186,9 +186,6 @@ private static void ThrowInvalidCastExceptionForGetFrom() } } -#pragma warning disable SA1402 // Extensions being declared after the type they apply to -#pragma warning disable SA1204 // Extension class to replace instance methods for Box<T> - /// <summary> /// Helpers for working with the <see cref="Box{T}"/> type. /// </summary> diff --git a/CommunityToolkit.HighPerformance/Buffers/StringPool.cs b/CommunityToolkit.HighPerformance/Buffers/StringPool.cs index c586bfe..7687b31 100644 --- a/CommunityToolkit.HighPerformance/Buffers/StringPool.cs +++ b/CommunityToolkit.HighPerformance/Buffers/StringPool.cs @@ -12,8 +12,6 @@ #endif using BitOperations = CommunityToolkit.HighPerformance.Helpers.Internals.BitOperations; -#nullable enable - namespace CommunityToolkit.HighPerformance.Buffers; /// <summary> diff --git a/CommunityToolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs b/CommunityToolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs index d40c3c4..3a0f071 100644 --- a/CommunityToolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs +++ b/CommunityToolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs @@ -93,7 +93,6 @@ public static ref T DangerousGetReferenceAt<T>(this T[,] array, int i, int j) private sealed class RawArray2DData { #pragma warning disable CS0649 // Unassigned fields -#pragma warning disable SA1401 // Fields should be private public IntPtr Length; public int Height; public int Width; @@ -101,7 +100,6 @@ private sealed class RawArray2DData public int WidthLowerBound; public byte Data; #pragma warning restore CS0649 -#pragma warning restore SA1401 } #endif diff --git a/CommunityToolkit.HighPerformance/Extensions/ReadOnlyMemoryExtensions.cs b/CommunityToolkit.HighPerformance/Extensions/ReadOnlyMemoryExtensions.cs index aa09571..cae4398 100644 --- a/CommunityToolkit.HighPerformance/Extensions/ReadOnlyMemoryExtensions.cs +++ b/CommunityToolkit.HighPerformance/Extensions/ReadOnlyMemoryExtensions.cs @@ -113,7 +113,7 @@ public static ReadOnlyMemory<TTo> Cast<TFrom, TTo>(this ReadOnlyMemory<TFrom> me return new ArrayMemoryManager<TFrom, TTo>(segment.Array!, segment.Offset, segment.Count).Memory; } - if (MemoryMarshal.TryGetMemoryManager<TFrom, MemoryManager<TFrom>>(memory, out MemoryManager<TFrom>? memoryManager, out start, out length)) + if (MemoryMarshal.TryGetMemoryManager(memory, out MemoryManager<TFrom>? memoryManager, out start, out length)) { // If the memory manager is the one resulting from a previous cast, we can use it directly to retrieve // a new manager for the target type that wraps the original data store, instead of creating one that @@ -124,7 +124,7 @@ public static ReadOnlyMemory<TTo> Cast<TFrom, TTo>(this ReadOnlyMemory<TFrom> me return wrappingManager.GetMemory<TTo>(start, length); } - return new ProxyMemoryManager<TFrom, TTo>(memoryManager, start, length).Memory; + return new ProxyMemoryManager<TFrom, TTo>(memoryManager!, start, length).Memory; } // Throws when the memory instance has an unsupported backing store diff --git a/CommunityToolkit.HighPerformance/Helpers/Internals/RuntimeHelpers.cs b/CommunityToolkit.HighPerformance/Helpers/Internals/RuntimeHelpers.cs index 9e2e9d3..db5e9a8 100644 --- a/CommunityToolkit.HighPerformance/Helpers/Internals/RuntimeHelpers.cs +++ b/CommunityToolkit.HighPerformance/Helpers/Internals/RuntimeHelpers.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // The portable implementation in this type is originally from CoreFX. // See https://github.com/dotnet/corefx/blob/release/2.1/src/System.Memory/src/System/SpanHelpers.cs. diff --git a/CommunityToolkit.HighPerformance/Helpers/ObjectMarshal.cs b/CommunityToolkit.HighPerformance/Helpers/ObjectMarshal.cs index 59460e1..331a4c3 100644 --- a/CommunityToolkit.HighPerformance/Helpers/ObjectMarshal.cs +++ b/CommunityToolkit.HighPerformance/Helpers/ObjectMarshal.cs @@ -82,9 +82,7 @@ public static ref T DangerousGetObjectDataReferenceAt<T>(object obj, IntPtr offs private sealed class RawObjectData { [FieldOffset(0)] -#pragma warning disable SA1401 // Fields should be private public byte Data; -#pragma warning restore SA1401 } /// <summary> diff --git a/CommunityToolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs b/CommunityToolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs index a8ef026..1a8c38b 100644 --- a/CommunityToolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs +++ b/CommunityToolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs @@ -493,7 +493,7 @@ internal ReadOnlyMemory2D(ReadOnlyMemory<T> memory, int offset, int height, int this.instance = array; this.offset = ObjectMarshal.DangerousGetObjectDataByteOffset(array, ref array.DangerousGetReferenceAt(segment.Offset + offset)); } - else if (MemoryMarshal.TryGetMemoryManager<T, MemoryManager<T>>(memory, out MemoryManager<T>? memoryManager, out int memoryManagerStart, out _)) + else if (MemoryMarshal.TryGetMemoryManager(memory, out MemoryManager<T>? memoryManager, out int memoryManagerStart, out _)) { this.instance = memoryManager; this.offset = (nint)(uint)(memoryManagerStart + offset); diff --git a/CommunityToolkit.HighPerformance/Streams/MemoryStream.cs b/CommunityToolkit.HighPerformance/Streams/MemoryStream.cs index 03a5147..91bcb70 100644 --- a/CommunityToolkit.HighPerformance/Streams/MemoryStream.cs +++ b/CommunityToolkit.HighPerformance/Streams/MemoryStream.cs @@ -38,9 +38,9 @@ public static Stream Create(ReadOnlyMemory<byte> memory, bool isReadOnly) return new MemoryStream<ArrayOwner>(arraySpanSource, isReadOnly); } - if (MemoryMarshal.TryGetMemoryManager<byte, MemoryManager<byte>>(memory, out MemoryManager<byte>? memoryManager, out int start, out int length)) + if (MemoryMarshal.TryGetMemoryManager(memory, out MemoryManager<byte>? memoryManager, out int start, out int length)) { - MemoryManagerOwner memoryManagerSpanSource = new(memoryManager, start, length); + MemoryManagerOwner memoryManagerSpanSource = new(memoryManager!, start, length); return new MemoryStream<MemoryManagerOwner>(memoryManagerSpanSource, isReadOnly); } diff --git a/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.cs b/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.cs index 00d9937..07acff4 100644 --- a/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.cs +++ b/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.cs @@ -15,8 +15,6 @@ using CommunityToolkit.Mvvm.SourceGenerators.Extensions; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; -#pragma warning disable SA1008 - namespace CommunityToolkit.Mvvm.SourceGenerators; /// <summary> diff --git a/CommunityToolkit.Mvvm/ComponentModel/ObservableObject.cs b/CommunityToolkit.Mvvm/ComponentModel/ObservableObject.cs index 8b09283..28a1ea2 100644 --- a/CommunityToolkit.Mvvm/ComponentModel/ObservableObject.cs +++ b/CommunityToolkit.Mvvm/ComponentModel/ObservableObject.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // This file is inspired from the MvvmLight library (lbugnion/MvvmLight), // more info in ThirdPartyNotices.txt in the root of the project. diff --git a/CommunityToolkit.Mvvm/ComponentModel/ObservableRecipient.cs b/CommunityToolkit.Mvvm/ComponentModel/ObservableRecipient.cs index 013bded..bb9e01c 100644 --- a/CommunityToolkit.Mvvm/ComponentModel/ObservableRecipient.cs +++ b/CommunityToolkit.Mvvm/ComponentModel/ObservableRecipient.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // This file is inspired from the MvvmLight library (lbugnion/MvvmLight), // more info in ThirdPartyNotices.txt in the root of the project. diff --git a/CommunityToolkit.Mvvm/ComponentModel/ObservableValidator.cs b/CommunityToolkit.Mvvm/ComponentModel/ObservableValidator.cs index c217ba7..75ec133 100644 --- a/CommunityToolkit.Mvvm/ComponentModel/ObservableValidator.cs +++ b/CommunityToolkit.Mvvm/ComponentModel/ObservableValidator.cs @@ -759,7 +759,6 @@ static Dictionary<string, string> GetDisplayNames(Type type) return displayName ?? propertyName; } -#pragma warning disable SA1204 /// <summary> /// Throws an <see cref="ArgumentNullException"/> when a property name given as input is <see langword="null"/>. /// </summary> @@ -767,5 +766,4 @@ private static void ThrowArgumentNullExceptionForNullPropertyName() { throw new ArgumentNullException("propertyName", "The input property name cannot be null when validating a property"); } -#pragma warning restore SA1204 } diff --git a/CommunityToolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs b/CommunityToolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs index 7a51227..a4a598e 100644 --- a/CommunityToolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs +++ b/CommunityToolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1300 - using System; using System.ComponentModel; diff --git a/CommunityToolkit.Mvvm/DependencyInjection/Ioc.cs b/CommunityToolkit.Mvvm/DependencyInjection/Ioc.cs index 4d06673..34eafdd 100644 --- a/CommunityToolkit.Mvvm/DependencyInjection/Ioc.cs +++ b/CommunityToolkit.Mvvm/DependencyInjection/Ioc.cs @@ -5,8 +5,6 @@ using System; using System.Threading; -#nullable enable - namespace CommunityToolkit.Mvvm.DependencyInjection; /// <summary> diff --git a/CommunityToolkit.Mvvm/Input/RelayCommand.cs b/CommunityToolkit.Mvvm/Input/RelayCommand.cs index a02c24f..76a7b60 100644 --- a/CommunityToolkit.Mvvm/Input/RelayCommand.cs +++ b/CommunityToolkit.Mvvm/Input/RelayCommand.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // This file is inspired from the MvvmLight library (lbugnion/MvvmLight), // more info in ThirdPartyNotices.txt in the root of the project. diff --git a/CommunityToolkit.Mvvm/Input/RelayCommand{T}.cs b/CommunityToolkit.Mvvm/Input/RelayCommand{T}.cs index d820726..3e044ad 100644 --- a/CommunityToolkit.Mvvm/Input/RelayCommand{T}.cs +++ b/CommunityToolkit.Mvvm/Input/RelayCommand{T}.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // This file is inspired from the MvvmLight library (lbugnion/MvvmLight), // more info in ThirdPartyNotices.txt in the root of the project. diff --git a/CommunityToolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/DictionarySlim{TKey,TValue}.cs b/CommunityToolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/DictionarySlim{TKey,TValue}.cs index 72710a6..0db49ce 100644 --- a/CommunityToolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/DictionarySlim{TKey,TValue}.cs +++ b/CommunityToolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/DictionarySlim{TKey,TValue}.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // The DictionarySlim<TKey, TValue> type is originally from CoreFX labs, see // the source repository on GitHub at https://github.com/dotnet/corefxlab. diff --git a/CommunityToolkit.Mvvm/Messaging/Messages/PropertyChangedMessage{T}.cs b/CommunityToolkit.Mvvm/Messaging/Messages/PropertyChangedMessage{T}.cs index 2294b86..3bf7880 100644 --- a/CommunityToolkit.Mvvm/Messaging/Messages/PropertyChangedMessage{T}.cs +++ b/CommunityToolkit.Mvvm/Messaging/Messages/PropertyChangedMessage{T}.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable SA1512 - // This file is inspired from the MvvmLight library (lbugnion/MvvmLight), // more info in ThirdPartyNotices.txt in the root of the project. diff --git a/CommunityToolkit.Mvvm/Messaging/WeakReferenceMessenger.cs b/CommunityToolkit.Mvvm/Messaging/WeakReferenceMessenger.cs index ef5d18d..1087130 100644 --- a/CommunityToolkit.Mvvm/Messaging/WeakReferenceMessenger.cs +++ b/CommunityToolkit.Mvvm/Messaging/WeakReferenceMessenger.cs @@ -14,8 +14,6 @@ using RecipientsTable = System.Runtime.CompilerServices.ConditionalWeakTable<object, Microsoft.Collections.Extensions.IDictionarySlim>; #endif -#pragma warning disable SA1204 - namespace CommunityToolkit.Mvvm.Messaging; /// <summary> diff --git a/tests/CommunityToolkit.Diagnostics.UnitTests/Extensions/Test_TypeExtensions.cs b/tests/CommunityToolkit.Diagnostics.UnitTests/Extensions/Test_TypeExtensions.cs index 8923454..09e25e0 100644 --- a/tests/CommunityToolkit.Diagnostics.UnitTests/Extensions/Test_TypeExtensions.cs +++ b/tests/CommunityToolkit.Diagnostics.UnitTests/Extensions/Test_TypeExtensions.cs @@ -72,7 +72,6 @@ public void Test_TypeExtensions_NestedTypes(string name, Type type) Assert.AreEqual(name, type.ToTypeString()); } -#pragma warning disable SA1015 // Closing generic brackets should be spaced correctly [TestCategory("TypeExtensions")] [TestMethod] [DataRow("void*", typeof(void*))] @@ -88,7 +87,6 @@ public void Test_TypeExtensions_PointerTypes(string name, Type type) { Assert.AreEqual(name, type.ToTypeString()); } -#pragma warning restore SA1015 [TestCategory("TypeExtensions")] [TestMethod] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_ArrayPoolBufferWriter{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_ArrayPoolBufferWriter{T}.cs index 05df117..da56be3 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_ArrayPoolBufferWriter{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_ArrayPoolBufferWriter{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Reflection; @@ -15,7 +14,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Buffers; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_ArrayPoolBufferWriterOfT { [TestCategory("ArrayPoolBufferWriterOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryBufferWriter{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryBufferWriter{T}.cs index a53f980..1393944 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryBufferWriter{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryBufferWriter{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Linq; using CommunityToolkit.HighPerformance.Buffers; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -11,7 +10,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Buffers; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_MemoryBufferWriterOfT { [TestCategory("MemoryBufferWriterOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs index ccc9193..981fb61 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Linq; using CommunityToolkit.HighPerformance.Buffers; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -12,7 +11,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Buffers; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_MemoryOwnerOfT { [TestCategory("MemoryOwnerOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_SpanOwner{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_SpanOwner{T}.cs index 1618330..77a679d 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_SpanOwner{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_SpanOwner{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Linq; using CommunityToolkit.HighPerformance.Buffers; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -12,7 +11,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Buffers; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_SpanOwnerOfT { [TestCategory("SpanOwnerOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_StringPool.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_StringPool.cs index 7c17798..e65ad90 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_StringPool.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_StringPool.cs @@ -10,8 +10,6 @@ using CommunityToolkit.HighPerformance.Buffers; using Microsoft.VisualStudio.TestTools.UnitTesting; -#nullable enable - namespace CommunityToolkit.HighPerformance.UnitTests.Buffers; [TestClass] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_ReadOnlyRefEnumerable{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_ReadOnlyRefEnumerable{T}.cs index 2a4b672..be309af 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_ReadOnlyRefEnumerable{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_ReadOnlyRefEnumerable{T}.cs @@ -5,7 +5,6 @@ #if !WINDOWS_UWP using System; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using CommunityToolkit.HighPerformance.Enumerables; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -13,7 +12,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Enumerables; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_ReadOnlyRefEnumerable { [TestCategory("ReadOnlyRefEnumerable")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_RefEnumerable{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_RefEnumerable{T}.cs index b542623..b9fe0fc 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_RefEnumerable{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_RefEnumerable{T}.cs @@ -5,7 +5,6 @@ #if !WINDOWS_UWP using System; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using CommunityToolkit.HighPerformance.Enumerables; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -13,7 +12,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Enumerables; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_RefEnumerable { [TestCategory("RefEnumerable")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs index 3306dff..1e9526d 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs @@ -153,7 +153,7 @@ public void Test_MemoryExtensions_FromArray_CastFromByteAndBack() // Here we get the array from the final memory and check that it does exist and // the associated parameters match the ones we'd expect here (same length, offset of 0). - Assert.IsTrue(MemoryMarshal.TryGetArray<byte>(memoryBack, out ArraySegment<byte> segment)); + Assert.IsTrue(MemoryMarshal.TryGetArray(memoryBack, out ArraySegment<byte> segment)); Assert.AreSame(segment.Array!, data); Assert.AreEqual(segment.Offset, 0); Assert.AreEqual(segment.Count, data.Length); @@ -261,7 +261,7 @@ public void Test_MemoryExtensions_FromArray_CastFromByteAndBack_WithSlice() Assert.AreEqual(memoryOfBytes.Length, memoryBack.Length); // Here we now also have to validate the starting offset from the extracted array - Assert.IsTrue(MemoryMarshal.TryGetArray<byte>(memoryBack, out ArraySegment<byte> segment)); + Assert.IsTrue(MemoryMarshal.TryGetArray(memoryBack, out ArraySegment<byte> segment)); Assert.AreSame(segment.Array!, data); Assert.AreEqual(segment.Offset, 128); Assert.AreEqual(segment.Count, 128); diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.Count.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.Count.cs index 761fa29..18c599f 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.Count.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.Count.cs @@ -3,14 +3,11 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; using CommunityToolkit.HighPerformance; -using Microsoft.VisualStudio.TestTools.UnitTesting; using CommunityToolkit.HighPerformance.UnitTests.Buffers.Internals; - -#nullable enable +using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.HighPerformance.UnitTests.Extensions; @@ -41,7 +38,6 @@ public void Test_ReadOnlySpanExtensions_RandomCount16() [TestCategory("ReadOnlySpanExtensions")] [TestMethod] - [SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1139", Justification = "Easier to tell types apart at a glance")] public void Test_ReadOnlySpanExtensions_RandomCount32() { TestForType((int)37438941, CreateRandomData); @@ -51,7 +47,6 @@ public void Test_ReadOnlySpanExtensions_RandomCount32() [TestCategory("ReadOnlySpanExtensions")] [TestMethod] - [SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1139", Justification = "Easier to tell types apart at a glance")] public void Test_ReadOnlySpanExtensions_RandomCount64() { TestForType((long)47128480128401, CreateRandomData); @@ -149,7 +144,6 @@ public void Test_ReadOnlySpanExtensions_FilledCount16() [TestCategory("ReadOnlySpanExtensions")] [TestMethod] - [SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1139", Justification = "Easier to tell types apart at a glance")] public void Test_ReadOnlySpanExtensions_FilledCount32() { TestForType((int)37438941, (count, _) => CreateFilledData(count, (int)37438941)); @@ -158,7 +152,6 @@ public void Test_ReadOnlySpanExtensions_FilledCount32() [TestCategory("ReadOnlySpanExtensions")] [TestMethod] - [SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1139", Justification = "Easier to tell types apart at a glance")] public void Test_ReadOnlySpanExtensions_FilledCount64() { TestForType((long)47128480128401, (count, _) => CreateFilledData(count, (long)47128480128401)); diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.cs index b2612ca..4babd8d 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ReadOnlySpanExtensions.cs @@ -196,7 +196,7 @@ public void Test_ReadOnlySpanExtensions_Enumerate() int i = 0; - foreach (CommunityToolkit.HighPerformance.Enumerables.ReadOnlySpanEnumerable<int>.Item item in data.Enumerate()) + foreach (HighPerformance.Enumerables.ReadOnlySpanEnumerable<int>.Item item in data.Enumerate()) { Assert.IsTrue(Unsafe.AreSame(ref Unsafe.AsRef(data[i]), ref Unsafe.AsRef(item.Value))); Assert.AreEqual(i, item.Index); @@ -211,7 +211,7 @@ public void Test_ReadOnlySpanExtensions_Enumerate_Empty() { ReadOnlySpan<int> data = Array.Empty<int>(); - foreach (CommunityToolkit.HighPerformance.Enumerables.ReadOnlySpanEnumerable<int>.Item item in data.Enumerate()) + foreach (HighPerformance.Enumerables.ReadOnlySpanEnumerable<int>.Item item in data.Enumerate()) { Assert.Fail("Empty source sequence"); } diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpanExtensions.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpanExtensions.cs index 3d1b123..168d765 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpanExtensions.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpanExtensions.cs @@ -148,7 +148,7 @@ public void Test_SpanExtensions_Enumerate() int i = 0; - foreach (CommunityToolkit.HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.Enumerate()) + foreach (HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.Enumerate()) { Assert.IsTrue(Unsafe.AreSame(ref data[i], ref item.Value)); Assert.AreEqual(i, item.Index); @@ -163,7 +163,7 @@ public void Test_SpanExtensions_Enumerate_Empty() { Span<int> data = Array.Empty<int>(); - foreach (CommunityToolkit.HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.Enumerate()) + foreach (HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.Enumerate()) { Assert.Fail("Empty source sequence"); } diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpinLockExtensions.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpinLockExtensions.cs index 6f646d3..af6eda7 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpinLockExtensions.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_SpinLockExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -66,7 +65,6 @@ public void Test_ArrayExtensions_Ref() /// </summary> private sealed class SpinLockOwner { - [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401", Justification = "Quick ref access for tests")] public SpinLock Lock; } } diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_HashCode{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_HashCode{T}.cs index a8ce626..16bbe3c 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_HashCode{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_HashCode{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; using CommunityToolkit.HighPerformance.Helpers; @@ -13,7 +12,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests.Helpers; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_HashCodeOfT { /// <summary> diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_ParallelHelper.For.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_ParallelHelper.For.cs index 092a810..ac6ace3 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_ParallelHelper.For.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_ParallelHelper.For.cs @@ -29,7 +29,7 @@ public unsafe void Test_ParallelHelper_ForWithIndices() ParallelHelper.For(0, data.Length, new Assigner(data.Length, data.Ptr)); - foreach (CommunityToolkit.HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.GetSpan().Enumerate()) + foreach (HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.GetSpan().Enumerate()) { if (item.Index != item.Value) { @@ -68,7 +68,7 @@ public unsafe void Test_ParallelHelper_ForWithRanges() ParallelHelper.For(..data.Length, new Assigner(data.Length, data.Ptr)); - foreach (CommunityToolkit.HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.GetSpan().Enumerate()) + foreach (HighPerformance.Enumerables.SpanEnumerable<int>.Item item in data.GetSpan().Enumerate()) { if (item.Index != item.Value) { diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Memory2D{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Memory2D{T}.cs index 5a63fcb..d7e4ed4 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Memory2D{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Memory2D{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; #if !WINDOWS_UWP using System.Runtime.CompilerServices; #endif @@ -12,7 +11,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_Memory2DT { [TestCategory("Memory2DT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlyMemory2D{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlyMemory2D{T}.cs index 2eb2d6d..2b31897 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlyMemory2D{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlyMemory2D{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; #if !WINDOWS_UWP using System.Runtime.CompilerServices; #endif @@ -19,7 +18,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests; * or some checks being done upon construction. See comments in the test * file for Memory2D<T> for more info on these tests. */ [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_ReadOnlyMemory2DT { [TestCategory("ReadOnlyMemory2DT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlySpan2D{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlySpan2D{T}.cs index cb0355d..5d23922 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlySpan2D{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_ReadOnlySpan2D{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using CommunityToolkit.HighPerformance.Enumerables; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -16,7 +15,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests; * All the tests here mirror the ones for ReadOnlySpan2D<T>. See comments * in the test file for Span2D<T> for more info on these tests. */ [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_ReadOnlySpan2DT { [TestCategory("ReadOnlySpan2DT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs index 5041433..97c4e23 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.CompilerServices; using CommunityToolkit.HighPerformance.Enumerables; @@ -12,7 +11,6 @@ namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_Span2DT { [TestCategory("Span2DT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_IBufferWriterStream.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_IBufferWriterStream.cs index 3f69e30..caaa3c2 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_IBufferWriterStream.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_IBufferWriterStream.cs @@ -104,7 +104,7 @@ public void Test_IBufferWriterStream_WriteByte() ReadOnlySpan<byte> data = stackalloc byte[] { 1, 128, 255, 32 }; - foreach (CommunityToolkit.HighPerformance.Enumerables.ReadOnlySpanEnumerable<byte>.Item item in data.Enumerate()) + foreach (HighPerformance.Enumerables.ReadOnlySpanEnumerable<byte>.Item item in data.Enumerate()) { // Since we're enumerating, we can also double check the current written count // at each iteration, to ensure the writes are done correctly every time. diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_MemoryStream.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_MemoryStream.cs index 274beba..af994d6 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_MemoryStream.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_MemoryStream.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.IO; using System.Runtime.InteropServices; @@ -182,14 +181,13 @@ public async Task Test_MemoryStream_ReadWriteAsync_Array() [TestCategory("MemoryStream")] [TestMethod] - [SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1500", Justification = "Array initialization")] public void Test_MemoryStream_ReadWriteByte() { Stream stream = new byte[4].AsMemory().AsStream(); ReadOnlySpan<byte> data = stackalloc byte[] { 1, 128, 255, 32 }; - foreach (CommunityToolkit.HighPerformance.Enumerables.ReadOnlySpanEnumerable<byte>.Item item in data.Enumerate()) + foreach (HighPerformance.Enumerables.ReadOnlySpanEnumerable<byte>.Item item in data.Enumerate()) { Assert.AreEqual(stream.Position, item.Index); diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Box{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Box{T}.cs index a800cbc..6af17f8 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Box{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Box{T}.cs @@ -3,13 +3,11 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_BoxOfT { [TestCategory("BoxOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableReadOnlyRef{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableReadOnlyRef{T}.cs index 5bc0ea3..5f31661 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableReadOnlyRef{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableReadOnlyRef{T}.cs @@ -5,14 +5,12 @@ #if NETCOREAPP3_1 || NET5_0 using System; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_NullableReadOnlyRefOfT { [TestCategory("NullableReadOnlyRefOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableRef{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableRef{T}.cs index b02cec3..1a6351a 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableRef{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableRef{T}.cs @@ -5,14 +5,12 @@ #if NETCOREAPP3_1 || NET5_0 using System; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_NullableRefOfT { [TestCategory("NullableRefOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_ReadOnlyRef{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_ReadOnlyRef{T}.cs index a29df15..3d48211 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_ReadOnlyRef{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_ReadOnlyRef{T}.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_ReadOnlyRefOfT { [TestCategory("ReadOnlyRefOfT")] diff --git a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Ref{T}.cs b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Ref{T}.cs index 33f6603..0c590ea 100644 --- a/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Ref{T}.cs +++ b/tests/CommunityToolkit.HighPerformance.UnitTests/Test_Ref{T}.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.HighPerformance.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Test class for generic type")] public class Test_RefOfT { [TestCategory("RefOfT")] diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_AsyncRelayCommand{T}.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_AsyncRelayCommand{T}.cs index cd927df..1751074 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_AsyncRelayCommand{T}.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_AsyncRelayCommand{T}.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Input; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -11,7 +10,6 @@ namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Generic type")] public class Test_AsyncRelayCommandOfT { [TestCategory("Mvvm")] diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs index 4d5bd02..75004c4 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs @@ -2,17 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Input; using Microsoft.VisualStudio.TestTools.UnitTesting; -#pragma warning disable SA1124 - namespace CommunityToolkit.Mvvm.UnitTests; -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601", Justification = "Type only used for testing")] [TestClass] public partial class Test_ICommandAttribute { diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_INotifyPropertyChangedAttribute.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_INotifyPropertyChangedAttribute.cs index 987e546..e6b2709 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_INotifyPropertyChangedAttribute.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_INotifyPropertyChangedAttribute.cs @@ -4,14 +4,12 @@ using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; using System.Reflection; using CommunityToolkit.Mvvm.ComponentModel; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.Mvvm.UnitTests; -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601", Justification = "Type only used for testing")] [TestClass] public partial class Test_INotifyPropertyChangedAttribute { diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_IRecipientGenerator.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_IRecipientGenerator.cs index 5283942..80d2e63 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_IRecipientGenerator.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_IRecipientGenerator.cs @@ -2,16 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable CS0618 - using System; -using System.Diagnostics.CodeAnalysis; using CommunityToolkit.Mvvm.Messaging; using Microsoft.VisualStudio.TestTools.UnitTesting; +#pragma warning disable CS0618 + namespace CommunityToolkit.Mvvm.UnitTests; -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601", Justification = "Type only used for testing")] [TestClass] public partial class Test_IRecipientGenerator { @@ -25,7 +23,7 @@ public void Test_IRecipientGenerator_GeneratedRegistration() MessageA? messageA = new(); MessageB? messageB = new(); - Action<IMessenger, object, int> registrator = CommunityToolkit.Mvvm.Messaging.__Internals.__IMessengerExtensions.CreateAllMessagesRegistratorWithToken<int>(recipient); + Action<IMessenger, object, int> registrator = Messaging.__Internals.__IMessengerExtensions.CreateAllMessagesRegistratorWithToken<int>(recipient); registrator(messenger, recipient, 42); diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableObjectAttribute.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableObjectAttribute.cs index 8de3d74..306ceac 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableObjectAttribute.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableObjectAttribute.cs @@ -3,13 +3,11 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; using CommunityToolkit.Mvvm.ComponentModel; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.Mvvm.UnitTests; -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601", Justification = "Type only used for testing")] [TestClass] public partial class Test_ObservableObjectAttribute { diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservablePropertyAttribute.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservablePropertyAttribute.cs index 6b3d1dd..fe72182 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservablePropertyAttribute.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservablePropertyAttribute.cs @@ -6,19 +6,13 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using CommunityToolkit.Mvvm.ComponentModel; using Microsoft.VisualStudio.TestTools.UnitTesting; -#pragma warning disable SA1124, SA1307, SA1401 - -#nullable enable - namespace CommunityToolkit.Mvvm.UnitTests; -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601", Justification = "Type only used for testing")] [TestClass] public partial class Test_ObservablePropertyAttribute { diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableRecipientAttribute.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableRecipientAttribute.cs index bdb7edb..6964595 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableRecipientAttribute.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservableRecipientAttribute.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using CommunityToolkit.Mvvm.ComponentModel; @@ -14,7 +13,6 @@ namespace CommunityToolkit.Mvvm.UnitTests; -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601", Justification = "Type only used for testing")] [TestClass] public partial class Test_ObservableRecipientAttribute { diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Test_RelayCommand{T}.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Test_RelayCommand{T}.cs index 05e706f..313fe5a 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Test_RelayCommand{T}.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Test_RelayCommand{T}.cs @@ -3,14 +3,12 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using CommunityToolkit.Mvvm.Input; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649", Justification = "Generic type")] public class Test_RelayCommandOfT { [TestCategory("Mvvm")]