Skip to content

fix some spelling #3406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.HighPerformance/Box{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static Box<T> GetFrom(object obj)
/// <param name="obj">The input <see cref="object"/> instance, representing a boxed <typeparamref name="T"/> value.</param>
/// <returns>A <see cref="Box{T}"/> reference pointing to <paramref name="obj"/>.</returns>
/// <remarks>
/// This method doesn't check the actual type of <paramref name="obj"/>, so it is responsability of the caller
/// This method doesn't check the actual type of <paramref name="obj"/>, so it is responsibility of the caller
/// to ensure it actually represents a boxed <typeparamref name="T"/> value and not some other instance.
/// </remarks>
[Pure]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static ref T DangerousGetReference<T>(this T[,] array)
/// <remarks>
/// This method doesn't do any bounds checks, therefore it is responsibility of the caller to ensure the <paramref name="i"/>
/// and <paramref name="j"/> parameters are valid. Furthermore, this extension will ignore the lower bounds for the input
/// array, and will just assume that the input index is 0-based. It is responsability of the caller to adjust the input
/// array, and will just assume that the input index is 0-based. It is responsibility of the caller to adjust the input
/// indices to account for the actual lower bounds, if the input array has either axis not starting at 0.
/// </remarks>
[Pure]
Expand Down Expand Up @@ -234,7 +234,7 @@ public static Array2DColumnEnumerable<T> GetColumn<T>(this T[,] array, int colum

#if SPAN_RUNTIME_SUPPORT
/// <summary>
/// Cretes a new <see cref="Span{T}"/> over an input 2D <typeparamref name="T"/> array.
/// Creates a new <see cref="Span{T}"/> over an input 2D <typeparamref name="T"/> array.
/// </summary>
/// <typeparam name="T">The type of elements in the input 2D <typeparamref name="T"/> array instance.</typeparam>
/// <param name="array">The input 2D <typeparamref name="T"/> array instance.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static class MemoryExtensions
/// <returns>A <see cref="Stream"/> wrapping the data within <paramref name="memory"/>.</returns>
/// <remarks>
/// Since this method only receives a <see cref="Memory{T}"/> instance, which does not track
/// the lifetime of its underlying buffer, it is responsability of the caller to manage that.
/// the lifetime of its underlying buffer, it is responsibility of the caller to manage that.
/// In particular, the caller must ensure that the target buffer is not disposed as long
/// as the returned <see cref="Stream"/> is in use, to avoid unexpected issues.
/// </remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static class ObjectExtensions
/// The <see cref="IntPtr"/> value representing the offset to the target field from the start of the object data
/// for the parameter <paramref name="obj"/>. The offset is in relation to the first usable byte after the method table.
/// </returns>
/// <remarks>The input parameters are not validated, and it's responsability of the caller to ensure that
/// <remarks>The input parameters are not validated, and it's responsibility of the caller to ensure that
/// the <paramref name="data"/> reference is actually pointing to a memory location within <paramref name="obj"/>.
/// </remarks>
[Pure]
Expand All @@ -46,7 +46,7 @@ public static IntPtr DangerousGetObjectDataByteOffset<T>(this object obj, ref T
/// <param name="offset">The input byte offset for the <typeparamref name="T"/> reference to retrieve.</param>
/// <returns>A <typeparamref name="T"/> reference at a specified offset within <paramref name="obj"/>.</returns>
/// <remarks>
/// None of the input arguments is validated, and it is responsability of the caller to ensure they are valid.
/// None of the input arguments is validated, and it is responsibility of the caller to ensure they are valid.
/// In particular, using an invalid offset might cause the retrieved reference to be misaligned with the
/// desired data, which would break the type system. Or, if the offset causes the retrieved reference to point
/// to a memory location outside of the input <see cref="object"/> instance, that might lead to runtime crashes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static class ReadOnlyMemoryExtensions
/// <returns>A <see cref="Stream"/> wrapping the data within <paramref name="memory"/>.</returns>
/// <remarks>
/// Since this method only receives a <see cref="Memory{T}"/> instance, which does not track
/// the lifetime of its underlying buffer, it is responsability of the caller to manage that.
/// the lifetime of its underlying buffer, it is responsibility of the caller to manage that.
/// In particular, the caller must ensure that the target buffer is not disposed as long
/// as the returned <see cref="Stream"/> is in use, to avoid unexpected issues.
/// </remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static ReadOnlySpanTokenizer<T> Tokenize<T>(this ReadOnlySpan<T> span, T
/// even long sequences of values. For the reference implementation, see: <see href="http://www.cse.yorku.ca/~oz/hash.html"/>.
/// For details on the used constants, see the details provided in this StackOverflow answer (as well as the accepted one):
/// <see href="https://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function/13809282#13809282"/>.
/// Additionally, a comparison between some common hashing algoriths can be found in the reply to this StackExchange question:
/// Additionally, a comparison between some common hashing algorithms can be found in the reply to this StackExchange question:
/// <see href="https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed"/>.
/// Note that the exact implementation is slightly different in this method when it is not called on a sequence of <see cref="byte"/>
/// values: in this case the <see cref="object.GetHashCode"/> method will be invoked for each <typeparamref name="T"/> value in
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.HighPerformance/ReadOnlyRef{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static implicit operator ReadOnlyRef<T>(Ref<T> reference)
/// </summary>
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
/// <param name="offset">The target offset within <paramref name="owner"/> for the target reference.</param>
/// <remarks>The <paramref name="offset"/> parameter is not validated, and it's responsability of the caller to ensure it's valid.</remarks>
/// <remarks>The <paramref name="offset"/> parameter is not validated, and it's responsibility of the caller to ensure it's valid.</remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private ReadOnlyRef(object owner, IntPtr offset)
{
Expand All @@ -83,7 +83,7 @@ private ReadOnlyRef(object owner, IntPtr offset)
/// </summary>
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
/// <param name="value">The target reference to point to (it must be within <paramref name="owner"/>).</param>
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsability of the caller to ensure it's valid.</remarks>
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsibility of the caller to ensure it's valid.</remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public ReadOnlyRef(object owner, in T value)
{
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.HighPerformance/Ref{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public ref T Value
/// </summary>
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
/// <param name="value">The target reference to point to (it must be within <paramref name="owner"/>).</param>
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsability of the caller to ensure it's valid.</remarks>
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsibility of the caller to ensure it's valid.</remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Ref(object owner, ref T value)
{
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.Mvvm/ComponentModel/ObservableObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma warning disable SA1512

// This file is inspired from the MvvmLight libray (lbugnion/mvvmlight),
// This file is inspired from the MvvmLight library (lbugnion/MvvmLight),
// more info in ThirdPartyNotices.txt in the root of the project.

using System;
Expand Down Expand Up @@ -164,7 +164,7 @@ protected bool SetProperty<T>(T oldValue, T newValue, IEqualityComparer<T> compa
/// }
/// </code>
/// We can then use a property to wrap instances of this type into our observable model (which supports
/// notifications), injecting the notification to theproperties of that model, like so:
/// notifications), injecting the notification to the properties of that model, like so:
/// <code>
/// public class BindablePerson : ObservableObject
/// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma warning disable SA1512

// This file is inspired from the MvvmLight libray (lbugnion/mvvmlight),
// This file is inspired from the MvvmLight library (lbugnion/MvvmLight),
// more info in ThirdPartyNotices.txt in the root of the project.

using System;
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Mvvm/DependencyInjection/Ioc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public sealed class Ioc : IServiceProvider
// data elements no larger than the natural word size [...] shall be properly aligned.
// Object references shall be treated as though they are stored in the native word size."
// The field being accessed here is of native int size (reference type), and is only ever accessed
// directly and atomically by a compare exhange instruction (see below), or here. We can therefore
// directly and atomically by a compare exchange instruction (see below), or here. We can therefore
// assume this read is thread safe with respect to accesses to this property or to invocations to one
// of the available configuration methods. So we can just read the field directly and make the necessary
// check with our local copy, without the need of paying the locking overhead from this get accessor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Toolkit.Mvvm.Input
/// A generic interface representing a more specific version of <see cref="IAsyncRelayCommand"/>.
/// </summary>
/// <typeparam name="T">The type used as argument for the interface methods.</typeparam>
/// <remarks>This interface is needed to solve the diamong problem with base classes.</remarks>
/// <remarks>This interface is needed to solve the diamond problem with base classes.</remarks>
public interface IAsyncRelayCommand<in T> : IAsyncRelayCommand, IRelayCommand<T>
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Mvvm/Input/RelayCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma warning disable SA1512

// This file is inspired from the MvvmLight libray (lbugnion/mvvmlight),
// This file is inspired from the MvvmLight library (lbugnion/MvvmLight),
// more info in ThirdPartyNotices.txt in the root of the project.

using System;
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Mvvm/Input/RelayCommand{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma warning disable SA1512

// This file is inspired from the MvvmLight libray (lbugnion/mvvmlight),
// This file is inspired from the MvvmLight library (lbugnion/MvvmLight),
// more info in ThirdPartyNotices.txt in the root of the project.

using System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma warning disable SA1512

// This file is inspired from the MvvmLight libray (lbugnion/mvvmlight),
// This file is inspired from the MvvmLight library (lbugnion/MvvmLight),
// more info in ThirdPartyNotices.txt in the root of the project.

namespace Microsoft.Toolkit.Mvvm.Messaging.Messages
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Mvvm/Messaging/Messenger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void UnregisterAll<TToken>(object recipient, TToken token)
{
// We don't need whether or not the map contains the recipient, as the
// sequence of maps has already been copied from the set containing all
// the mappings for the target recipiets: it is guaranteed to be here.
// the mappings for the target recipients: it is guaranteed to be here.
IDictionarySlim<TToken> holder = map[key];

// Try to remove the registered handler for the input token,
Expand Down
6 changes: 3 additions & 3 deletions Microsoft.Toolkit.Mvvm/Messaging/MessengerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.Toolkit.Mvvm.Messaging
public static partial class MessengerExtensions
{
/// <summary>
/// The <see cref="MethodInfo"/> instance assocuated with <see cref="Register{TMessage,TToken}(IMessenger,IRecipient{TMessage},TToken)"/>.
/// The <see cref="MethodInfo"/> instance associated with <see cref="Register{TMessage,TToken}(IMessenger,IRecipient{TMessage},TToken)"/>.
/// </summary>
private static readonly MethodInfo RegisterIRecipientMethodInfo;

Expand Down Expand Up @@ -111,13 +111,13 @@ where interfaceType.IsGenericType &&
interfaceType.GetGenericTypeDefinition() == typeof(IRecipient<>)
let messageType = interfaceType.GenericTypeArguments[0]
let registrationMethod = RegisterIRecipientMethodInfo.MakeGenericMethod(messageType, typeof(TToken))
let registrationAction = GetRegisterationAction(type, registrationMethod)
let registrationAction = GetRegistrationAction(type, registrationMethod)
select registrationAction).ToArray();
}

// Helper method to build and compile an expression tree to a message handler to use for the registration
// This is used to reduce the overhead of repeated calls to MethodInfo.Invoke (which is over 10 times slower).
static Action<IMessenger, object, TToken> GetRegisterationAction(Type type, MethodInfo methodInfo)
static Action<IMessenger, object, TToken> GetRegistrationAction(Type type, MethodInfo methodInfo)
{
// Input parameters (IMessenger instance, non-generic recipient, token)
ParameterExpression
Expand Down
10 changes: 5 additions & 5 deletions Microsoft.Toolkit.Parsers/Markdown/Blocks/ListBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ internal static ListBlock Parse(string markdown, int start, int maxEnd, int quot
}

russianDollIndex = Math.Min(russianDollIndex, (spaceCount - 1) / 4);
int linestart = Math.Min(lineInfo.FirstNonWhitespaceChar, lineInfo.StartOfLine + ((russianDollIndex + 1) * 4));
int lineStart = Math.Min(lineInfo.FirstNonWhitespaceChar, lineInfo.StartOfLine + ((russianDollIndex + 1) * 4));

// 0 spaces = end of the list.
// 1-4 spaces = first level.
Expand Down Expand Up @@ -177,20 +177,20 @@ internal static ListBlock Parse(string markdown, int start, int maxEnd, int quot
builder.Builder.AppendLine();
}

AppendTextToListItem(currentListItem, markdown, linestart, lineInfo.EndOfLine);
AppendTextToListItem(currentListItem, markdown, lineStart, lineInfo.EndOfLine);
}
else
{
// Inline text. Ignores the 4 spaces that are used to continue the list.
AppendTextToListItem(currentListItem, markdown, linestart, lineInfo.EndOfLine, true);
AppendTextToListItem(currentListItem, markdown, lineStart, lineInfo.EndOfLine, true);
}
}

// Check for Closing Code Blocks.
if (currentListItem.Blocks.Last() is ListItemBuilder currentBlock)
{
var blockmatchcount = Regex.Matches(currentBlock.Builder.ToString(), "```").Count;
if (blockmatchcount > 0 && blockmatchcount % 2 != 0)
var blockMatchCount = Regex.Matches(currentBlock.Builder.ToString(), "```").Count;
if (blockMatchCount > 0 && blockMatchCount % 2 != 0)
{
inCodeBlock = true;
}
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Parsers/Markdown/Blocks/TableBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ internal static int ParseContents(string markdown, int startingPos, int maxEndin
/// the block should find the start of the block, find the end and parse out the middle. The end most of the time will not be
/// the max ending pos, but it sometimes can be. The function will return where it ended parsing the block in the markdown.
/// </summary>
/// <returns>the postiion parsed to</returns>
/// <returns>the position parsed to</returns>
internal int Parse(string markdown, int startingPos, int maxEndingPos, int quoteDepth)
{
Cells = new List<TableCell>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public YamlHeaderBlock()
/// <param name="markdown"> The markdown text. </param>
/// <param name="start"> The location of the first hash character. </param>
/// <param name="end"> The location of the end of the line. </param>
/// <param name="realEndIndex"> The location of the actual end of the aprse. </param>
/// <param name="realEndIndex"> The location of the actual end of the parse. </param>
/// <returns>Parsed <see cref="YamlHeaderBlock"/> class</returns>
internal static YamlHeaderBlock Parse(string markdown, int start, int end, out int realEndIndex)
{
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.Parsers/Markdown/Helpers/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public static int IndexOf(string markdown, string search, int startingPos, int e
int remainingCount = markdown.Length - startingPos;
if (count > remainingCount)
{
DebuggingReporter.ReportCriticalError("IndexOf count > remaing count");
DebuggingReporter.ReportCriticalError("IndexOf count > remaining count");
count = remainingCount;
}

Expand Down Expand Up @@ -306,7 +306,7 @@ public static int IndexOf(string markdown, char search, int startingPos, int end
int remainingCount = markdown.Length - startingPos;
if (count > remainingCount)
{
DebuggingReporter.ReportCriticalError("IndexOf count > remaing count");
DebuggingReporter.ReportCriticalError("IndexOf count > remaining count");
count = remainingCount;
}

Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Services/Core/IAuthenticationBroker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface IAuthenticationBroker
/// <summary>
/// Returns the authentication status, it could be UserCancel, ErrorHttp and Success.
/// </summary>
/// <param name="requestUri"> Autorization base url</param>
/// <param name="requestUri"> Authorization base url</param>
/// <param name="callbackUri"> LinkedInOAuthTokens callbackUri</param>
/// <returns> Returns a status </returns>
Task<AuthenticationResult> Authenticate(Uri requestUri, Uri callbackUri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ConfigNullException(string message)

/// <summary>
/// Initializes a new instance of the <see cref="ConfigNullException"/> class.
/// Constructor accepting additonal message string and inner exception
/// Constructor accepting additional message string and inner exception
/// </summary>
/// <param name="message">Additional error information.</param>
/// <param name="innerException">Reference to inner exception.</param>
Expand Down
Loading