This commit is contained in:
Jerome Laban 2021-10-25 12:27:13 -04:00
Родитель 360c168596 85bfe0e442
Коммит 8236d715bd
2484 изменённых файлов: 12530 добавлений и 13842 удалений

2
.github/PULL_REQUEST_TEMPLATE.md поставляемый
Просмотреть файл

@ -6,7 +6,7 @@
## Fixes
<!-- Add the relevant issue number after the word "Fixes" mentioned above (for ex: "## Fixes #1234") which will automatically close the issue once the PR is merged. -->
<!-- Add the relevant issue number after the word "Fixes" mentioned above (for ex: `## Fixes #0000`) which will automatically close the issue once the PR is merged. -->
<!-- Add a brief overview here of the feature/bug & fix. -->

4
.gitignore поставляемый
Просмотреть файл

@ -229,6 +229,10 @@ msbuild.binlog
# Generated file from .ttinclude
**/Generated/TypeInfo.g.cs
# Files generated by the VS build
**/Generated Files/**
# TAEF Log output
WexLogFileOutput
*.wtl
*.wtl.trace

Просмотреть файл

@ -4,7 +4,7 @@
using System.ComponentModel;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// An interface for a grouped collection of items.

Просмотреть файл

@ -8,7 +8,7 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// An observable group.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// An observable list of observable groups.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Diagnostics.Contracts;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// The extensions methods to simplify the usage of <see cref="ObservableGroupedCollection{TKey, TValue}"/>.

Просмотреть файл

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// A read-only observable group. It associates a <see cref="Key"/> to a <see cref="ReadOnlyObservableCollection{T}"/>.

Просмотреть файл

@ -9,7 +9,7 @@ using System.Collections.Specialized;
using System.Diagnostics;
using System.Linq;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// A read-only list of groups.

Просмотреть файл

@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.Toolkit
namespace CommunityToolkit.Common
{
/// <summary>
/// Set of helpers to convert between data types and notations.

Просмотреть файл

@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.Toolkit.Deferred
namespace CommunityToolkit.Common.Deferred
{
/// <summary>
/// <see cref="DeferredEventArgs"/> which can also be canceled.

Просмотреть файл

@ -7,7 +7,7 @@ using System.ComponentModel;
#pragma warning disable CA1001
namespace Microsoft.Toolkit.Deferred
namespace CommunityToolkit.Common.Deferred
{
/// <summary>
/// <see cref="EventArgs"/> which can retrieve a <see cref="EventDeferral"/> in order to process data asynchronously before an <see cref="EventHandler"/> completes and returns to the calling control.

Просмотреть файл

@ -9,7 +9,7 @@ using System.Threading.Tasks;
#pragma warning disable CA1063
namespace Microsoft.Toolkit.Deferred
namespace CommunityToolkit.Common.Deferred
{
/// <summary>
/// Deferral handle provided by a <see cref="DeferredEventArgs"/>.

Просмотреть файл

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Microsoft.Toolkit
namespace CommunityToolkit.Common
{
/// <summary>
/// Helpers for working with arrays.

Просмотреть файл

@ -7,7 +7,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.Toolkit.Deferred
namespace CommunityToolkit.Common.Deferred
{
/// <summary>
/// Extensions to <see cref="EventHandler{TEventArgs}"/> for Deferred Events.

Просмотреть файл

@ -5,9 +5,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Toolkit.Helpers;
using CommunityToolkit.Common.Helpers;
namespace Microsoft.Toolkit.Extensions
namespace CommunityToolkit.Common.Extensions
{
/// <summary>
/// Helpers methods for working with <see cref="ISettingsStorageHelper{TKey}"/> implementations.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Globalization;
using System.Net;
using System.Text.RegularExpressions;
namespace Microsoft.Toolkit
namespace CommunityToolkit.Common
{
/// <summary>
/// Helpers for working with strings and string representations.

Просмотреть файл

@ -7,7 +7,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace Microsoft.Toolkit
namespace CommunityToolkit.Common
{
/// <summary>
/// Helpers for working with tasks.

Просмотреть файл

@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.Toolkit.Helpers
namespace CommunityToolkit.Common.Helpers
{
/// <summary>
/// Represents the types of items available in a directory.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.Toolkit.Helpers
namespace CommunityToolkit.Common.Helpers
{
/// <summary>
/// Service interface used to store data in a directory/file-system via files and folders.

Просмотреть файл

@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.Toolkit.Helpers
namespace CommunityToolkit.Common.Helpers
{
/// <summary>
/// A basic serialization service.

Просмотреть файл

@ -4,7 +4,7 @@
using System.Collections.Generic;
namespace Microsoft.Toolkit.Helpers
namespace CommunityToolkit.Common.Helpers
{
/// <summary>
/// Service interface used to store data using key value pairs.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Reflection;
namespace Microsoft.Toolkit.Helpers
namespace CommunityToolkit.Common.Helpers
{
/// <summary>
/// A bare-bones serializer which knows how to deal with primitive types and strings only.

Просмотреть файл

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.Toolkit.Collections
namespace CommunityToolkit.Common.Collections
{
/// <summary>
/// This interface represents a data source whose items can be loaded incrementally.

Просмотреть файл

@ -11,7 +11,7 @@ using System.Reflection;
#endif
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helpers for working with types.

Просмотреть файл

@ -7,7 +7,7 @@ using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helpers for working with value types.

Просмотреть файл

@ -9,7 +9,7 @@ using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -8,7 +8,7 @@
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -9,7 +9,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.IO;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Runtime.CompilerServices;
#pragma warning disable CS8777
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.
@ -37,7 +37,8 @@ namespace Microsoft.Toolkit.Diagnostics
/// </summary>
/// <param name="text">The input <see cref="string"/> instance to test.</param>
/// <param name="name">The name of the input parameter being tested.</param>
/// <exception cref="ArgumentException">Thrown if <paramref name="text"/> is <see langword="null"/> or empty.</exception>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="text"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException">Thrown if <paramref name="text"/> is empty.</exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void IsNotNullOrEmpty([NotNull] string? text, string name)
{
@ -91,7 +92,8 @@ namespace Microsoft.Toolkit.Diagnostics
/// </summary>
/// <param name="text">The input <see cref="string"/> instance to test.</param>
/// <param name="name">The name of the input parameter being tested.</param>
/// <exception cref="ArgumentException">Thrown if <paramref name="text"/> is <see langword="null"/> or whitespace.</exception>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="text"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException">Thrown if <paramref name="text"/> is whitespace.</exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void IsNotNullOrWhiteSpace([NotNull] string? text, string name)
{

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -4,8 +4,9 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.
@ -27,12 +28,23 @@ namespace Microsoft.Toolkit.Diagnostics
}
/// <summary>
/// Throws an <see cref="ArgumentException"/> when <see cref="Guard.IsNotNullOrEmpty"/> fails.
/// Throws an <see cref="ArgumentNullException"/> or <see cref="ArgumentException"/> when <see cref="Guard.IsNotNullOrEmpty"/> fails.
/// </summary>
[DoesNotReturn]
public static void ThrowArgumentExceptionForIsNotNullOrEmpty(string? text, string name)
{
throw new ArgumentException($"Parameter {AssertString(name)} (string) must not be null or empty, was {(text is null ? "null" : "empty")}", name);
[MethodImpl(MethodImplOptions.NoInlining)]
static Exception GetException(string? text, string name)
{
if (text is null)
{
return new ArgumentNullException(name, $"Parameter {AssertString(name)} (string) must not be null or empty, was null");
}
return new ArgumentException($"Parameter {AssertString(name)} (string) must not be null or empty, was empty", name);
}
throw GetException(text, name);
}
/// <summary>
@ -50,7 +62,18 @@ namespace Microsoft.Toolkit.Diagnostics
[DoesNotReturn]
public static void ThrowArgumentExceptionForIsNotNullOrWhiteSpace(string? text, string name)
{
throw new ArgumentException($"Parameter {AssertString(name)} (string) must not be null or whitespace, was {(text is null ? "null" : "whitespace")}", name);
[MethodImpl(MethodImplOptions.NoInlining)]
static Exception GetException(string? text, string name)
{
if (text is null)
{
return new ArgumentNullException(name, $"Parameter {AssertString(name)} (string) must not be null or whitespace, was null");
}
return new ArgumentException($"Parameter {AssertString(name)} (string) must not be null or whitespace, was whitespace", name);
}
throw GetException(text, name);
}
/// <summary>

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to verify conditions when running code.

Просмотреть файл

@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
#endif
using System.Threading;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to efficiently throw exceptions.

Просмотреть файл

@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
#endif
using System.Threading;
namespace Microsoft.Toolkit.Diagnostics
namespace CommunityToolkit.Diagnostics
{
/// <summary>
/// Helper methods to efficiently throw exceptions.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// A <see langword="class"/> that represents a boxed <typeparamref name="T"/> value on the managed heap.
@ -61,7 +61,7 @@ namespace Microsoft.Toolkit.HighPerformance
/// <exception cref="InvalidOperationException">Always thrown when this constructor is used (eg. from reflection).</exception>
private Box()
{
throw new InvalidOperationException("The Microsoft.Toolkit.HighPerformance.Box<T> constructor should never be used");
throw new InvalidOperationException("The CommunityToolkit.HighPerformance.Box<T> constructor should never be used");
}
/// <summary>

Просмотреть файл

@ -8,10 +8,10 @@ using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Views;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Buffers.Views;
using CommunityToolkit.HighPerformance.Helpers.Internals;
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// Represents a heap-based, array-backed output sink into which <typeparamref name="T"/> data can be written.
@ -327,7 +327,7 @@ namespace Microsoft.Toolkit.HighPerformance.Buffers
}
// Same representation used in Span<T>
return $"Microsoft.Toolkit.HighPerformance.Buffers.ArrayPoolBufferWriter<{typeof(T)}>[{this.index}]";
return $"CommunityToolkit.HighPerformance.Buffers.ArrayPoolBufferWriter<{typeof(T)}>[{this.index}]";
}
/// <summary>

Просмотреть файл

@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// An <see langword="enum"/> that indicates a mode to use when allocating buffers.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Buffers;
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// An interface that expands <see cref="IBufferWriter{T}"/> with the ability to also inspect

Просмотреть файл

@ -6,10 +6,10 @@ using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals.Interfaces;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using CommunityToolkit.HighPerformance.Buffers.Internals.Interfaces;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
namespace Microsoft.Toolkit.HighPerformance.Buffers.Internals
namespace CommunityToolkit.HighPerformance.Buffers.Internals
{
/// <summary>
/// A custom <see cref="MemoryManager{T}"/> that casts data from a <typeparamref name="TFrom"/> array, to <typeparamref name="TTo"/> values.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Buffers;
namespace Microsoft.Toolkit.HighPerformance.Buffers.Internals.Interfaces
namespace CommunityToolkit.HighPerformance.Buffers.Internals.Interfaces
{
/// <summary>
/// An interface for a <see cref="MemoryManager{T}"/> instance that can reinterpret its underlying data.

Просмотреть файл

@ -6,10 +6,10 @@ using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals.Interfaces;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using CommunityToolkit.HighPerformance.Buffers.Internals.Interfaces;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
namespace Microsoft.Toolkit.HighPerformance.Buffers.Internals
namespace CommunityToolkit.HighPerformance.Buffers.Internals
{
/// <summary>
/// A custom <see cref="MemoryManager{T}"/> that casts data from a <see cref="MemoryManager{T}"/> of <typeparamref name="TFrom"/>, to <typeparamref name="TTo"/> values.

Просмотреть файл

@ -8,9 +8,9 @@ using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Helpers;
using CommunityToolkit.HighPerformance.Helpers;
namespace Microsoft.Toolkit.HighPerformance.Buffers.Internals
namespace CommunityToolkit.HighPerformance.Buffers.Internals
{
/// <summary>
/// A custom <see cref="MemoryManager{T}"/> that can wrap arbitrary <see cref="object"/> instances.

Просмотреть файл

@ -6,10 +6,10 @@ using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals.Interfaces;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using CommunityToolkit.HighPerformance.Buffers.Internals.Interfaces;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
namespace Microsoft.Toolkit.HighPerformance.Buffers.Internals
namespace CommunityToolkit.HighPerformance.Buffers.Internals
{
/// <summary>
/// A custom <see cref="MemoryManager{T}"/> that casts data from a <see cref="string"/> to <typeparamref name="TTo"/> values.

Просмотреть файл

@ -7,9 +7,9 @@ using System.Buffers;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Views;
using CommunityToolkit.HighPerformance.Buffers.Views;
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// Represents an output sink into which <typeparamref name="T"/> data can be written, backed by a <see cref="Memory{T}"/> instance.
@ -154,7 +154,7 @@ namespace Microsoft.Toolkit.HighPerformance.Buffers
}
// Same representation used in Span<T>
return $"Microsoft.Toolkit.HighPerformance.Buffers.MemoryBufferWriter<{typeof(T)}>[{this.index}]";
return $"CommunityToolkit.HighPerformance.Buffers.MemoryBufferWriter<{typeof(T)}>[{this.index}]";
}
/// <summary>

Просмотреть файл

@ -10,9 +10,9 @@ using System.Runtime.CompilerServices;
#if NETCORE_RUNTIME || NET5_0
using System.Runtime.InteropServices;
#endif
using Microsoft.Toolkit.HighPerformance.Buffers.Views;
using CommunityToolkit.HighPerformance.Buffers.Views;
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// An <see cref="IMemoryOwner{T}"/> implementation with an embedded length and a fast <see cref="Span{T}"/> accessor.
@ -325,7 +325,7 @@ namespace Microsoft.Toolkit.HighPerformance.Buffers
}
// Same representation used in Span<T>
return $"Microsoft.Toolkit.HighPerformance.Buffers.MemoryOwner<{typeof(T)}>[{this.length}]";
return $"CommunityToolkit.HighPerformance.Buffers.MemoryOwner<{typeof(T)}>[{this.length}]";
}
/// <summary>

Просмотреть файл

@ -10,9 +10,9 @@ using System.Runtime.CompilerServices;
#if NETCORE_RUNTIME || NET5_0
using System.Runtime.InteropServices;
#endif
using Microsoft.Toolkit.HighPerformance.Buffers.Views;
using CommunityToolkit.HighPerformance.Buffers.Views;
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// A stack-only type with the ability to rent a buffer of a specified length and getting a <see cref="Span{T}"/> from it.
@ -205,7 +205,7 @@ namespace Microsoft.Toolkit.HighPerformance.Buffers
}
// Same representation used in Span<T>
return $"Microsoft.Toolkit.HighPerformance.Buffers.SpanOwner<{typeof(T)}>[{this.length}]";
return $"CommunityToolkit.HighPerformance.Buffers.SpanOwner<{typeof(T)}>[{this.length}]";
}
}
}

Просмотреть файл

@ -8,13 +8,13 @@ using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Text;
#if !NETSTANDARD1_4
using Microsoft.Toolkit.HighPerformance.Helpers;
using CommunityToolkit.HighPerformance.Helpers;
#endif
using BitOperations = Microsoft.Toolkit.HighPerformance.Helpers.Internals.BitOperations;
using BitOperations = CommunityToolkit.HighPerformance.Helpers.Internals.BitOperations;
#nullable enable
namespace Microsoft.Toolkit.HighPerformance.Buffers
namespace CommunityToolkit.HighPerformance.Buffers
{
/// <summary>
/// A configurable pool for <see cref="string"/> instances. This can be used to minimize allocations

Просмотреть файл

@ -4,7 +4,7 @@
using System.Diagnostics;
namespace Microsoft.Toolkit.HighPerformance.Buffers.Views
namespace CommunityToolkit.HighPerformance.Buffers.Views
{
/// <summary>
/// A debug proxy used to display items in a 1D layout.

Просмотреть файл

@ -8,13 +8,13 @@ using System.Runtime.CompilerServices;
#if SPAN_RUNTIME_SUPPORT
using System.Runtime.InteropServices;
#endif
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using Microsoft.Toolkit.HighPerformance.Memory.Internals;
using CommunityToolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Memory.Internals;
#if !SPAN_RUNTIME_SUPPORT
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
#endif
namespace Microsoft.Toolkit.HighPerformance.Enumerables
namespace CommunityToolkit.HighPerformance.Enumerables
{
/// <summary>
/// A <see langword="ref"/> <see langword="struct"/> that iterates readonly items from arbitrary memory locations.

Просмотреть файл

@ -9,7 +9,7 @@ using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Microsoft.Toolkit.HighPerformance.Enumerables
namespace CommunityToolkit.HighPerformance.Enumerables
{
/// <summary>
/// A <see langword="ref"/> <see langword="struct"/> that enumerates the items in a given <see cref="ReadOnlySpan{T}"/> instance.

Просмотреть файл

@ -8,7 +8,7 @@ using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.HighPerformance.Enumerables
namespace CommunityToolkit.HighPerformance.Enumerables
{
/// <summary>
/// A <see langword="ref"/> <see langword="struct"/> that tokenizes a given <see cref="ReadOnlySpan{T}"/> instance.
@ -77,13 +77,13 @@ namespace Microsoft.Toolkit.HighPerformance.Enumerables
this.start = newEnd;
// We need to call this extension explicitly or the extension method resolution rules for the C# compiler
// will end up picking Microsoft.Toolkit.HighPerformance.ReadOnlySpanExtensions.IndexOf instead, even
// will end up picking CommunityToolkit.HighPerformance.ReadOnlySpanExtensions.IndexOf instead, even
// though the latter takes the parameter via a readonly reference. This is because the "in" modifier is
// implicit, which makes the signature compatible, and because extension methods are matched in such a
// way that methods "closest" to where they're used are preferred. Since this type shares the same root
// namespace, this makes that extension a better match, so that it overrides the MemoryExtensions one.
// This is not a problem for consumers of this package, as their code would be outside of the
// Microsoft.Toolkit.HighPerformance namespace, so both extensions would be "equally distant", so that
// CommunityToolkit.HighPerformance namespace, so both extensions would be "equally distant", so that
// when they're both in scope it will be possible to choose which one to use by adding an explicit "in".
int index = System.MemoryExtensions.IndexOf(this.span.Slice(newEnd), this.separator);

Просмотреть файл

@ -8,13 +8,13 @@ using System.Runtime.CompilerServices;
#if SPAN_RUNTIME_SUPPORT
using System.Runtime.InteropServices;
#endif
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using Microsoft.Toolkit.HighPerformance.Memory.Internals;
using CommunityToolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Memory.Internals;
#if !SPAN_RUNTIME_SUPPORT
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
#endif
namespace Microsoft.Toolkit.HighPerformance.Enumerables
namespace CommunityToolkit.HighPerformance.Enumerables
{
/// <summary>
/// A <see langword="ref"/> <see langword="struct"/> that iterates items from arbitrary memory locations.

Просмотреть файл

@ -9,7 +9,7 @@ using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Microsoft.Toolkit.HighPerformance.Enumerables
namespace CommunityToolkit.HighPerformance.Enumerables
{
/// <summary>
/// A <see langword="ref"/> <see langword="struct"/> that enumerates the items in a given <see cref="Span{T}"/> instance.

Просмотреть файл

@ -8,7 +8,7 @@ using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.HighPerformance.Enumerables
namespace CommunityToolkit.HighPerformance.Enumerables
{
/// <summary>
/// A <see langword="ref"/> <see langword="struct"/> that tokenizes a given <see cref="Span{T}"/> instance.

Просмотреть файл

@ -8,14 +8,14 @@ using System.Runtime.CompilerServices;
#if NETCORE_RUNTIME || NET5_0
using System.Runtime.InteropServices;
#endif
using Microsoft.Toolkit.HighPerformance.Enumerables;
using CommunityToolkit.HighPerformance.Enumerables;
#if !NETCORE_RUNTIME && !NET5_0
using Microsoft.Toolkit.HighPerformance.Helpers;
using CommunityToolkit.HighPerformance.Helpers;
#endif
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using CommunityToolkit.HighPerformance.Helpers.Internals;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="Array"/> type.

Просмотреть файл

@ -7,14 +7,14 @@ using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
#if SPAN_RUNTIME_SUPPORT
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals;
using CommunityToolkit.HighPerformance.Buffers.Internals;
#endif
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using CommunityToolkit.HighPerformance.Enumerables;
using CommunityToolkit.HighPerformance.Helpers;
using CommunityToolkit.HighPerformance.Helpers.Internals;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="Array"/> type.

Просмотреть файл

@ -5,15 +5,15 @@
using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using Microsoft.Toolkit.HighPerformance.Helpers;
using CommunityToolkit.HighPerformance.Helpers;
#if SPAN_RUNTIME_SUPPORT
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals;
using CommunityToolkit.HighPerformance.Buffers.Internals;
#endif
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using CommunityToolkit.HighPerformance.Helpers.Internals;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="Array"/> type.

Просмотреть файл

@ -5,10 +5,10 @@
using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.CompilerServices;
using Microsoft.Toolkit.HighPerformance.Buffers;
using Microsoft.Toolkit.HighPerformance.Streams;
using CommunityToolkit.HighPerformance.Buffers;
using CommunityToolkit.HighPerformance.Streams;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="ArrayPoolBufferWriter{T}"/> type.

Просмотреть файл

@ -5,7 +5,7 @@
using System;
using System.Buffers;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="ArrayPool{T}"/> type.

Просмотреть файл

@ -6,7 +6,7 @@ using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="bool"/> type.

Просмотреть файл

@ -6,9 +6,9 @@
using System;
using System.Runtime.CompilerServices;
using Microsoft.Toolkit.HighPerformance.Helpers;
using CommunityToolkit.HighPerformance.Helpers;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="HashCode"/> type.

Просмотреть файл

@ -8,10 +8,10 @@ using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers;
using Microsoft.Toolkit.HighPerformance.Streams;
using CommunityToolkit.HighPerformance.Buffers;
using CommunityToolkit.HighPerformance.Streams;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="IBufferWriter{T}"/> type.

Просмотреть файл

@ -7,9 +7,9 @@ using System.Buffers;
using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.CompilerServices;
using MemoryStream = Microsoft.Toolkit.HighPerformance.Streams.MemoryStream;
using MemoryStream = CommunityToolkit.HighPerformance.Streams.MemoryStream;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="IMemoryOwner{T}"/> type.

Просмотреть файл

@ -10,7 +10,7 @@ using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="List{T}"/> type.

Просмотреть файл

@ -7,9 +7,9 @@ using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using MemoryStream = Microsoft.Toolkit.HighPerformance.Streams.MemoryStream;
using MemoryStream = CommunityToolkit.HighPerformance.Streams.MemoryStream;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="Memory{T}"/> type.

Просмотреть файл

@ -11,7 +11,7 @@
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.Toolkit.HighPerformance.Extensions
namespace CommunityToolkit.HighPerformance.Extensions
{
/// <summary>
/// Helpers for working with the <see cref="Nullable{T}"/> type.

Просмотреть файл

@ -8,11 +8,11 @@ using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals.Interfaces;
using MemoryStream = Microsoft.Toolkit.HighPerformance.Streams.MemoryStream;
using CommunityToolkit.HighPerformance.Buffers.Internals;
using CommunityToolkit.HighPerformance.Buffers.Internals.Interfaces;
using MemoryStream = CommunityToolkit.HighPerformance.Streams.MemoryStream;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="ReadOnlyMemory{T}"/> type.

Просмотреть файл

@ -6,10 +6,10 @@ using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Enumerables;
using CommunityToolkit.HighPerformance.Helpers.Internals;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="ReadOnlySpan{T}"/> type.

Просмотреть файл

@ -6,10 +6,10 @@ using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Enumerables;
using CommunityToolkit.HighPerformance.Helpers.Internals;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="Span{T}"/> type.

Просмотреть файл

@ -6,7 +6,7 @@ using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="SpinLock"/> type.

Просмотреть файл

@ -12,7 +12,7 @@ using System.Threading;
using System.Threading.Tasks;
#endif
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="Stream"/> type.

Просмотреть файл

@ -8,10 +8,10 @@ using System.Runtime.CompilerServices;
#if NETCOREAPP2_1 || NETSTANDARD
using System.Runtime.InteropServices;
#endif
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Enumerables;
using CommunityToolkit.HighPerformance.Helpers.Internals;
namespace Microsoft.Toolkit.HighPerformance
namespace CommunityToolkit.HighPerformance
{
/// <summary>
/// Helpers for working with the <see cref="string"/> type.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics.X86;
#endif
namespace Microsoft.Toolkit.HighPerformance.Helpers
namespace CommunityToolkit.HighPerformance.Helpers
{
/// <summary>
/// Helpers to perform bit operations on numeric types.

Просмотреть файл

@ -8,14 +8,14 @@ using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using CommunityToolkit.HighPerformance.Helpers.Internals;
#if SPAN_RUNTIME_SUPPORT
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
using RuntimeHelpers = CommunityToolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
#endif
namespace Microsoft.Toolkit.HighPerformance.Helpers
namespace CommunityToolkit.HighPerformance.Helpers
{
/// <summary>
/// Combines the hash code of sequences of <typeparamref name="T"/> values into a single hash code.

Просмотреть файл

@ -8,7 +8,7 @@ using System.Runtime.CompilerServices;
using static System.Numerics.BitOperations;
#endif
namespace Microsoft.Toolkit.HighPerformance.Helpers.Internals
namespace CommunityToolkit.HighPerformance.Helpers.Internals
{
/// <summary>
/// Utility methods for intrinsic bit-twiddling operations. The methods use hardware intrinsics

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше