Skip to content

Commit f2dce06

Browse files
committed
Fixing some typos.
1 parent f003c4f commit f2dce06

File tree

24 files changed

+33
-33
lines changed

24 files changed

+33
-33
lines changed

CommunityToolkit.Diagnostics/Extensions/TypeExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static string FormatDisplayString(Type type, int genericTypeOffset, ReadOnlySpan
6868
}
6969

7070
// By checking generic types here we are only interested in specific cases,
71-
// ie. nullable value types or value typles. We have a separate path for custom
71+
// ie. nullable value types or value tuples. We have a separate path for custom
7272
// generic types, as we can't rely on this API in that case, as it doesn't show
7373
// a difference between nested types that are themselves generic, or nested simple
7474
// types from a generic declaring type. To deal with that, we need to manually track

CommunityToolkit.Diagnostics/ThrowHelper.Generic.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public static T ThrowCOMException<T>(string? message, Exception? innerException)
286286
/// </summary>
287287
/// <typeparam name="T">The type of expected result.</typeparam>
288288
/// <param name="message">The argument name.</param>
289-
/// <param name="error">The HRESULT of the errror to include.</param>
289+
/// <param name="error">The HRESULT of the error to include.</param>
290290
/// <exception cref="COMException">Thrown with the specified parameters.</exception>
291291
/// <returns>This method always throws, so it actually never returns a value.</returns>
292292
[DoesNotReturn]
@@ -339,7 +339,7 @@ public static T ThrowExternalException<T>(string? message, Exception? innerExcep
339339
/// </summary>
340340
/// <typeparam name="T">The type of expected result.</typeparam>
341341
/// <param name="message">The argument name.</param>
342-
/// <param name="error">The HRESULT of the errror to include.</param>
342+
/// <param name="error">The HRESULT of the error to include.</param>
343343
/// <exception cref="ExternalException">Thrown with the specified parameters.</exception>
344344
/// <returns>This method always throws, so it actually never returns a value.</returns>
345345
[DoesNotReturn]

CommunityToolkit.Diagnostics/ThrowHelper.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public static void ThrowArgumentOutOfRangeException(string? name, object? value,
213213
/// <summary>
214214
/// Throws a new <see cref="COMException"/>.
215215
/// </summary>
216-
/// <exception cref="COMException">Thrown with no paarameters.</exception>
216+
/// <exception cref="COMException">Thrown with no parameters.</exception>
217217
[DoesNotReturn]
218218
public static void ThrowCOMException()
219219
{
@@ -247,7 +247,7 @@ public static void ThrowCOMException(string? message, Exception? innerException)
247247
/// Throws a new <see cref="COMException"/>.
248248
/// </summary>
249249
/// <param name="message">The argument name.</param>
250-
/// <param name="error">The HRESULT of the errror to include.</param>
250+
/// <param name="error">The HRESULT of the error to include.</param>
251251
/// <exception cref="COMException">Thrown with the specified parameters.</exception>
252252
[DoesNotReturn]
253253
public static void ThrowCOMException(string? message, int error)
@@ -292,7 +292,7 @@ public static void ThrowExternalException(string? message, Exception? innerExcep
292292
/// Throws a new <see cref="ExternalException"/>.
293293
/// </summary>
294294
/// <param name="message">The argument name.</param>
295-
/// <param name="error">The HRESULT of the errror to include.</param>
295+
/// <param name="error">The HRESULT of the error to include.</param>
296296
/// <exception cref="ExternalException">Thrown with the specified parameters.</exception>
297297
[DoesNotReturn]
298298
public static void ThrowExternalException(string? message, int error)

CommunityToolkit.HighPerformance/Memory/Memory2D{T}.cs

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

CommunityToolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs

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

CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/Models/TypedConstantInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace CommunityToolkit.Mvvm.SourceGenerators.ComponentModel.Models;
1515
/// <summary>
1616
/// A model representing a typed constant item.
1717
/// </summary>
18-
/// <remarks>This model is fully serializeable and comparable.</remarks>
18+
/// <remarks>This model is fully serializable and comparable.</remarks>
1919
internal abstract partial record TypedConstantInfo
2020
{
2121
/// <summary>

CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservablePropertyGenerator.Execute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ internal static class Execute
6565
diagnostics = builder.ToImmutable();
6666

6767
// If the generated property would collide, skip generating it entirely. This makes sure that
68-
// users only get the helpful diagnostic about the collsiion, and not the normal compiler error
68+
// users only get the helpful diagnostic about the collision, and not the normal compiler error
6969
// about a definition for "Property" already existing on the target type, which might be confusing.
7070
return null;
7171
}

CommunityToolkit.Mvvm.SourceGenerators/Extensions/ITypeSymbolExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static bool InheritsFromFullyQualifiedName(this ITypeSymbol typeSymbol, s
3737
}
3838

3939
/// <summary>
40-
/// Checks whether or not a given <see cref="ITypeSymbol"/> implements an interface with a specied name.
40+
/// Checks whether or not a given <see cref="ITypeSymbol"/> implements an interface with a specified name.
4141
/// </summary>
4242
/// <param name="typeSymbol">The target <see cref="ITypeSymbol"/> instance to check.</param>
4343
/// <param name="name">The full name of the type to check for interface implementation.</param>

CommunityToolkit.Mvvm.SourceGenerators/Extensions/IncrementalValuesProviderExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ internal static class IncrementalValuesProviderExtensions
5858
}
5959

6060
/// <summary>
61-
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a gven pair of comparers.
61+
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a given pair of comparers.
6262
/// </summary>
6363
/// <typeparam name="TLeft">The type of left items in each tuple.</typeparam>
6464
/// <typeparam name="TRight">The type of right items in each tuple.</typeparam>
@@ -75,7 +75,7 @@ internal static class IncrementalValuesProviderExtensions
7575
}
7676

7777
/// <summary>
78-
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a gven pair of comparers.
78+
/// Creates a new <see cref="IncrementalValuesProvider{TValues}"/> instance with a given pair of comparers.
7979
/// </summary>
8080
/// <typeparam name="T1">The type of first items in each tuple.</typeparam>
8181
/// <typeparam name="T2">The type of second items in each tuple.</typeparam>

CommunityToolkit.Mvvm.SourceGenerators/Helpers/HashCode.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,15 @@ public static int Combine<T1, T2, T3, T4, T5, T6, T7>(T1 value1, T2 value2, T3 v
278278
/// <typeparam name="T5">The type of the fifth value to combine into the hash code.</typeparam>
279279
/// <typeparam name="T6">The type of the sixth value to combine into the hash code.</typeparam>
280280
/// <typeparam name="T7">The type of the seventh value to combine into the hash code.</typeparam>
281-
/// <typeparam name="T8">The type of the eigth value to combine into the hash code.</typeparam>
281+
/// <typeparam name="T8">The type of the eighth value to combine into the hash code.</typeparam>
282282
/// <param name="value1">The first value to combine into the hash code.</param>
283283
/// <param name="value2">The second value to combine into the hash code.</param>
284284
/// <param name="value3">The third value to combine into the hash code.</param>
285285
/// <param name="value4">The fourth value to combine into the hash code.</param>
286286
/// <param name="value5">The fifth value to combine into the hash code.</param>
287287
/// <param name="value6">The sixth value to combine into the hash code.</param>
288288
/// <param name="value7">The seventh value to combine into the hash code.</param>
289-
/// <param name="value8">The eigth value to combine into the hash code.</param>
289+
/// <param name="value8">The eighth value to combine into the hash code.</param>
290290
/// <returns>The hash code that represents the values.</returns>
291291
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)
292292
{

CommunityToolkit.Mvvm.SourceGenerators/Input/ICommandGenerator.Execute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public static ImmutableArray<MemberDeclarationSyntax> GetSyntax(CommandInfo comm
190190
Parameter(Identifier(TriviaList(), SyntaxKind.UnderscoreToken, "_", "_", TriviaList())))
191191
.WithExpressionBody(IdentifierName(commandInfo.CanExecuteMemberName!)),
192192

193-
// Create a method groupd expression, which will become:
193+
// Create a method group expression, which will become:
194194
//
195195
// new <RELAY_COMMAND_TYPE>(<METHOD_EXPRESSION>, <CAN_EXECUTE_METHOD>);
196196
CanExecuteExpressionType.MethodGroup => IdentifierName(commandInfo.CanExecuteMemberName!),

CommunityToolkit.Mvvm/ComponentModel/Attributes/ObservableRecipientAttribute.cs

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

CommunityToolkit.Mvvm/ComponentModel/ObservableValidator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public abstract class ObservableValidator : ObservableObject, INotifyDataErrorIn
3131
/// </summary>
3232
/// <remarks>
3333
/// This is necessary because we want to reuse the same <see cref="ValidationContext"/> instance for all validations, but
34-
/// with the same behavior with repsect to formatted names that new instances would have provided. The issue is that the
34+
/// with the same behavior with respect to formatted names that new instances would have provided. The issue is that the
3535
/// <see cref="ValidationContext.DisplayName"/> property is not refreshed when we set <see cref="ValidationContext.MemberName"/>,
3636
/// so we need to replicate the same logic to retrieve the right display name for properties to validate and update that
3737
/// 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
4444
private static readonly PropertyChangedEventArgs HasErrorsChangedEventArgs = new(nameof(HasErrors));
4545

4646
/// <summary>
47-
/// The <see cref="ValidationContext"/> instance currenty in use.
47+
/// The <see cref="ValidationContext"/> instance currently in use.
4848
/// </summary>
4949
private readonly ValidationContext validationContext;
5050

CommunityToolkit.Mvvm/ComponentModel/__Internals/__TaskExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public Awaiter GetAwaiter()
6767
public readonly struct Awaiter : ICriticalNotifyCompletion
6868
{
6969
/// <summary>
70-
/// The underlying <see cref="TaskAwaiter"/> inistance.
70+
/// The underlying <see cref="TaskAwaiter"/> instance.
7171
/// </summary>
7272
private readonly TaskAwaiter taskAwaiter;
7373

CommunityToolkit.Mvvm/Input/IAsyncRelayCommandExtensions.cs

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

CommunityToolkit.Mvvm/Messaging/IMessengerExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static void RegisterAll(this IMessenger messenger, object recipient)
111111
}
112112
#pragma warning restore IL2026
113113

114-
// Try to get the cached delegate, if the generatos has run correctly
114+
// Try to get the cached delegate, if the generator has run correctly
115115
Action<IMessenger, object>? registrationAction = DiscoveredRecipients.RegistrationMethods.GetValue(
116116
recipient.GetType(),
117117
static t => LoadRegistrationMethodsForType(t));
@@ -200,7 +200,7 @@ where interfaceType.IsGenericType &&
200200

201201
// We want a single compiled LINQ expression that executes the registration for all
202202
// the declared message types in the input type. To do so, we create a block with the
203-
// unrolled invocations for the indivudual message registration (for each IRecipient<T>).
203+
// unrolled invocations for the individual message registration (for each IRecipient<T>).
204204
// The code below will generate the following block expression:
205205
// ===============================================================================
206206
// {

tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void Test_MemoryExtensions_FromArray_CastFromByte()
8282
Span<byte> spanOfBytes = memoryOfBytes.Span;
8383
Span<float> spanOfFloats = memoryOfFloats.Span;
8484

85-
// We also need to check that the Span<T> returned from the caast memory
85+
// We also need to check that the Span<T> returned from the cast memory
8686
// actually has the initial reference pointing to the same location as
8787
// the one to the same item in the span from the original memory.
8888
Assert.AreEqual(memoryOfFloats.Length, spanOfFloats.Length);

tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_ParallelHelper.ForEach.Ref2D.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void Test_ParallelHelper_ForEach_Ref2D(
4141
Assert.AreEqual(memory.Height, height);
4242
Assert.AreEqual(memory.Width, width);
4343

44-
// Do the same computation in paralellel, then compare the two arrays
44+
// Do the same computation in parallel, then compare the two arrays
4545
ParallelHelper.ForEach(memory, new Multiplier(397));
4646

4747
CollectionAssert.AreEqual(data, copy);

tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Memory2D{T}.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void Test_Memory2DT_Array3DConstructor_2()
171171

172172
// Same as above, but we also slice the target layer in the 3D array. In this case we're creating
173173
// a Memory<int> instance from a slice in the layer at depth 1 in our 3D array, and with an area
174-
// starting at coorsinates (0, 1), with a height of 2 and width of 2. So we want to wrap the
174+
// starting at coordinates (0, 1), with a height of 2 and width of 2. So we want to wrap the
175175
// square with items [20, 30, 50, 60] in the second layer of the 3D array above.
176176
Memory2D<int> memory2d = new(array, 1, 0, 1, 2, 2);
177177

@@ -475,7 +475,7 @@ public void Test_Memory2DT_Equals()
475475
[TestMethod]
476476
public void Test_Memory2DT_GetHashCode()
477477
{
478-
// An emoty Memory2D<T> has just 0 as the hashcode
478+
// An empty Memory2D<T> has just 0 as the hashcode
479479
Assert.AreEqual(Memory2D<int>.Empty.GetHashCode(), 0);
480480

481481
int[,] array =

tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public void Test_Span2DT_CopyTo_Empty()
355355

356356
int[] target = new int[0];
357357

358-
// Copying an emoty Span2D<T> to an empty array is just a no-op
358+
// Copying an empty Span2D<T> to an empty array is just a no-op
359359
span2d.CopyTo(target);
360360
}
361361

tests/CommunityToolkit.HighPerformance.UnitTests/Streams/Test_IBufferWriterStream.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void Test_IBufferWriterStream_Lifecycle()
1919
{
2020
ArrayPoolBufferWriter<byte> writer = new();
2121

22-
// Get a stream from a buffer writer aand validate that it can only be written to.
22+
// Get a stream from a buffer writer and validate that it can only be written to.
2323
// This is to mirror the same functionality as the IBufferWriter<T> interface.
2424
Stream stream = ((IBufferWriter<byte>)writer).AsStream();
2525

tests/CommunityToolkit.Mvvm.Internals.UnitTests/Test_Messenger.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public void Receive(MessageB message)
221221
}
222222

223223
// We also add the ICloneable interface to test that the message
224-
// interfaces are all handled correctly even when inteleaved
224+
// interfaces are all handled correctly even when interleaved
225225
// by other unrelated interfaces in the type declaration.
226226
public object Clone() => throw new NotImplementedException();
227227
}

tests/CommunityToolkit.Mvvm.UnitTests/Test_Messenger.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ public void Receive(MessageB message)
10241024
}
10251025

10261026
// We also add the ICloneable interface to test that the message
1027-
// interfaces are all handled correctly even when inteleaved
1027+
// interfaces are all handled correctly even when interleaved
10281028
// by other unrelated interfaces in the type declaration.
10291029
public object Clone() => throw new NotImplementedException();
10301030
}

tests/CommunityToolkit.Mvvm.UnitTests/Test_ObservablePropertyAttribute.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ public void Test_OnPropertyChangingAndChangedPartialMethodWithAdditionalValidati
354354
// The actual validation is performed inside the model itself.
355355
// This test validates that the order with which methods/events are generated is:
356356
// - On<PROPERTY_NAME>Changing(value);
357-
// - OnProperyChanging();
357+
// - OnPropertyChanging();
358358
// - field = value;
359359
// - On<PROPERTY_NAME>Changed(value);
360-
// - OnProperyChanged();
360+
// - OnPropertyChanged();
361361
model.Name = "B";
362362

363363
Assert.AreEqual("B", model.Name);

0 commit comments

Comments
 (0)