1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2025-08-02 14:59:02 +02:00

Fixing some typos.

This commit is contained in:
Daniel Banda 2022-05-03 21:21:10 -07:00
parent f003c4fc6f
commit f2dce06b4d
24 changed files with 33 additions and 33 deletions

View File

@ -68,7 +68,7 @@ static string FormatDisplayString(Type type, int genericTypeOffset, ReadOnlySpan
}
// By checking generic types here we are only interested in specific cases,
// ie. nullable value types or value typles. We have a separate path for custom
// ie. nullable value types or value tuples. We have a separate path for custom
// generic types, as we can't rely on this API in that case, as it doesn't show
// a difference between nested types that are themselves generic, or nested simple
// types from a generic declaring type. To deal with that, we need to manually track

View File

@ -286,7 +286,7 @@ public static T ThrowCOMException<T>(string? message, Exception? innerException)
/// </summary>
/// <typeparam name="T">The type of expected result.</typeparam>
/// <param name="message">The argument name.</param>
/// <param name="error">The HRESULT of the errror to include.</param>
/// <param name="error">The HRESULT of the error to include.</param>
/// <exception cref="COMException">Thrown with the specified parameters.</exception>
/// <returns>This method always throws, so it actually never returns a value.</returns>
[DoesNotReturn]
@ -339,7 +339,7 @@ public static T ThrowExternalException<T>(string? message, Exception? innerExcep
/// </summary>
/// <typeparam name="T">The type of expected result.</typeparam>
/// <param name="message">The argument name.</param>
/// <param name="error">The HRESULT of the errror to include.</param>
/// <param name="error">The HRESULT of the error to include.</param>
/// <exception cref="ExternalException">Thrown with the specified parameters.</exception>
/// <returns>This method always throws, so it actually never returns a value.</returns>
[DoesNotReturn]

View File

@ -213,7 +213,7 @@ public static void ThrowArgumentOutOfRangeException(string? name, object? value,
/// <summary>
/// Throws a new <see cref="COMException"/>.
/// </summary>
/// <exception cref="COMException">Thrown with no paarameters.</exception>
/// <exception cref="COMException">Thrown with no parameters.</exception>
[DoesNotReturn]
public static void ThrowCOMException()
{
@ -247,7 +247,7 @@ public static void ThrowCOMException(string? message, Exception? innerException)
/// Throws a new <see cref="COMException"/>.
/// </summary>
/// <param name="message">The argument name.</param>
/// <param name="error">The HRESULT of the errror to include.</param>
/// <param name="error">The HRESULT of the error to include.</param>
/// <exception cref="COMException">Thrown with the specified parameters.</exception>
[DoesNotReturn]
public static void ThrowCOMException(string? message, int error)
@ -292,7 +292,7 @@ public static void ThrowExternalException(string? message, Exception? innerExcep
/// Throws a new <see cref="ExternalException"/>.
/// </summary>
/// <param name="message">The argument name.</param>
/// <param name="error">The HRESULT of the errror to include.</param>
/// <param name="error">The HRESULT of the error to include.</param>
/// <exception cref="ExternalException">Thrown with the specified parameters.</exception>
[DoesNotReturn]
public static void ThrowExternalException(string? message, int error)

View File

@ -727,7 +727,7 @@ public Memory2D<T> Slice(int row, int column, int height, int width)
/// is disposed, enabling taking and using the memory's address.
/// </summary>
/// <exception cref="ArgumentException">
/// An instance with nonprimitive (non-blittable) members cannot be pinned.
/// An instance with non-primitive (non-blittable) members cannot be pinned.
/// </exception>
/// <returns>A <see cref="MemoryHandle"/> instance wrapping the pinned handle.</returns>
public unsafe MemoryHandle Pin()

View File

@ -740,7 +740,7 @@ public ReadOnlyMemory2D<T> Slice(int row, int column, int height, int width)
/// is disposed, enabling taking and using the memory's address.
/// </summary>
/// <exception cref="ArgumentException">
/// An instance with nonprimitive (non-blittable) members cannot be pinned.
/// An instance with non-primitive (non-blittable) members cannot be pinned.
/// </exception>
/// <returns>A <see cref="MemoryHandle"/> instance wrapping the pinned handle.</returns>
public unsafe MemoryHandle Pin()

View File

@ -15,7 +15,7 @@ namespace CommunityToolkit.Mvvm.SourceGenerators.ComponentModel.Models;
/// <summary>
/// A model representing a typed constant item.
/// </summary>
/// <remarks>This model is fully serializeable and comparable.</remarks>
/// <remarks>This model is fully serializable and comparable.</remarks>
internal abstract partial record TypedConstantInfo
{
/// <summary>

View File

@ -65,7 +65,7 @@ internal static class Execute
diagnostics = builder.ToImmutable();
// If the generated property would collide, skip generating it entirely. This makes sure that
// users only get the helpful diagnostic about the collsiion, and not the normal compiler error
// users only get the helpful diagnostic about the collision, and not the normal compiler error
// about a definition for "Property" already existing on the target type, which might be confusing.
return null;
}

View File

@ -37,7 +37,7 @@ public static bool InheritsFromFullyQualifiedName(this ITypeSymbol typeSymbol, s
}
/// <summary>
/// Checks whether or not a given <see cref="ITypeSymbol"/> implements an interface with a specied name.
/// Checks whether or not a given <see cref="ITypeSymbol"/> implements an interface with a specified name.
/// </summary>
/// <param name="typeSymbol">The target <see cref="ITypeSymbol"/> instance to check.</param>
/// <param name="name">The full name of the type to check for interface implementation.</param>

View File

@ -58,7 +58,7 @@ internal static class IncrementalValuesProviderExtensions
}
/// <summary>
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a gven pair of comparers.
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a given pair of comparers.
/// </summary>
/// <typeparam name="TLeft">The type of left items in each tuple.</typeparam>
/// <typeparam name="TRight">The type of right items in each tuple.</typeparam>
@ -75,7 +75,7 @@ internal static class IncrementalValuesProviderExtensions
}
/// <summary>
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a gven pair of comparers.
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a given pair of comparers.
/// </summary>
/// <typeparam name="T1">The type of first items in each tuple.</typeparam>
/// <typeparam name="T2">The type of second items in each tuple.</typeparam>

View File

@ -278,7 +278,7 @@ public static int Combine<T1, T2, T3, T4, T5, T6, T7>(T1 value1, T2 value2, T3 v
/// <typeparam name="T5">The type of the fifth value to combine into the hash code.</typeparam>
/// <typeparam name="T6">The type of the sixth value to combine into the hash code.</typeparam>
/// <typeparam name="T7">The type of the seventh value to combine into the hash code.</typeparam>
/// <typeparam name="T8">The type of the eigth value to combine into the hash code.</typeparam>
/// <typeparam name="T8">The type of the eighth value to combine into the hash code.</typeparam>
/// <param name="value1">The first value to combine into the hash code.</param>
/// <param name="value2">The second value to combine into the hash code.</param>
/// <param name="value3">The third value to combine into the hash code.</param>
@ -286,7 +286,7 @@ public static int Combine<T1, T2, T3, T4, T5, T6, T7>(T1 value1, T2 value2, T3 v
/// <param name="value5">The fifth value to combine into the hash code.</param>
/// <param name="value6">The sixth value to combine into the hash code.</param>
/// <param name="value7">The seventh value to combine into the hash code.</param>
/// <param name="value8">The eigth value to combine into the hash code.</param>
/// <param name="value8">The eighth value to combine into the hash code.</param>
/// <returns>The hash code that represents the values.</returns>
public static int Combine<T1, T2, T3, T4, T5, T6, T7, T8>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8)
{

View File

@ -190,7 +190,7 @@ public static ImmutableArray<MemberDeclarationSyntax> GetSyntax(CommandInfo comm
Parameter(Identifier(TriviaList(), SyntaxKind.UnderscoreToken, "_", "_", TriviaList())))
.WithExpressionBody(IdentifierName(commandInfo.CanExecuteMemberName!)),
// Create a method groupd expression, which will become:
// Create a method group expression, which will become:
//
// new <RELAY_COMMAND_TYPE>(<METHOD_EXPRESSION>, <CAN_EXECUTE_METHOD>);
CanExecuteExpressionType.MethodGroup => IdentifierName(commandInfo.CanExecuteMemberName!),

View File

@ -29,7 +29,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
/// To avoid conflicts with other APIs in types where the new members are being generated, constructors are only generated when the annotated
/// type doesn't have any explicit constructors being declared. If that is the case, the same constructors from <see cref="ObservableRecipient"/>
/// are emitted, with the accessibility adapted to that of the annotated type. Otherwise, they are skipped, so the type being annotated has the
/// respondibility of properly initializing the <see cref="ObservableRecipient.Messenger"/> property. Additionally, if the annotated type inherits
/// responsibility of properly initializing the <see cref="ObservableRecipient.Messenger"/> property. Additionally, if the annotated type inherits
/// from <see cref="ObservableValidator"/>, the <see cref="ObservableRecipient.SetProperty{T}(ref T, T, bool, string?)"/> overloads will be skipped
/// as well, as they would conflict with the <see cref="ObservableValidator.SetProperty{T}(ref T, T, bool, string?)"/> methods.
/// </para>

View File

@ -31,7 +31,7 @@ public abstract class ObservableValidator : ObservableObject, INotifyDataErrorIn
/// </summary>
/// <remarks>
/// This is necessary because we want to reuse the same <see cref="ValidationContext"/> instance for all validations, but
/// with the same behavior with repsect to formatted names that new instances would have provided. The issue is that the
/// with the same behavior with respect to formatted names that new instances would have provided. The issue is that the
/// <see cref="ValidationContext.DisplayName"/> property is not refreshed when we set <see cref="ValidationContext.MemberName"/>,
/// so we need to replicate the same logic to retrieve the right display name for properties to validate and update that
/// property manually right before passing the context to <see cref="Validator"/> and proceed with the normal functionality.
@ -44,7 +44,7 @@ public abstract class ObservableValidator : ObservableObject, INotifyDataErrorIn
private static readonly PropertyChangedEventArgs HasErrorsChangedEventArgs = new(nameof(HasErrors));
/// <summary>
/// The <see cref="ValidationContext"/> instance currenty in use.
/// The <see cref="ValidationContext"/> instance currently in use.
/// </summary>
private readonly ValidationContext validationContext;

View File

@ -67,7 +67,7 @@ public Awaiter GetAwaiter()
public readonly struct Awaiter : ICriticalNotifyCompletion
{
/// <summary>
/// The underlying <see cref="TaskAwaiter"/> inistance.
/// The underlying <see cref="TaskAwaiter"/> instance.
/// </summary>
private readonly TaskAwaiter taskAwaiter;

View File

@ -18,7 +18,7 @@ public static class IAsyncRelayCommandExtensions
/// </summary>
/// <param name="command">The input <see cref="IAsyncRelayCommand"/> instance to create a cancellation command for.</param>
/// <returns>An <see cref="ICommand"/> instance that can be used to monitor and signal cancellation for <paramref name="command"/>.</returns>
/// <remarks>The reeturned instance is not guaranteed to be unique across multiple invocations with the same arguments.</remarks>
/// <remarks>The returned instance is not guaranteed to be unique across multiple invocations with the same arguments.</remarks>
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="command"/> is <see langword="null"/>.</exception>
public static ICommand CreateCancelCommand(this IAsyncRelayCommand command)
{

View File

@ -111,7 +111,7 @@ public static void RegisterAll(this IMessenger messenger, object recipient)
}
#pragma warning restore IL2026
// Try to get the cached delegate, if the generatos has run correctly
// Try to get the cached delegate, if the generator has run correctly
Action<IMessenger, object>? registrationAction = DiscoveredRecipients.RegistrationMethods.GetValue(
recipient.GetType(),
static t => LoadRegistrationMethodsForType(t));
@ -200,7 +200,7 @@ where interfaceType.IsGenericType &&
// We want a single compiled LINQ expression that executes the registration for all
// the declared message types in the input type. To do so, we create a block with the
// unrolled invocations for the indivudual message registration (for each IRecipient<T>).
// unrolled invocations for the individual message registration (for each IRecipient<T>).
// The code below will generate the following block expression:
// ===============================================================================
// {

View File

@ -82,7 +82,7 @@ public void Test_MemoryExtensions_FromArray_CastFromByte()
Span<byte> spanOfBytes = memoryOfBytes.Span;
Span<float> spanOfFloats = memoryOfFloats.Span;
// We also need to check that the Span<T> returned from the caast memory
// We also need to check that the Span<T> returned from the cast memory
// actually has the initial reference pointing to the same location as
// the one to the same item in the span from the original memory.
Assert.AreEqual(memoryOfFloats.Length, spanOfFloats.Length);

View File

@ -41,7 +41,7 @@ public void Test_ParallelHelper_ForEach_Ref2D(
Assert.AreEqual(memory.Height, height);
Assert.AreEqual(memory.Width, width);
// Do the same computation in paralellel, then compare the two arrays
// Do the same computation in parallel, then compare the two arrays
ParallelHelper.ForEach(memory, new Multiplier(397));
CollectionAssert.AreEqual(data, copy);

View File

@ -171,7 +171,7 @@ public void Test_Memory2DT_Array3DConstructor_2()
// Same as above, but we also slice the target layer in the 3D array. In this case we're creating
// a Memory<int> instance from a slice in the layer at depth 1 in our 3D array, and with an area
// starting at coorsinates (0, 1), with a height of 2 and width of 2. So we want to wrap the
// starting at coordinates (0, 1), with a height of 2 and width of 2. So we want to wrap the
// square with items [20, 30, 50, 60] in the second layer of the 3D array above.
Memory2D<int> memory2d = new(array, 1, 0, 1, 2, 2);
@ -475,7 +475,7 @@ public void Test_Memory2DT_Equals()
[TestMethod]
public void Test_Memory2DT_GetHashCode()
{
// An emoty Memory2D<T> has just 0 as the hashcode
// An empty Memory2D<T> has just 0 as the hashcode
Assert.AreEqual(Memory2D<int>.Empty.GetHashCode(), 0);
int[,] array =

View File

@ -355,7 +355,7 @@ public void Test_Span2DT_CopyTo_Empty()
int[] target = new int[0];
// Copying an emoty Span2D<T> to an empty array is just a no-op
// Copying an empty Span2D<T> to an empty array is just a no-op
span2d.CopyTo(target);
}

View File

@ -19,7 +19,7 @@ public void Test_IBufferWriterStream_Lifecycle()
{
ArrayPoolBufferWriter<byte> writer = new();
// Get a stream from a buffer writer aand validate that it can only be written to.
// Get a stream from a buffer writer and validate that it can only be written to.
// This is to mirror the same functionality as the IBufferWriter<T> interface.
Stream stream = ((IBufferWriter<byte>)writer).AsStream();

View File

@ -221,7 +221,7 @@ public void Receive(MessageB message)
}
// We also add the ICloneable interface to test that the message
// interfaces are all handled correctly even when inteleaved
// interfaces are all handled correctly even when interleaved
// by other unrelated interfaces in the type declaration.
public object Clone() => throw new NotImplementedException();
}

View File

@ -1024,7 +1024,7 @@ public void Receive(MessageB message)
}
// We also add the ICloneable interface to test that the message
// interfaces are all handled correctly even when inteleaved
// interfaces are all handled correctly even when interleaved
// by other unrelated interfaces in the type declaration.
public object Clone() => throw new NotImplementedException();
}

View File

@ -354,10 +354,10 @@ public void Test_OnPropertyChangingAndChangedPartialMethodWithAdditionalValidati
// The actual validation is performed inside the model itself.
// This test validates that the order with which methods/events are generated is:
// - On<PROPERTY_NAME>Changing(value);
// - OnProperyChanging();
// - OnPropertyChanging();
// - field = value;
// - On<PROPERTY_NAME>Changed(value);
// - OnProperyChanged();
// - OnPropertyChanged();
model.Name = "B";
Assert.AreEqual("B", model.Name);