Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit 9cc6808

Browse files
Merge pull request #31 from SixLabors/upgrade-stylecop
Upgrade stylecop
2 parents 290d48e + 451c74f commit 9cc6808

32 files changed

Lines changed: 204 additions & 198 deletions

src/SixLabors.Core/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace SixLabors
55
{
66
/// <summary>
7-
/// Common constants used throughout the project
7+
/// Common constants used throughout the project.
88
/// </summary>
99
internal static class Constants
1010
{

src/SixLabors.Core/HashCode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4444

4545
#if SUPPORTS_HASHCODE
4646
using System.Runtime.CompilerServices;
47+
4748
[assembly: TypeForwardedTo(typeof(System.HashCode))]
4849
#else
4950
using System.Buffers.Binary;

src/SixLabors.Core/Helpers/DebugGuard.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ internal static class DebugGuard
1818
/// </summary>
1919
/// <param name="target">The target object, which cannot be null.</param>
2020
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
21-
/// <exception cref="ArgumentNullException"><paramref name="target"/> is null</exception>
22-
/// <typeparam name="T">The type of the object to verify</typeparam>
21+
/// <exception cref="ArgumentNullException"><paramref name="target"/> is null.</exception>
22+
/// <typeparam name="T">The type of the object to verify.</typeparam>
2323
[Conditional("DEBUG")]
2424
public static void NotNull<T>(T target, string parameterName)
2525
where T : class
@@ -119,12 +119,12 @@ public static void MustBeGreaterThanOrEqualTo<TValue>(TValue value, TValue min,
119119
/// <summary>
120120
/// Verifies, that the `target` array has declared the length or longer.
121121
/// </summary>
122-
/// <typeparam name="T">The element type of the spans</typeparam>
122+
/// <typeparam name="T">The element type of the spans.</typeparam>
123123
/// <param name="target">The target array.</param>
124124
/// <param name="minLength">The min length the array must have.</param>
125125
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
126126
/// <exception cref="ArgumentException">
127-
/// <paramref name="target"/> is true
127+
/// <paramref name="target"/> is true.
128128
/// </exception>
129129
[Conditional("DEBUG")]
130130
public static void MustBeSizedAtLeast<T>(T[] target, int minLength, string parameterName)

src/SixLabors.Core/Helpers/Guard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static void MustBeBetweenOrEqualTo<TValue>(TValue value, TValue min, TVal
118118
/// <summary>
119119
/// Verifies, that the `target` span has the length of 'minLength', or longer.
120120
/// </summary>
121-
/// <typeparam name="T">The element type of the spans</typeparam>
121+
/// <typeparam name="T">The element type of the spans.</typeparam>
122122
/// <param name="value">The target span.</param>
123123
/// <param name="minLength">The minimum length.</param>
124124
/// <param name="parameterName">The name of the parameter that is to be checked.</param>

src/SixLabors.Core/MathF.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public static float Sin(float f)
219219
/// <paramref name="f" /> parameter Return value Zero or positive The positive square root of <paramref name="f" />.
220220
/// Negative <see cref="F:System.Single.NaN" />Equals <see cref="F:System.Single.NaN" />
221221
/// <see cref="F:System.Single.NaN" />Equals <see cref="F:System.Single.PositiveInfinity" />
222-
/// <see cref="F:System.Single.PositiveInfinity" />
222+
/// <see cref="F:System.Single.PositiveInfinity" />.
223223
/// </returns>
224224
[MethodImpl(MethodImplOptions.AggressiveInlining)]
225225
public static float Sqrt(float f)

src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.Buffer{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace SixLabors.Memory
1010
{
1111
/// <summary>
12-
/// Contains <see cref="Buffer{T}"/> and <see cref="ManagedByteBuffer"/>
12+
/// Contains <see cref="Buffer{T}"/> and <see cref="ManagedByteBuffer"/>.
1313
/// </summary>
1414
public partial class ArrayPoolMemoryAllocator
1515
{
@@ -20,7 +20,7 @@ private class Buffer<T> : ManagedBufferBase<T>
2020
where T : struct
2121
{
2222
/// <summary>
23-
/// The length of the buffer
23+
/// The length of the buffer.
2424
/// </summary>
2525
private readonly int length;
2626

src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public partial class ArrayPoolMemoryAllocator
3232
/// <summary>
3333
/// This is the default. Should be good for most use cases.
3434
/// </summary>
35-
/// <returns>The memory manager</returns>
35+
/// <returns>The memory manager.</returns>
3636
public static ArrayPoolMemoryAllocator CreateDefault()
3737
{
3838
return new ArrayPoolMemoryAllocator(
@@ -45,7 +45,7 @@ public static ArrayPoolMemoryAllocator CreateDefault()
4545
/// <summary>
4646
/// For environments with very limited memory capabilities, only small buffers like image rows are pooled.
4747
/// </summary>
48-
/// <returns>The memory manager</returns>
48+
/// <returns>The memory manager.</returns>
4949
public static ArrayPoolMemoryAllocator CreateWithMinimalPooling()
5050
{
5151
return new ArrayPoolMemoryAllocator(64 * 1024, 32 * 1024, 8, 24);
@@ -54,7 +54,7 @@ public static ArrayPoolMemoryAllocator CreateWithMinimalPooling()
5454
/// <summary>
5555
/// For environments with limited memory capabilities, only small array requests are pooled, which can result in reduced throughput.
5656
/// </summary>
57-
/// <returns>The memory manager</returns>
57+
/// <returns>The memory manager.</returns>
5858
public static ArrayPoolMemoryAllocator CreateWithModeratePooling()
5959
{
6060
return new ArrayPoolMemoryAllocator(1024 * 1024, 32 * 1024, 16, 24);
@@ -63,7 +63,7 @@ public static ArrayPoolMemoryAllocator CreateWithModeratePooling()
6363
/// <summary>
6464
/// For environments where memory capabilities are not an issue, the maximum amount of array requests are pooled which results in optimal throughput.
6565
/// </summary>
66-
/// <returns>The memory manager</returns>
66+
/// <returns>The memory manager.</returns>
6767
public static ArrayPoolMemoryAllocator CreateWithAggressivePooling()
6868
{
6969
return new ArrayPoolMemoryAllocator(128 * 1024 * 1024, 32 * 1024 * 1024, 16, 32);

src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public ArrayPoolMemoryAllocator(int maxPoolSizeInBytes, int poolSelectorThreshol
5858
/// </summary>
5959
/// <param name="maxPoolSizeInBytes">The maximum size of pooled arrays. Arrays over the thershold are gonna be always allocated.</param>
6060
/// <param name="poolSelectorThresholdInBytes">The threshold to pool arrays in <see cref="largeArrayPool"/> which has less buckets for memory safety.</param>
61-
/// <param name="maxArraysPerBucketLargePool">Max arrays per bucket for the large array pool</param>
62-
/// <param name="maxArraysPerBucketNormalPool">Max arrays per bucket for the normal array pool</param>
61+
/// <param name="maxArraysPerBucketLargePool">Max arrays per bucket for the large array pool.</param>
62+
/// <param name="maxArraysPerBucketNormalPool">Max arrays per bucket for the normal array pool.</param>
6363
public ArrayPoolMemoryAllocator(int maxPoolSizeInBytes, int poolSelectorThresholdInBytes, int maxArraysPerBucketLargePool, int maxArraysPerBucketNormalPool)
6464
{
6565
Guard.MustBeGreaterThan(maxPoolSizeInBytes, 0, nameof(maxPoolSizeInBytes));

src/SixLabors.Core/Memory/Internals/BasicArrayBuffer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ internal class BasicArrayBuffer<T> : ManagedBufferBase<T>
1414
where T : struct
1515
{
1616
/// <summary>
17-
/// Initializes a new instance of the <see cref="BasicArrayBuffer{T}"/> class
17+
/// Initializes a new instance of the <see cref="BasicArrayBuffer{T}"/> class.
1818
/// </summary>
19-
/// <param name="array">The array</param>
20-
/// <param name="length">The length of the buffer</param>
19+
/// <param name="array">The array.</param>
20+
/// <param name="length">The length of the buffer.</param>
2121
public BasicArrayBuffer(T[] array, int length)
2222
{
2323
DebugGuard.MustBeLessThanOrEqualTo(length, array.Length, nameof(length));
@@ -26,21 +26,21 @@ public BasicArrayBuffer(T[] array, int length)
2626
}
2727

2828
/// <summary>
29-
/// Initializes a new instance of the <see cref="BasicArrayBuffer{T}"/> class
29+
/// Initializes a new instance of the <see cref="BasicArrayBuffer{T}"/> class.
3030
/// </summary>
31-
/// <param name="array">The array</param>
31+
/// <param name="array">The array.</param>
3232
public BasicArrayBuffer(T[] array)
3333
: this(array, array.Length)
3434
{
3535
}
3636

3737
/// <summary>
38-
/// Gets the array
38+
/// Gets the array.
3939
/// </summary>
4040
public T[] Array { get; }
4141

4242
/// <summary>
43-
/// Gets the length
43+
/// Gets the length.
4444
/// </summary>
4545
public int Length { get; }
4646

src/SixLabors.Core/Memory/Internals/BasicByteBuffer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ namespace SixLabors.Memory.Internals
99
internal sealed class BasicByteBuffer : BasicArrayBuffer<byte>, IManagedByteBuffer
1010
{
1111
/// <summary>
12-
/// Initializes a new instance of the <see cref="BasicByteBuffer"/> class
12+
/// Initializes a new instance of the <see cref="BasicByteBuffer"/> class.
1313
/// </summary>
14-
/// <param name="array">The byte array</param>
14+
/// <param name="array">The byte array.</param>
1515
internal BasicByteBuffer(byte[] array)
1616
: base(array)
1717
{

0 commit comments

Comments
 (0)