Skip to content

Commit 9390867

Browse files
authored
Merge pull request #974 from realybin/typo
Fix minor typos in comments.
2 parents 766a0ba + 6e528f0 commit 9390867

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/CommunityToolkit.HighPerformance/Buffers/StringPool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void FindFactors(int size, int factor, out uint x, out uint y)
8585
// that we consider acceptable, and pick the best results produced.
8686
// The ratio between maps influences the number of objects being allocated,
8787
// as well as the multithreading performance when locking on maps.
88-
// We still want to contraint this number to avoid situations where we
88+
// We still want to constraint this number to avoid situations where we
8989
// have a way too high number of maps compared to total size.
9090
FindFactors(minimumSize, 2, out uint x2, out uint y2);
9191
FindFactors(minimumSize, 3, out uint x3, out uint y3);
@@ -113,7 +113,7 @@ static void FindFactors(int size, int factor, out uint x, out uint y)
113113

114114
// We preallocate the maps in advance, since each bucket only contains the
115115
// array field, which is not preinitialized, so the allocations are minimal.
116-
// This lets us lock on each individual maps when retrieving a string instance.
116+
// This lets us lock on each individual map when retrieving a string instance.
117117
foreach (ref FixedSizePriorityMap map in span)
118118
{
119119
map = new FixedSizePriorityMap((int)y2);

src/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.Execute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static CompilationUnitSyntax GetSyntax(ValidationInfo validationInfo)
181181
// full runtime type safety (as a safe cast is used to validate the input argument), and with less reflection needed.
182182
// Note that we're deliberately creating a new delegate instance here and not using code that could see the C# compiler
183183
// create a static class to cache a reusable delegate, because each generated method will only be called at most once,
184-
// as the returned delegate will be cached by the MVVM Toolkit itself. So this ensures the the produced code is minimal,
184+
// as the returned delegate will be cached by the MVVM Toolkit itself. So this ensures the produced code is minimal,
185185
// and that there will be no unnecessary static fields and objects being created and possibly never collected.
186186
// This code will produce a syntax tree as follows:
187187
//

src/CommunityToolkit.Mvvm/ComponentModel/Attributes/INotifyPropertyChangedAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class INotifyPropertyChangedAttribute : Attribute
2828
{
2929
/// <summary>
3030
/// Gets or sets a value indicating whether or not to also generate all the additional helper methods that are found
31-
/// in <see cref="ObservableObject"/> as well (eg. <see cref="ObservableObject.SetProperty{T}(ref T, T, string?)"/>.
31+
/// in <see cref="ObservableObject"/> as well (eg. <see cref="ObservableObject.SetProperty{T}(ref T, T, string?)"/>).
3232
/// If set to <see langword="false"/>, only the <see cref="INotifyPropertyChanged.PropertyChanged"/> event and
3333
/// the two <see cref="ObservableObject.OnPropertyChanged(PropertyChangedEventArgs)"/> overloads will be generated.
3434
/// The default value is <see langword="true"/>.

src/CommunityToolkit.Mvvm/Messaging/IMessenger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace CommunityToolkit.Mvvm.Messaging;
1515
/// <code>
1616
/// public sealed class LoginCompletedMessage { }
1717
/// </code>
18-
/// Then, register your a recipient for this message:
18+
/// Then, register a recipient for this message:
1919
/// <code>
2020
/// Messenger.Default.Register&lt;MyRecipientType, LoginCompletedMessage&gt;(this, (r, m) =>
2121
/// {

src/CommunityToolkit.Mvvm/Messaging/IMessengerExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public static TMessage Send<TMessage>(this IMessenger messenger, TMessage messag
435435
/// <typeparam name="TToken">The type of token to identify what channel to use to send the message.</typeparam>
436436
/// <param name="messenger">The <see cref="IMessenger"/> instance to use to send the message.</param>
437437
/// <param name="token">The token indicating what channel to use.</param>
438-
/// <returns>The message that has been sen.</returns>
438+
/// <returns>The message that has been sent.</returns>
439439
/// <remarks>
440440
/// This method will automatically create a new <typeparamref name="TMessage"/> instance
441441
/// just like <see cref="Send{TMessage}(IMessenger)"/>, and then send it to the right recipients.

src/CommunityToolkit.Mvvm/Messaging/Internals/System/Collections.Generic/Dictionary2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public bool MoveNext()
298298
while ((uint)this.index < (uint)this.count)
299299
{
300300
// We need to preemptively increment the current index so that we still correctly keep track
301-
// of the current position in the dictionary even if the users doesn't access any of the
301+
// of the current position in the dictionary even if the users don't access any of the
302302
// available properties in the enumerator. As this is a possibility, we can't rely on one of
303303
// them to increment the index before MoveNext is invoked again. We ditch the standard enumerator
304304
// API surface here to expose the Key/Value properties directly and minimize the memory copies.

0 commit comments

Comments
 (0)