diff --git a/Microsoft.Toolkit.Parsers/Markdown/Inlines/EmojiInline.EmojiCodes.cs b/Microsoft.Toolkit.Parsers/Markdown/Inlines/EmojiInline.EmojiCodes.cs index 89fc0053229..1a0e503a351 100644 --- a/Microsoft.Toolkit.Parsers/Markdown/Inlines/EmojiInline.EmojiCodes.cs +++ b/Microsoft.Toolkit.Parsers/Markdown/Inlines/EmojiInline.EmojiCodes.cs @@ -12,7 +12,7 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Inlines public partial class EmojiInline { // Codes taken from https://gist.github.com/rxaviers/7360908 - // Ignoring not implented symbols in Segoe UI Emoji font (e.g. :bowtie:) + // Ignoring not implemented symbols in Segoe UI Emoji font (e.g. :bowtie:) private static readonly Dictionary _emojiCodesDictionary = new Dictionary { { "smile", 0x1f604 }, diff --git a/Microsoft.Toolkit.Parsers/Markdown/Inlines/HyperlinkInline.cs b/Microsoft.Toolkit.Parsers/Markdown/Inlines/HyperlinkInline.cs index 2acf0b4e4e3..4297f6e6676 100644 --- a/Microsoft.Toolkit.Parsers/Markdown/Inlines/HyperlinkInline.cs +++ b/Microsoft.Toolkit.Parsers/Markdown/Inlines/HyperlinkInline.cs @@ -325,7 +325,7 @@ internal static InlineParseResult ParseEmailAddress(string markdown, int minStar // reddit (for example: '$' and '!'). // Special characters as per https://en.wikipedia.org/wiki/Email_address#Local-part allowed - char[] allowedchars = new char[] { '!', '#', '$', '%', '&', '\'', '*', '+', '-', '/', '=', '?', '^', '_', '`', '{', '|', '}', '~' }; + char[] allowedChars = { '!', '#', '$', '%', '&', '\'', '*', '+', '-', '/', '=', '?', '^', '_', '`', '{', '|', '}', '~' }; int start = tripPos; while (start > minStart) @@ -334,7 +334,7 @@ internal static InlineParseResult ParseEmailAddress(string markdown, int minStar if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c < '0' || c > '9') && - !allowedchars.Contains(c)) + !allowedChars.Contains(c)) { break; } diff --git a/Microsoft.Toolkit.Parsers/Markdown/Inlines/ImageInline.cs b/Microsoft.Toolkit.Parsers/Markdown/Inlines/ImageInline.cs index 135dfec69a6..3b85323045b 100644 --- a/Microsoft.Toolkit.Parsers/Markdown/Inlines/ImageInline.cs +++ b/Microsoft.Toolkit.Parsers/Markdown/Inlines/ImageInline.cs @@ -118,7 +118,7 @@ internal static InlineParseResult Parse(string markdown, int start, int end) if (pos < end && markdown[pos] == '[') { - int refstart = pos; + int refStart = pos; // Find the reference ']' character while (pos < end) @@ -131,7 +131,7 @@ internal static InlineParseResult Parse(string markdown, int start, int end) pos++; } - reference = markdown.Substring(refstart + 1, pos - refstart - 1); + reference = markdown.Substring(refStart + 1, pos - refStart - 1); } else if (pos < end && markdown[pos] == '(') { @@ -156,10 +156,10 @@ internal static InlineParseResult Parse(string markdown, int start, int end) if (imageDimensionsPos > 0) { // trying to find 'x' which separates image width and height - var dimensionsSepatorPos = markdown.IndexOf("x", imageDimensionsPos + 2, pos - imageDimensionsPos - 1, StringComparison.Ordinal); + var dimensionsSeparatorPos = markdown.IndexOf("x", imageDimensionsPos + 2, pos - imageDimensionsPos - 1, StringComparison.Ordinal); // didn't find separator, trying to parse value as imageWidth - if (dimensionsSepatorPos == -1) + if (dimensionsSeparatorPos == -1) { var imageWidthStr = markdown.Substring(imageDimensionsPos + 2, pos - imageDimensionsPos - 2); diff --git a/Microsoft.Toolkit.Parsers/Markdown/Inlines/TextRunInline.cs b/Microsoft.Toolkit.Parsers/Markdown/Inlines/TextRunInline.cs index adf1899e2aa..06937b1946b 100644 --- a/Microsoft.Toolkit.Parsers/Markdown/Inlines/TextRunInline.cs +++ b/Microsoft.Toolkit.Parsers/Markdown/Inlines/TextRunInline.cs @@ -354,10 +354,10 @@ internal static TextRunInline Parse(string markdown, int start, int end) continue; } - // Okay, we have an entity, but is it one we recognise? + // Okay, we have an entity, but is it one we recognize? string entityName = markdown.Substring(sequenceStartIndex + 1, semicolonIndex - (sequenceStartIndex + 1)); - // Unrecognised entity. + // Unrecognized entity. if (_entities.ContainsKey(entityName) == false) { continue; diff --git a/Microsoft.Toolkit.Parsers/Markdown/MarkdownDocument.cs b/Microsoft.Toolkit.Parsers/Markdown/MarkdownDocument.cs index c43cff1e462..ba481207856 100644 --- a/Microsoft.Toolkit.Parsers/Markdown/MarkdownDocument.cs +++ b/Microsoft.Toolkit.Parsers/Markdown/MarkdownDocument.cs @@ -101,7 +101,7 @@ internal static List Parse(string markdown, int start, int end, i var paragraphText = new StringBuilder(); // These are needed to parse underline-style header blocks. - int previousRealtStartOfLine = start; + int previousRealStartOfLine = start; int previousStartOfLine = start; int previousEndOfLine = start; @@ -160,18 +160,18 @@ internal static List Parse(string markdown, int start, int end, i else { int lastIndentation = 0; - string lastline = null; + string lastLine = null; // Determines how many Quote levels were in the last line. if (realStartOfLine > 0) { - lastline = markdown.Substring(previousRealtStartOfLine, previousEndOfLine - previousRealtStartOfLine); - lastIndentation = lastline.Count(c => c == '>'); + lastLine = markdown.Substring(previousRealStartOfLine, previousEndOfLine - previousRealStartOfLine); + lastIndentation = lastLine.Count(c => c == '>'); } var currentEndOfLine = Common.FindNextSingleNewLine(markdown, nonSpacePos, end, out _); - var currentline = markdown.Substring(realStartOfLine, currentEndOfLine - realStartOfLine); - var currentIndentation = currentline.Count(c => c == '>'); + var currentLine = markdown.Substring(realStartOfLine, currentEndOfLine - realStartOfLine); + var currentIndentation = currentLine.Count(c => c == '>'); var firstChar = markdown[realStartOfLine]; // This is a quote that doesn't start with a Quote marker, but carries on from the last line. @@ -364,7 +364,7 @@ internal static List Parse(string markdown, int start, int end, i } // Repeat. - previousRealtStartOfLine = realStartOfLine; + previousRealStartOfLine = realStartOfLine; previousStartOfLine = startOfLine; previousEndOfLine = endOfLine; startOfLine = startOfNextLine; diff --git a/Microsoft.Toolkit.Parsers/Rss/AtomParser.cs b/Microsoft.Toolkit.Parsers/Rss/AtomParser.cs index 27420f9926d..65c2a56a6b7 100644 --- a/Microsoft.Toolkit.Parsers/Rss/AtomParser.cs +++ b/Microsoft.Toolkit.Parsers/Rss/AtomParser.cs @@ -37,7 +37,7 @@ public override IEnumerable LoadFeed(XDocument doc) } /// - /// Retieves strong type for passed item. + /// Retrieves strong type for passed item. /// /// XElement to parse. /// Strong typed object. diff --git a/Microsoft.Toolkit.Parsers/Rss/RssHelper.cs b/Microsoft.Toolkit.Parsers/Rss/RssHelper.cs index e17afdbf233..5b4b19d5af3 100644 --- a/Microsoft.Toolkit.Parsers/Rss/RssHelper.cs +++ b/Microsoft.Toolkit.Parsers/Rss/RssHelper.cs @@ -23,9 +23,9 @@ internal static class RssHelper private const string ImagePattern = @""; /// - /// String for regular xpression for hyperlink pattern. + /// String for regular expression for hyperlink pattern. /// - private const string HiperlinkPattern = @"]*?\s+)?href=""([^ ""]*)"""; + private const string HyperlinkPattern = @"]*?\s+)?href=""([^ ""]*)"""; /// /// String for regular expression for height pattern. @@ -45,7 +45,7 @@ internal static class RssHelper /// /// Regular expression for hyperlink pattern. /// - private static readonly Regex RegexLinks = new Regex(HiperlinkPattern, RegexOptions.IgnoreCase); + private static readonly Regex RegexLinks = new Regex(HyperlinkPattern, RegexOptions.IgnoreCase); /// /// Regular expression for height pattern. @@ -82,7 +82,7 @@ public static string SanitizeString(this string text) } /// - /// Get item date from xelement and element name. + /// Get item date from and element name. /// /// XElement item. /// Name of element. @@ -93,7 +93,7 @@ public static DateTime GetSafeElementDate(this XElement item, string elementName } /// - /// Get item date from xelement, element name and namespace. + /// Get item date from , element name and . /// /// XElement item. /// Name of element. @@ -117,7 +117,7 @@ public static DateTime GetSafeElementDate(this XElement item, string elementName } /// - /// Get item string value for xelement and element name. + /// Get item string value for and element name. /// /// XElement item. /// Name of element. @@ -133,7 +133,7 @@ public static string GetSafeElementString(this XElement item, string elementName } /// - /// Get item string values for xelement and element name. + /// Get item string values for and element name. /// /// XElement item. /// Name of the element. @@ -144,9 +144,9 @@ public static IEnumerable GetSafeElementsString(this XElement item, stri } /// - /// Get item string values for xelement, element name and namespace. + /// Get item string values for , element name and namespace. /// - /// XELement item. + /// XElement item. /// Name of element. /// XNamespace namespace. /// Safe list of string values. @@ -163,7 +163,7 @@ public static IEnumerable GetSafeElementsString(this XElement item, stri } /// - /// Get item string value for xelement, element name and namespace. + /// Get item string value for , element name and namespace. /// /// XElement item. /// Name of element. @@ -387,7 +387,7 @@ private static IEnumerable GetImagesInHTMLString(string htmlString) { "AT", new[] { "+0200", "Azores" } }, { "AWDT", new[] { "-0900", "Australian West Daylight" } }, { "AWST", new[] { "-0800", "Australian West Standard" } }, - { "BAT", new[] { "-0300", "Bhagdad" } }, + { "BAT", new[] { "-0300", "Baghdad" } }, { "BDST", new[] { "-0200", "British Double Summer" } }, { "BET", new[] { "+1100", "Bering Standard" } }, { "BST", new[] { "+0300", "Brazil Standard" } }, @@ -413,8 +413,8 @@ private static IEnumerable GetImagesInHTMLString(string htmlString) { "GST", new[] { "-1000", "Guam Standard" } }, { "HDT", new[] { "+0900", "Hawaii Daylight" } }, { "HST", new[] { "+1000", "Hawaii Standard" } }, - { "IDLE", new[] { "-1200", "Internation Date Line East" } }, - { "IDLW", new[] { "+1200", "Internation Date Line West" } }, + { "IDLE", new[] { "-1200", "International Date Line East" } }, + { "IDLW", new[] { "+1200", "International Date Line West" } }, { "IST", new[] { "-0530", "Indian Standard" } }, { "IT", new[] { "-0330", "Iran" } }, { "JST", new[] { "-0900", "Japan Standard" } }, diff --git a/Microsoft.Toolkit.Services/Exceptions/ParserNullException.cs b/Microsoft.Toolkit.Services/Exceptions/ParserNullException.cs index a2767034a68..24da1f64e11 100644 --- a/Microsoft.Toolkit.Services/Exceptions/ParserNullException.cs +++ b/Microsoft.Toolkit.Services/Exceptions/ParserNullException.cs @@ -33,7 +33,7 @@ public ParserNullException(string message) /// Initializes a new instance of the class. /// Constructor with additional message and inner exception. /// - /// Additonal message. + /// Additional message. /// Reference to inner exception. public ParserNullException(string message, Exception innerException) : base(message, innerException) diff --git a/Microsoft.Toolkit.Services/Exceptions/RequestFailedException.cs b/Microsoft.Toolkit.Services/Exceptions/RequestFailedException.cs index 87325795ba9..6bfd16057f0 100644 --- a/Microsoft.Toolkit.Services/Exceptions/RequestFailedException.cs +++ b/Microsoft.Toolkit.Services/Exceptions/RequestFailedException.cs @@ -24,7 +24,7 @@ public RequestFailedException() /// Initializes a new instance of the class. /// Constructor with additional message. /// - /// Additional messsage. + /// Additional message. public RequestFailedException(string message) : base(message) { diff --git a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkAuthenticationBroker.cs b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkAuthenticationBroker.cs index 11ea848c2d1..a182c84902b 100644 --- a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkAuthenticationBroker.cs +++ b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkAuthenticationBroker.cs @@ -17,7 +17,7 @@ public Task Authenticate(Uri requestUri, Uri callbackUri) int numberForms = ApplicationForm.OpenForms.Count; if (numberForms > 0) { - return AutenticateForm(requestUri, callbackUri); + return this.AuthenticateForm(requestUri, callbackUri); } else if (Application.Current != null) { @@ -45,7 +45,7 @@ public async Task AuthenticateWindow(Uri requestUri, Uri c return await taskCompletionSource.Task; } - public async Task AutenticateForm(Uri requestUri, Uri callbackUri) + public async Task AuthenticateForm(Uri requestUri, Uri callbackUri) { PopupForm popupForm; var taskCompletionSource = new TaskCompletionSource(); diff --git a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkPasswordManager.cs b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkPasswordManager.cs index 2ae71a41872..bca8353a8b1 100644 --- a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkPasswordManager.cs +++ b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/NetFrameworkPasswordManager.cs @@ -31,10 +31,10 @@ public void Store(string resource, PasswordCredential credential) Type = CRED_TYPE.GENERIC, Persist = CRED_PERSIST.LOCAL_MACHINE }; - NativeCredential ncred = NativeCredential.GetNativeCredential(cred); + NativeCredential userCredential = NativeCredential.GetNativeCredential(cred); // Write the info into the CredMan storage. - bool written = CredWrite(ref ncred, 0); + bool written = CredWrite(ref userCredential, 0); int lastError = Marshal.GetLastWin32Error(); if (!written) { @@ -52,14 +52,14 @@ public PasswordCredential Get(string key) return null; } - CriticalCredentialHandle critCred = new CriticalCredentialHandle(nCredPtr); + CriticalCredentialHandle credentialHandle = new CriticalCredentialHandle(nCredPtr); - Credential credential = critCred.GetCredential(); - PasswordCredential passCred = new PasswordCredential(); - passCred.UserName = credential.UserName; - passCred.Password = credential.CredentialBlob; - - return passCred; + Credential credential = credentialHandle.GetCredential(); + return new PasswordCredential + { + UserName = credential.UserName, + Password = credential.CredentialBlob + }; } public void Remove(string key) diff --git a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PasswordManagerNativeMethods.cs b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PasswordManagerNativeMethods.cs index 6a60cee6fcb..d4f9a993fd3 100644 --- a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PasswordManagerNativeMethods.cs +++ b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PasswordManagerNativeMethods.cs @@ -66,7 +66,7 @@ internal struct NativeCredential /// instance. internal static NativeCredential GetNativeCredential(Credential cred) { - NativeCredential ncred = new NativeCredential + return new NativeCredential { AttributeCount = 0, Attributes = IntPtr.Zero, @@ -79,7 +79,6 @@ internal static NativeCredential GetNativeCredential(Credential cred) CredentialBlob = Marshal.StringToCoTaskMemUni(cred.CredentialBlob), UserName = Marshal.StringToCoTaskMemUni(cred.UserName) }; - return ncred; } } @@ -116,21 +115,20 @@ internal Credential GetCredential() if (!IsInvalid) { // Get the Credential from the mem location - NativeCredential ncred = (NativeCredential)Marshal.PtrToStructure(handle, typeof(NativeCredential)); + NativeCredential nativeCredential = (NativeCredential)Marshal.PtrToStructure(handle, typeof(NativeCredential)); // Create a managed Credential type and fill it with data from the native counterpart. - Credential cred = new Credential + return new Credential { - CredentialBlobSize = ncred.CredentialBlobSize, - CredentialBlob = Marshal.PtrToStringUni(ncred.CredentialBlob, (int)ncred.CredentialBlobSize / 2), - UserName = Marshal.PtrToStringUni(ncred.UserName), - TargetName = Marshal.PtrToStringUni(ncred.TargetName), - TargetAlias = Marshal.PtrToStringUni(ncred.TargetAlias), - Type = ncred.Type, - Flags = ncred.Flags, - Persist = (CRED_PERSIST)ncred.Persist + CredentialBlobSize = nativeCredential.CredentialBlobSize, + CredentialBlob = Marshal.PtrToStringUni(nativeCredential.CredentialBlob, (int)nativeCredential.CredentialBlobSize / 2), + UserName = Marshal.PtrToStringUni(nativeCredential.UserName), + TargetName = Marshal.PtrToStringUni(nativeCredential.TargetName), + TargetAlias = Marshal.PtrToStringUni(nativeCredential.TargetAlias), + Type = nativeCredential.Type, + Flags = nativeCredential.Flags, + Persist = (CRED_PERSIST)nativeCredential.Persist }; - return cred; } else { @@ -139,14 +137,14 @@ internal Credential GetCredential() } // Perform any specific actions to release the handle in the ReleaseHandle method. - // Often, you need to use Pinvoke to make a call into the Win32 API to release the + // Often, you need to use PInvoke to make a call into the Win32 API to release the // handle. In this case, however, we can use the Marshal class to release the unmanaged memory. protected override bool ReleaseHandle() { // If the handle was set, free it. Return success. if (!IsInvalid) { - // NOTE: We should also ZERO out the memory allocated to the handle, before free'ing it + // NOTE: We should also ZERO out the memory allocated to the handle, before freeing it // so there are no traces of the sensitive data left in memory. CredFree(handle); diff --git a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PopupForm.cs b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PopupForm.cs index e62b5d2ea78..2c4e6a2ac41 100644 --- a/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PopupForm.cs +++ b/Microsoft.Toolkit.Services/PlatformSpecific/NETFramework/PopupForm.cs @@ -15,7 +15,7 @@ namespace Microsoft.Toolkit.Services.PlatformSpecific.NetFramework { /// - /// Service WebView for winforms + /// Service WebView for windows forms /// public partial class PopupForm : Form { diff --git a/Microsoft.Toolkit.Services/PlatformSpecific/Uwp/UwpPasswordManager.cs b/Microsoft.Toolkit.Services/PlatformSpecific/Uwp/UwpPasswordManager.cs index d1d4308832c..4d7b3f77fee 100644 --- a/Microsoft.Toolkit.Services/PlatformSpecific/Uwp/UwpPasswordManager.cs +++ b/Microsoft.Toolkit.Services/PlatformSpecific/Uwp/UwpPasswordManager.cs @@ -29,13 +29,13 @@ public UwpPasswordManager() /// public Toolkit.Services.Core.PasswordCredential Get(string key) { - var crendentials = RetrievePasswordCredential(key); - if (crendentials == null) + var credentials = RetrievePasswordCredential(key); + if (credentials == null) { return null; } - return new Toolkit.Services.Core.PasswordCredential { Password = crendentials.Password, UserName = crendentials.UserName }; + return new Toolkit.Services.Core.PasswordCredential { Password = credentials.Password, UserName = credentials.UserName }; } private Windows.Security.Credentials.PasswordCredential RetrievePasswordCredential(string key) diff --git a/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInService.cs b/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInService.cs index 63ee832164f..251e5fb711d 100644 --- a/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInService.cs +++ b/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInService.cs @@ -113,7 +113,7 @@ public Task LogoutAsync() #if WINRT /// - /// Initialize underlying provider with relevent token information for Uwp. + /// Initialize underlying provider with relevant token information for Uwp. /// /// Token instance. /// Scope / permissions app requires user to sign up for. @@ -124,7 +124,7 @@ public bool Initialize(LinkedInOAuthTokens oAuthTokens, LinkedInPermissions requ } /// - /// Initialize underlying provider with relevent token information. + /// Initialize underlying provider with relevant token information. /// /// Client Id. /// Client secret. diff --git a/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInShareResponse.cs b/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInShareResponse.cs index de06b079155..294511da5a4 100644 --- a/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInShareResponse.cs +++ b/Microsoft.Toolkit.Services/Services/LinkedIn/LinkedInShareResponse.cs @@ -10,12 +10,12 @@ namespace Microsoft.Toolkit.Services.LinkedIn public class LinkedInShareResponse { /// - /// Gets or sets updatekey property. + /// Gets or sets UpdateKey property. /// public string UpdateKey { get; set; } /// - /// Gets or sets updateurl property. + /// Gets or sets UpdateUrl property. /// public string UpdateUrl { get; set; } } diff --git a/Microsoft.Toolkit.Services/Services/Twitter/TwitterService.cs b/Microsoft.Toolkit.Services/Services/Twitter/TwitterService.cs index d343db885ab..703657cf2fb 100644 --- a/Microsoft.Toolkit.Services/Services/Twitter/TwitterService.cs +++ b/Microsoft.Toolkit.Services/Services/Twitter/TwitterService.cs @@ -151,7 +151,7 @@ public bool Initialize(TwitterOAuthTokens oAuthTokens, IAuthenticationBroker aut #if WINRT /// - /// Initialize underlying provider with relevent token information for Uwp. + /// Initialize underlying provider with relevant token information for Uwp. /// /// Consumer key. /// Consumer secret. @@ -163,7 +163,7 @@ public bool Initialize(string consumerKey, string consumerSecret, string callbac } /// - /// Initialize underlying provider with relevent token information. + /// Initialize underlying provider with relevant token information. /// /// Token instance. /// Success or failure. diff --git a/Microsoft.Toolkit.Services/Services/Twitter/TwitterStreamEventType.cs b/Microsoft.Toolkit.Services/Services/Twitter/TwitterStreamEventType.cs index 246c3eeca8d..91f582f41f8 100644 --- a/Microsoft.Toolkit.Services/Services/Twitter/TwitterStreamEventType.cs +++ b/Microsoft.Toolkit.Services/Services/Twitter/TwitterStreamEventType.cs @@ -35,7 +35,7 @@ public enum TwitterStreamEventType Favorite, /// - /// The source user has unfaovorited the target users tweet. + /// The source user has unfavorited the target users tweet. /// [EnumMemberAttribute(Value = "unfavorite")] Unfavorite, diff --git a/Microsoft.Toolkit.Services/Services/Twitter/TwitterUrlUnwound.cs b/Microsoft.Toolkit.Services/Services/Twitter/TwitterUrlUnwound.cs index 095e0aec6a5..63073ed15d1 100644 --- a/Microsoft.Toolkit.Services/Services/Twitter/TwitterUrlUnwound.cs +++ b/Microsoft.Toolkit.Services/Services/Twitter/TwitterUrlUnwound.cs @@ -18,7 +18,7 @@ public class TwitterUrlUnwound public string Url { get; set; } /// - /// Gets or sets status of unwind; if anything but 200 the data's bad. + /// Gets or sets status of unwind; if anything but 200 is bad data. /// [JsonProperty("status")] public int Status { get; set; } diff --git a/Microsoft.Toolkit.Services/Services/Twitter/TwitterUser.cs b/Microsoft.Toolkit.Services/Services/Twitter/TwitterUser.cs index b3484b95663..dad92788421 100644 --- a/Microsoft.Toolkit.Services/Services/Twitter/TwitterUser.cs +++ b/Microsoft.Toolkit.Services/Services/Twitter/TwitterUser.cs @@ -54,7 +54,7 @@ public class TwitterUser public bool Protected { get; set; } /// - /// Gets or sets a value indicating whether account is verified (blue checkmark). + /// Gets or sets a value indicating whether account is verified (blue check mark). /// [JsonProperty("verified")] public bool Verified { get; set; } diff --git a/Microsoft.Toolkit.Services/Services/Twitter/TwitterUserStreamParser.cs b/Microsoft.Toolkit.Services/Services/Twitter/TwitterUserStreamParser.cs index e0148295af9..d8f036df41f 100644 --- a/Microsoft.Toolkit.Services/Services/Twitter/TwitterUserStreamParser.cs +++ b/Microsoft.Toolkit.Services/Services/Twitter/TwitterUserStreamParser.cs @@ -51,16 +51,16 @@ public ITwitterResult Parse(string data) var events = obj.SelectToken("event", false); if (events != null) { - var targetobject = obj.SelectToken("target_object", false); - Tweet endtargetobject = null; - if (targetobject?.SelectToken("user", false) != null) + var targetObject = obj.SelectToken("target_object", false); + Tweet endTargetObject = null; + if (targetObject?.SelectToken("user", false) != null) { - endtargetobject = JsonConvert.DeserializeObject(targetobject.ToString()); + endTargetObject = JsonConvert.DeserializeObject(targetObject.ToString()); } - var endevent = JsonConvert.DeserializeObject(obj.ToString()); - endevent.TargetObject = endtargetobject; - return endevent; + var endEvent = JsonConvert.DeserializeObject(obj.ToString()); + endEvent.TargetObject = endTargetObject; + return endEvent; } var user = obj.SelectToken("user", false); diff --git a/Microsoft.Toolkit.Services/Services/Weibo/WeiboService.cs b/Microsoft.Toolkit.Services/Services/Weibo/WeiboService.cs index 6863ba46aa6..f5f8dd7ec99 100644 --- a/Microsoft.Toolkit.Services/Services/Weibo/WeiboService.cs +++ b/Microsoft.Toolkit.Services/Services/Weibo/WeiboService.cs @@ -136,7 +136,7 @@ public bool Initialize(WeiboOAuthTokens oAuthTokens, IAuthenticationBroker authe #if WINRT /// - /// Initialize underlying provider with relevent token information for Uwp. + /// Initialize underlying provider with relevant token information for Uwp. /// /// App key. /// App secret. @@ -148,7 +148,7 @@ public bool Initialize(string appKey, string appSecret, string redirectUri) } /// - /// Initialize underlying provider with relevent token information. + /// Initialize underlying provider with relevant token information. /// /// Token instance. /// Success or failure. diff --git a/Microsoft.Toolkit.Services/Services/Weibo/WeiboUser.cs b/Microsoft.Toolkit.Services/Services/Weibo/WeiboUser.cs index 82e55fdeae1..f8312087338 100644 --- a/Microsoft.Toolkit.Services/Services/Weibo/WeiboUser.cs +++ b/Microsoft.Toolkit.Services/Services/Weibo/WeiboUser.cs @@ -84,7 +84,7 @@ public class WeiboUser public int StatusesCount { get; set; } /// - /// Gets or sets a value indicating whether account is verified (blue checkmark). + /// Gets or sets a value indicating whether account is verified (blue check mark). /// [JsonProperty("verified")] public bool Verified { get; set; } diff --git a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs index e54d84f4ef8..2e72750c433 100644 --- a/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs +++ b/Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableBluetoothLEDevice.cs @@ -35,7 +35,7 @@ public class ObservableBluetoothLEDevice : INotifyPropertyChanged, IEquatable - /// Compares two ObservableBluettothLEDevices and returns a value indicating + /// Compares two and returns a value indicating /// whether one is less than, equal to, or greater than the other. /// /// First object to compare @@ -401,7 +401,7 @@ private void ObservableBluetoothLEDevice_PropertyChanged(object sender, Property /// ConnectAsync to this bluetooth device /// /// Connection task - /// Thorws Exception when no permission to access device + /// Throws Exception when no permission to access device public async Task ConnectAsync() { await DispatcherQueue.ExecuteOnUIThreadAsync( @@ -438,9 +438,9 @@ await DispatcherQueue.ExecuteOnUIThreadAsync( // In case we connected before, clear the service list and recreate it Services.Clear(); - foreach (var serv in _result.Services) + foreach (var service in _result.Services) { - Services.Add(new ObservableGattDeviceService(serv)); + Services.Add(new ObservableGattDeviceService(service)); } ServiceCount = Services.Count; diff --git a/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseImageHelper.cs b/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseImageHelper.cs index 67181d8ab1e..88afb1326a9 100644 --- a/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseImageHelper.cs +++ b/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseImageHelper.cs @@ -19,18 +19,18 @@ internal static void SetSource(ref string destination, string value) destination = value; } - internal static Element_AdaptiveImage CreateBaseElement(IBaseImage curr) + internal static Element_AdaptiveImage CreateBaseElement(IBaseImage current) { - if (curr.Source == null) + if (current.Source == null) { throw new NullReferenceException("Source property is required."); } return new Element_AdaptiveImage() { - Src = curr.Source, - Alt = curr.AlternateText, - AddImageQuery = curr.AddImageQuery + Src = current.Source, + Alt = current.AlternateText, + AddImageQuery = current.AddImageQuery }; } } diff --git a/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseTextHelper.cs b/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseTextHelper.cs index a3ab59d4218..8cf643129b1 100644 --- a/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseTextHelper.cs +++ b/Microsoft.Toolkit.Uwp.Notifications/Adaptive/BaseTextHelper.cs @@ -8,12 +8,12 @@ namespace Microsoft.Toolkit.Uwp.Notifications { internal class BaseTextHelper { - internal static Element_AdaptiveText CreateBaseElement(IBaseText curr) + internal static Element_AdaptiveText CreateBaseElement(IBaseText baseText) { return new Element_AdaptiveText() { - Text = curr.Text, - Lang = curr.Language + Text = baseText.Text, + Lang = baseText.Language }; } } diff --git a/Microsoft.Toolkit.Uwp.Notifications/DesktopNotificationManager/NotificationUserInput.cs b/Microsoft.Toolkit.Uwp.Notifications/DesktopNotificationManager/NotificationUserInput.cs index 9948ed5353a..0ef54e3ec39 100644 --- a/Microsoft.Toolkit.Uwp.Notifications/DesktopNotificationManager/NotificationUserInput.cs +++ b/Microsoft.Toolkit.Uwp.Notifications/DesktopNotificationManager/NotificationUserInput.cs @@ -28,7 +28,7 @@ internal NotificationUserInput(NotificationActivator.NOTIFICATION_USER_INPUT_DAT /// /// Gets the value of an input with the given key. /// - /// The key of the inpupt. + /// The key of the input. /// The value of the input. public string this[string key] => _data.First(i => i.Key == key).Value; @@ -48,7 +48,7 @@ internal NotificationUserInput(NotificationActivator.NOTIFICATION_USER_INPUT_DAT public int Count => _data.Length; /// - /// Checks whether any inpupts have the given key. + /// Checks whether any inputs have the given key. /// /// The key to look for. /// A boolean representing whether any inputs have the given key. diff --git a/Microsoft.Toolkit.Uwp.Notifications/Tiles/Builder/TileContentBuilder.cs b/Microsoft.Toolkit.Uwp.Notifications/Tiles/Builder/TileContentBuilder.cs index 705a42c1373..8f2f5eadc44 100644 --- a/Microsoft.Toolkit.Uwp.Notifications/Tiles/Builder/TileContentBuilder.cs +++ b/Microsoft.Toolkit.Uwp.Notifications/Tiles/Builder/TileContentBuilder.cs @@ -385,7 +385,7 @@ public TileContentBuilder SetTextStacking(TileTextStacking textStacking, TileSiz } /// - /// Set the tile's activation arguments for chasable tile notification. + /// Set the tile's activation arguments for tile notification. /// /// App-Defined custom arguments that will be passed in when the user click on the tile when this tile notification is being displayed. /// The tile size that the custom argument should be applied to. Default to all currently supported tile size. diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Controls/CodeRenderer.cs b/Microsoft.Toolkit.Uwp.SampleApp/Controls/CodeRenderer.cs index ea744557440..a2c9f0f698e 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Controls/CodeRenderer.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/Controls/CodeRenderer.cs @@ -110,16 +110,16 @@ private async void PrintButton_Click(object sender, RoutedEventArgs e) { SampleController.Current.DisplayWaitRing = true; - var printblock = new RichTextBlock + var printBlock = new RichTextBlock { FontFamily = _codeView.FontFamily, RequestedTheme = ElementTheme.Light }; var printFormatter = new RichTextBlockFormatter(ElementTheme.Light); - printFormatter.FormatRichTextBlock(_displayedText, _language, printblock); + printFormatter.FormatRichTextBlock(_displayedText, _language, printBlock); _printHelper = new PrintHelper(_container); - _printHelper.AddFrameworkElementToPrint(printblock); + _printHelper.AddFrameworkElementToPrint(printBlock); _printHelper.OnPrintFailed += PrintHelper_OnPrintFailed; _printHelper.OnPrintSucceeded += PrintHelper_OnPrintSucceeded; diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Controls/SampleAppMarkdownRenderer.cs b/Microsoft.Toolkit.Uwp.SampleApp/Controls/SampleAppMarkdownRenderer.cs index 3e6e40ca28a..dc671f7c5a6 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Controls/SampleAppMarkdownRenderer.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/Controls/SampleAppMarkdownRenderer.cs @@ -79,7 +79,7 @@ protected override void RenderCode(CodeBlock element, IRenderContext context) if (language != "XAML" && prevIndex >= 0 && collection[prevIndex] is StackPanel prevPanel - && prevPanel.Tag is CustCodeBlock block + && prevPanel.Tag is CustomCodeBlock block && !block.Languages.ContainsKey("XAML") // Prevent combining of XAML Code Blocks. && !block.Languages.ContainsKey(language)) { @@ -162,7 +162,7 @@ protected override void RenderCode(CodeBlock element, IRenderContext context) } else { - block = new CustCodeBlock(); + block = new CustomCodeBlock(); #pragma warning disable SA1008 // Opening parenthesis must be spaced correctly block.Languages.Add(language, (viewer, element.Text)); #pragma warning restore SA1008 // Opening parenthesis must be spaced correctly @@ -203,7 +203,7 @@ protected override void RenderCode(CodeBlock element, IRenderContext context) headerGrid.Children.Add(copyButton); Grid.SetColumn(copyButton, 1); - // Collection the adornment and the standard UI, add them to a Stackpanel, and add it back to the collection. + // Collection the adornment and the standard UI, add them to a StackPanel, and add it back to the collection. var panel = new StackPanel { Background = viewer.Background, @@ -266,9 +266,9 @@ protected override void RenderQuote(QuoteBlock element, IRenderContext context) } } } - else if (firstInline is TextRunInline textinline) + else if (firstInline is TextRunInline textRunInline) { - var key = textinline.Text.Split(' ').FirstOrDefault(); + var key = textRunInline.Text.Split(' ').FirstOrDefault(); if (styles.TryGetValue(key, out var style) && !style.Ignore) { noteType = style; @@ -276,7 +276,7 @@ protected override void RenderQuote(QuoteBlock element, IRenderContext context) symbolGlyph = style.Glyph; // Removes the identifier from the text - textinline.Text = textinline.Text.Replace(key, string.Empty); + textRunInline.Text = textRunInline.Text.Replace(key, string.Empty); if (theme == ElementTheme.Light) { @@ -292,9 +292,9 @@ protected override void RenderQuote(QuoteBlock element, IRenderContext context) // Apply special formatting context. if (noteType != null) { - if (localContext?.Clone() is UIElementCollectionRenderContext newcontext) + if (localContext?.Clone() is UIElementCollectionRenderContext newContext) { - localContext = newcontext; + localContext = newContext; localContext.TrimLeadingWhitespace = true; QuoteForeground = Foreground; @@ -306,7 +306,7 @@ protected override void RenderQuote(QuoteBlock element, IRenderContext context) if (style.Ignore) { // Blank entire block - textinline.Text = string.Empty; + textRunInline.Text = string.Empty; } } } @@ -504,7 +504,7 @@ private class DocFXNote /// /// Code Block Tag Information to track current Language and Alternate Views. /// - private class CustCodeBlock + private class CustomCodeBlock { #pragma warning disable SA1008 // Opening parenthesis must be spaced correctly #pragma warning disable SA1009 // Closing parenthesis must be spaced correctly diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs b/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs index d9aeb0c36ba..9e21f19f9ba 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs @@ -473,7 +473,7 @@ public async Task PreparePropertyDescriptorAsync() if (existingOption == null && string.IsNullOrWhiteSpace(type)) { - throw new NotSupportedException($"Unrecognized short identifier '{name}'; Define type and parameters of property in first occurence in {XamlCodeFile}."); + throw new NotSupportedException($"Unrecognized short identifier '{name}'; Define type and parameters of property in first occurrence in {XamlCodeFile}."); } if (Enum.TryParse(type, out PropertyKind kind)) diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Pages/About.xaml b/Microsoft.Toolkit.Uwp.SampleApp/Pages/About.xaml index 75415ae6431..0607623cd30 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Pages/About.xaml +++ b/Microsoft.Toolkit.Uwp.SampleApp/Pages/About.xaml @@ -201,7 +201,7 @@ - - - - + + + @@ -293,9 +293,9 @@ - - - + + + diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml b/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml index 8fb16a2fd87..99d1f479794 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml +++ b/Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml @@ -205,15 +205,15 @@ Padding="0, 10,0,0" Header="Documentation"> - (); + DocumentationTextBlock.SetRenderer(); ProcessSampleEditorTime(); XamlCodeEditor.UpdateRequested += XamlCodeEditor_UpdateRequested; @@ -287,7 +287,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) documentationPath = path; if (!string.IsNullOrWhiteSpace(contents)) { - DocumentationTextblock.Text = contents; + DocumentationTextBlock.Text = contents; InfoAreaPivot.Items.Add(DocumentationPivotItem); } } @@ -439,7 +439,7 @@ await Dispatcher.RunAsync(CoreDispatcherPriority.Low, () => }); } - private async void DocumentationTextblock_OnLinkClicked(object sender, LinkClickedEventArgs e) + private async void DocumentationTextBlock_OnLinkClicked(object sender, LinkClickedEventArgs e) { TrackingManager.TrackEvent("Link", e.Link); var link = e.Link; @@ -454,7 +454,7 @@ private async void DocumentationTextblock_OnLinkClicked(object sender, LinkClick } } - private async void DocumentationTextblock_ImageResolving(object sender, ImageResolvingEventArgs e) + private async void DocumentationTextBlock_ImageResolving(object sender, ImageResolvingEventArgs e) { var deferral = e.GetDeferral(); BitmapImage image = null; @@ -597,8 +597,8 @@ private void ProcessSampleEditorTime() if (XamlCodeEditor.TimeSampleEditedFirst != DateTime.MinValue && XamlCodeEditor.TimeSampleEditedLast != DateTime.MinValue) { - int secondsEdditingSample = (int)Math.Floor((XamlCodeEditor.TimeSampleEditedLast - XamlCodeEditor.TimeSampleEditedFirst).TotalSeconds); - TrackingManager.TrackEvent("xamleditor", "edited", CurrentSample.Name, secondsEdditingSample); + int secondsEditingSample = (int)Math.Floor((XamlCodeEditor.TimeSampleEditedLast - XamlCodeEditor.TimeSampleEditedFirst).TotalSeconds); + TrackingManager.TrackEvent("xamleditor", "edited", CurrentSample.Name, secondsEditingSample); } else { diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Properties/Default.rd.xml b/Microsoft.Toolkit.Uwp.SampleApp/Properties/Default.rd.xml index 9073f54f3b3..31d776c7538 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Properties/Default.rd.xml +++ b/Microsoft.Toolkit.Uwp.SampleApp/Properties/Default.rd.xml @@ -12,7 +12,7 @@ Using the Namespace directive to apply reflection policy to all the types in a particular namespace - + --> @@ -22,8 +22,8 @@ the application package. The asterisks are not wildcards. --> - - + + diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushPage.xaml.cs index 742287ddd81..b77262dc5ec 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushPage.xaml.cs @@ -7,7 +7,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages { /// - /// A page that shows how to use the acrylic brushe. + /// A page that shows how to use the acrylic brush. /// public sealed partial class AcrylicBrushPage : Page { diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AdaptiveGridView/AdaptiveGridViewPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AdaptiveGridView/AdaptiveGridViewPage.xaml.cs index 58f48a11114..45e6f47a270 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AdaptiveGridView/AdaptiveGridViewPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AdaptiveGridView/AdaptiveGridViewPage.xaml.cs @@ -27,7 +27,7 @@ public AdaptiveGridViewPage() public async void OnXamlRendered(FrameworkElement control) { - _adaptiveGridViewControl = control.FindDescendantByName("AdaptiveGridViewcontrol") as AdaptiveGridView; + _adaptiveGridViewControl = control.FindDescendantByName("AdaptiveGridViewControl") as AdaptiveGridView; if (_adaptiveGridViewControl != null) { var allPhotos = await new Data.PhotosDataSource().GetItemsAsync(); diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/CameraPreview/CameraPreviewPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/CameraPreview/CameraPreviewPage.xaml.cs index 948c7d05de2..e4c011e89ab 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/CameraPreview/CameraPreviewPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/CameraPreview/CameraPreviewPage.xaml.cs @@ -38,7 +38,7 @@ public CameraPreviewPage() public async void OnXamlRendered(FrameworkElement control) { - // Using a semaphore lock for synchronocity. + // Using a semaphore lock for synchronicity. // This method gets called multiple times when accessing the page from Latest Pages // and creates unused duplicate references to Camera and memory leaks. await semaphoreSlim.WaitAsync(); diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs index cb35082fd6f..b9e543948a7 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs @@ -127,7 +127,7 @@ private void Load() SampleController.Current.RegisterNewCommand("Show notification with buttons (with DataTemplate)", (sender, args) => { _exampleVSCodeInAppNotification?.Dismiss(); - SetCustomControlTemplate(); // Use the custom template without the Dismiss button. The DataTemplate will handle readding it. + SetCustomControlTemplate(); // Use the custom template without the Dismiss button. The DataTemplate will handle re-adding it. object inAppNotificationWithButtonsTemplate = null; bool? isTemplatePresent = _resources?.TryGetValue("InAppNotificationWithButtonsTemplate", out inAppNotificationWithButtonsTemplate); diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TabView/TabViewPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TabView/TabViewPage.xaml.cs index 643fdcfb38c..74d9a3db253 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TabView/TabViewPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TabView/TabViewPage.xaml.cs @@ -58,7 +58,7 @@ private void Tabs_TabClosing(object sender, TabClosingEventArgs e) private void Tabs_TabDraggedOutside(object sender, TabDraggedOutsideEventArgs e) { // The sample app let's you drag items from a static TabView with TabViewItem's pre-defined. - // In the case of databound scenarios e.Item should be your data item, and e.Tab should always be the TabViewItem. + // In the case of data bound scenarios e.Item should be your data item, and e.Tab should always be the TabViewItem. var str = e.Item.ToString(); if (e.Tab != null) diff --git a/Microsoft.Toolkit.Uwp.Services/Services/Facebook/FacebookService.cs b/Microsoft.Toolkit.Uwp.Services/Services/Facebook/FacebookService.cs index 20ba5566eef..fb3bedd36aa 100644 --- a/Microsoft.Toolkit.Uwp.Services/Services/Facebook/FacebookService.cs +++ b/Microsoft.Toolkit.Uwp.Services/Services/Facebook/FacebookService.cs @@ -47,7 +47,7 @@ public FacebookService() } /// - /// Initialize underlying provider with relevent token information. + /// Initialize underlying provider with relevant token information. /// /// Token instance. /// List of required required permissions. public_profile and user_posts permissions will be used by default. @@ -63,7 +63,7 @@ public bool Initialize(FacebookOAuthTokens oAuthTokens, FacebookPermissions requ } /// - /// Initialize underlying provider with relevent token information. + /// Initialize underlying provider with relevant token information. /// /// Application ID (Provided by Facebook developer site) /// List of required required permissions. public_profile and user_posts permissions will be used by default. @@ -206,7 +206,7 @@ public Task> RequestAsync(FacebookDataConfig config, int maxR /// Strong type of model. /// FacebookDataConfig instance. /// Upper limit of records to return. - /// A comma seperated string of required fields, which will have strongly typed representation in the model passed in. + /// A comma separated string of required fields, which will have strongly typed representation in the model passed in. /// Strongly typed list of data returned from the service. public async Task> RequestAsync(FacebookDataConfig config, int maxRecords = 20, string fields = "id,message,from,created_time,link,full_picture") { @@ -247,7 +247,7 @@ public Task, Fa /// FacebookDataConfig instance. /// Upper limit of records to return. /// Upper limit of pages to return. - /// A comma seperated string of required fields, which will have strongly typed representation in the model passed in. + /// A comma separated string of required fields, which will have strongly typed representation in the model passed in. /// Strongly typed list of data returned from the service. public async Task, T>> RequestAsync(FacebookDataConfig config, int pageSize, int maxPages, string fields = "id,message,from,created_time,link,full_picture") { diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.cs b/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.cs index 7d0007ee480..4ecb6db00a5 100644 --- a/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.cs +++ b/Microsoft.Toolkit.Uwp.UI.Animations/Extensions/AnimationExtensions.cs @@ -21,7 +21,7 @@ public static partial class AnimationExtensions #pragma warning disable SA1008 // Opening parenthesis must be spaced correctly #pragma warning disable SA1009 // Closing parenthesis must be spaced correctly /// - /// A cached dictionary mapping easings to bezier control points + /// A cached dictionary mapping easings to bézier control points /// private static readonly Dictionary<(string, EasingMode), (Vector2, Vector2)> _compositionEasingFunctions = new Dictionary<(string, EasingMode), (Vector2, Vector2)>(); #pragma warning restore SA1009 // Closing parenthesis must be spaced correctly diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs index 2527c0fde1f..41acbb86571 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.Source.cs @@ -205,7 +205,7 @@ private async Task SetHttpSourceCustomCached(Uri imageUri) lock (LockObj) { - // If you have many imageEx in a virtualized listview for instance + // If you have many imageEx in a virtualized ListView for instance // controls will be recycled and the uri will change while waiting for the previous one to load if (_uri == imageUri) { diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs index 24bf75f92ee..80c2e695f82 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageExBase.cs @@ -127,7 +127,7 @@ protected void RemoveImageOpened(RoutedEventHandler handler) /// /// Attach image failed event handler /// - /// Excpetion Routed Event Handler + /// Exception Routed Event Handler protected void AttachImageFailed(ExceptionRoutedEventHandler handler) { var image = Image as Image; @@ -146,7 +146,7 @@ protected void AttachImageFailed(ExceptionRoutedEventHandler handler) /// /// Remove Image Failed handler /// - /// Excpetion Routed Event Handler + /// Exception Routed Event Handler protected void RemoveImageFailed(ExceptionRoutedEventHandler handler) { var image = Image as Image; diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/SymbolIconExtension.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/SymbolIconExtension.cs index a0faebb1557..95c5ddb4bf0 100644 --- a/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/SymbolIconExtension.cs +++ b/Microsoft.Toolkit.Uwp.UI/Extensions/Markup/SymbolIconExtension.cs @@ -8,7 +8,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Extensions { /// - /// Custom which can provide symbol-baased values. + /// Custom which can provide symbol-based values. /// [MarkupExtensionReturnType(ReturnType = typeof(FontIcon))] public class SymbolIconExtension : TextIconExtension diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/Media/ScaleTransformExtensions.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/Media/ScaleTransformExtensions.cs index fb16885049d..81282711ed6 100644 --- a/Microsoft.Toolkit.Uwp.UI/Extensions/Media/ScaleTransformExtensions.cs +++ b/Microsoft.Toolkit.Uwp.UI/Extensions/Media/ScaleTransformExtensions.cs @@ -15,7 +15,7 @@ public static class ScaleTransformExtensions /// Gets the matrix that represents this transform. /// Implements WPF's SkewTransform.Value. /// - /// Extended SkewTranform. + /// Extended SkewTransform. /// Matrix representing transform. public static Matrix GetMatrix(this ScaleTransform transform) { diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxRegEx/TextBoxRegex.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxRegEx/TextBoxRegex.cs index 3cc924678a9..e925c3ca131 100644 --- a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxRegEx/TextBoxRegex.cs +++ b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBoxRegEx/TextBoxRegex.cs @@ -15,105 +15,105 @@ namespace Microsoft.Toolkit.Uwp.UI.Extensions /// /// /// If is set to Normal then IsValid will be set according to whether the regex is valid. - /// If is set to Forced then IsValid will be set according to whether the regex is valid, when TextBox lose focus and in case the textbox is invalid clear its value. - /// If is set to Dynamic then IsValid will be set according to whether the regex is valid. If the newest charachter is invalid, only invalid character of the Textbox will be deleted. + /// If is set to Forced then IsValid will be set according to whether the regex is valid, when TextBox lose focus and in case the TextBox is invalid clear its value. + /// If is set to Dynamic then IsValid will be set according to whether the regex is valid. If the newest character is invalid, only invalid character of the TextBox will be deleted. /// public partial class TextBoxRegex { private static void TextBoxRegexPropertyOnChange(DependencyObject sender, DependencyPropertyChangedEventArgs e) { - var textbox = sender as TextBox; + var textBox = sender as TextBox; - if (textbox == null) + if (textBox == null) { return; } - ValidateTextBox(textbox, false); + ValidateTextBox(textBox, false); - textbox.Loaded -= Textbox_Loaded; - textbox.LostFocus -= Textbox_LostFocus; - textbox.TextChanged -= Textbox_TextChanged; - textbox.Loaded += Textbox_Loaded; - textbox.LostFocus += Textbox_LostFocus; - textbox.TextChanged += Textbox_TextChanged; + textBox.Loaded -= TextBox_Loaded; + textBox.LostFocus -= TextBox_LostFocus; + textBox.TextChanged -= TextBox_TextChanged; + textBox.Loaded += TextBox_Loaded; + textBox.LostFocus += TextBox_LostFocus; + textBox.TextChanged += TextBox_TextChanged; } - private static void Textbox_TextChanged(object sender, TextChangedEventArgs e) + private static void TextBox_TextChanged(object sender, TextChangedEventArgs e) { - var textbox = (TextBox)sender; - var validationMode = (ValidationMode)textbox.GetValue(ValidationModeProperty); - ValidateTextBox(textbox, validationMode == ValidationMode.Dynamic); + var textBox = (TextBox)sender; + var validationMode = (ValidationMode)textBox.GetValue(ValidationModeProperty); + ValidateTextBox(textBox, validationMode == ValidationMode.Dynamic); } - private static void Textbox_Loaded(object sender, RoutedEventArgs e) + private static void TextBox_Loaded(object sender, RoutedEventArgs e) { - var textbox = (TextBox)sender; - ValidateTextBox(textbox); + var textBox = (TextBox)sender; + ValidateTextBox(textBox); } - private static void Textbox_LostFocus(object sender, RoutedEventArgs e) + private static void TextBox_LostFocus(object sender, RoutedEventArgs e) { - var textbox = (TextBox)sender; - ValidateTextBox(textbox); + var textBox = (TextBox)sender; + ValidateTextBox(textBox); } - private static void ValidateTextBox(TextBox textbox, bool force = true) + private static void ValidateTextBox(TextBox textBox, bool force = true) { - var validationType = (ValidationType)textbox.GetValue(ValidationTypeProperty); + var validationType = (ValidationType)textBox.GetValue(ValidationTypeProperty); string regex; bool regexMatch; switch (validationType) { default: - regex = textbox.GetValue(RegexProperty) as string; + regex = textBox.GetValue(RegexProperty) as string; if (string.IsNullOrWhiteSpace(regex)) { Debug.WriteLine("Regex property can't be null or empty when custom mode is selected"); return; } - regexMatch = Regex.IsMatch(textbox.Text, regex); + regexMatch = Regex.IsMatch(textBox.Text, regex); break; case ValidationType.Decimal: - regexMatch = textbox.Text.IsDecimal(); + regexMatch = textBox.Text.IsDecimal(); break; case ValidationType.Email: - regexMatch = textbox.Text.IsEmail(); + regexMatch = textBox.Text.IsEmail(); break; case ValidationType.Number: - regexMatch = textbox.Text.IsNumeric(); + regexMatch = textBox.Text.IsNumeric(); break; case ValidationType.PhoneNumber: - regexMatch = textbox.Text.IsPhoneNumber(); + regexMatch = textBox.Text.IsPhoneNumber(); break; case ValidationType.Characters: - regexMatch = textbox.Text.IsCharacterString(); + regexMatch = textBox.Text.IsCharacterString(); break; } if (!regexMatch && force) { - if (!string.IsNullOrEmpty(textbox.Text)) + if (!string.IsNullOrEmpty(textBox.Text)) { - var validationModel = (ValidationMode)textbox.GetValue(ValidationModeProperty); + var validationModel = (ValidationMode)textBox.GetValue(ValidationModeProperty); if (validationModel == ValidationMode.Forced) { - textbox.Text = string.Empty; + textBox.Text = string.Empty; } else if (validationType != ValidationType.Email && validationType != ValidationType.PhoneNumber) { if (validationModel == ValidationMode.Dynamic) { - int selectionStart = textbox.SelectionStart == 0 ? textbox.SelectionStart : textbox.SelectionStart - 1; - textbox.Text = textbox.Text.Remove(selectionStart, 1); - textbox.SelectionStart = selectionStart; + int selectionStart = textBox.SelectionStart == 0 ? textBox.SelectionStart : textBox.SelectionStart - 1; + textBox.Text = textBox.Text.Remove(selectionStart, 1); + textBox.SelectionStart = selectionStart; } } } } - textbox.SetValue(IsValidProperty, regexMatch); + textBox.SetValue(IsValidProperty, regexMatch); } } } diff --git a/Microsoft.Toolkit.Uwp/Helpers/DeepLinkParser/DeepLinkParser.cs b/Microsoft.Toolkit.Uwp/Helpers/DeepLinkParser/DeepLinkParser.cs index ea127030465..5c858aeac00 100644 --- a/Microsoft.Toolkit.Uwp/Helpers/DeepLinkParser/DeepLinkParser.cs +++ b/Microsoft.Toolkit.Uwp/Helpers/DeepLinkParser/DeepLinkParser.cs @@ -98,10 +98,10 @@ protected DeepLinkParser(IActivatedEventArgs args) var launchArgs = args as ILaunchActivatedEventArgs; if (launchArgs == null) { - var protcolArgs = args as IProtocolActivatedEventArgs; - if (protcolArgs != null) + var protocolArgs = args as IProtocolActivatedEventArgs; + if (protocolArgs != null) { - ParseUriString(protcolArgs.Uri.OriginalString); + ParseUriString(protocolArgs.Uri.OriginalString); } else { diff --git a/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs index f8e78311c55..c226d512edb 100644 --- a/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs +++ b/Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs @@ -206,7 +206,7 @@ public static Task AwaitableRunAsync(this CoreDispatcher dispatcher, Func< throw new ArgumentNullException(nameof(function)); } - // Skip the dispatch, if posssible + // Skip the dispatch, if possible if (dispatcher.HasThreadAccess) { try @@ -240,7 +240,7 @@ public static Task AwaitableRunAsync(this CoreDispatcher dispatcher, Func< /// Extension method for . Offering an actual awaitable with optional result that will be executed on the given dispatcher. /// /// Dispatcher of a thread to run . - /// Asynchrounous function to be executed on the given dispatcher. + /// Asynchronous function to be executed on the given dispatcher. /// Dispatcher execution priority, default is normal. /// An awaitable for the operation. /// If the current thread has UI access, will be invoked directly. @@ -303,7 +303,7 @@ public static Task AwaitableRunAsync(this CoreDispatcher dispatcher, Func /// /// Returned data type of the function. /// Dispatcher of a thread to run . - /// Asynchrounous function to be executed asynchrounously on the given dispatcher. + /// Asynchronous function to be executed asynchronously on the given dispatcher. /// Dispatcher execution priority, default is normal. /// An awaitable for the operation. /// If the current thread has UI access, will be invoked directly. @@ -314,7 +314,7 @@ public static Task AwaitableRunAsync(this CoreDispatcher dispatcher, Func< throw new ArgumentNullException(nameof(function)); } - // Skip the dispatch, if posssible + // Skip the dispatch, if possible if (dispatcher.HasThreadAccess) { try diff --git a/Microsoft.Toolkit.Uwp/Helpers/DispatcherQueueHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/DispatcherQueueHelper.cs index 93f47ecc2f8..e752e17895a 100644 --- a/Microsoft.Toolkit.Uwp/Helpers/DispatcherQueueHelper.cs +++ b/Microsoft.Toolkit.Uwp/Helpers/DispatcherQueueHelper.cs @@ -114,7 +114,7 @@ public static Task ExecuteOnUIThreadAsync(this DispatcherQueue dispatcher, /// Extension method for . Offering an actual awaitable with optional result that will be executed on the given dispatcher. /// /// DispatcherQueue of a thread to run . - /// Asynchrounous function to be executed on the given dispatcher. + /// Asynchronous function to be executed on the given dispatcher. /// DispatcherQueue execution priority, default is normal. /// An awaitable for the operation. /// If the current thread has UI access, will be invoked directly. @@ -177,7 +177,7 @@ public static Task ExecuteOnUIThreadAsync(this DispatcherQueue dispatcher, Func< /// /// Returned data type of the function. /// DispatcherQueue of a thread to run . - /// Asynchrounous function to be executed asynchrounously on the given dispatcher. + /// Asynchronous function to be executed Asynchronously on the given dispatcher. /// DispatcherQueue execution priority, default is normal. /// An awaitable for the operation. /// If the current thread has UI access, will be invoked directly. diff --git a/Microsoft.Toolkit.Uwp/Helpers/RemoteDeviceHelper/RemoteDeviceHelper.cs b/Microsoft.Toolkit.Uwp/Helpers/RemoteDeviceHelper/RemoteDeviceHelper.cs index 1601ef903c5..f1190105639 100644 --- a/Microsoft.Toolkit.Uwp/Helpers/RemoteDeviceHelper/RemoteDeviceHelper.cs +++ b/Microsoft.Toolkit.Uwp/Helpers/RemoteDeviceHelper/RemoteDeviceHelper.cs @@ -44,7 +44,7 @@ public RemoteDeviceHelper(DispatcherQueue dispatcherQueue = null) /// /// Initializes a new instance of the class. /// - /// Initiate Enumeration with specific RemoteSysemKind with Filters + /// Initiate Enumeration with specific RemoteSystemKind with Filters /// The DispatcherQueue that should be used to dispatch UI updates, or null if this is being called from the UI thread. public RemoteDeviceHelper(List filter, DispatcherQueue dispatcherQueue = null) { @@ -62,7 +62,7 @@ public void GenerateSystems() } /// - /// Initiate Enumeration with specific RemoteSysemKind with Filters + /// Initiate Enumeration with specific RemoteSystemKind with Filters /// private async void GenerateSystemsWithFilterAsync(List filter) { diff --git a/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs b/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs index 9c5ffd40d32..72357b3f790 100644 --- a/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs +++ b/Microsoft.Toolkit.Uwp/Helpers/SystemInformation.cs @@ -117,7 +117,7 @@ public static async Task LaunchStoreForReviewAsync() /// /// Gets the first version of the app that was installed. - /// This will be the current version if a previous verison of the app was installed before accessing this property. + /// This will be the current version if a previous version of the app was installed before accessing this property. /// public PackageVersion FirstVersionInstalled { get; } @@ -166,11 +166,11 @@ public TimeSpan AppUptime { if (LaunchCount > 0) { - var subsessionLength = DateTime.UtcNow.Subtract(_sessionStart).Ticks; + var subSessionLength = DateTime.UtcNow.Subtract(_sessionStart).Ticks; var uptimeSoFar = _localObjectStorageHelper.Read(nameof(AppUptime)); - return new TimeSpan(uptimeSoFar + subsessionLength); + return new TimeSpan(uptimeSoFar + subSessionLength); } return TimeSpan.MinValue; @@ -245,11 +245,11 @@ private void UpdateVisibility(bool visible) } else { - var subsessionLength = DateTime.UtcNow.Subtract(_sessionStart).Ticks; + var subSessionLength = DateTime.UtcNow.Subtract(_sessionStart).Ticks; var uptimeSoFar = _localObjectStorageHelper.Read(nameof(AppUptime)); - _localObjectStorageHelper.Save(nameof(AppUptime), uptimeSoFar + subsessionLength); + _localObjectStorageHelper.Save(nameof(AppUptime), uptimeSoFar + subSessionLength); } } diff --git a/Microsoft.Toolkit.Uwp/IncrementalLoadingCollection/IncrementalLoadingCollection.cs b/Microsoft.Toolkit.Uwp/IncrementalLoadingCollection/IncrementalLoadingCollection.cs index 2f694f3afa1..44871dde607 100644 --- a/Microsoft.Toolkit.Uwp/IncrementalLoadingCollection/IncrementalLoadingCollection.cs +++ b/Microsoft.Toolkit.Uwp/IncrementalLoadingCollection/IncrementalLoadingCollection.cs @@ -41,7 +41,7 @@ public class IncrementalLoadingCollection : ObservableCollection public Action OnEndLoading { get; set; } /// - /// Gets or sets an that is called if an error occours during data retrieval. The actual is passed as an argument. + /// Gets or sets an that is called if an error occurs during data retrieval. The actual is passed as an argument. /// public Action OnError { get; set; } @@ -132,7 +132,7 @@ private set /// An that is called when a retrieval operation ends. /// /// - /// An that is called if an error occours during data retrieval. + /// An that is called if an error occurs during data retrieval. /// /// public IncrementalLoadingCollection(int itemsPerPage = 20, Action onStartLoading = null, Action onEndLoading = null, Action onError = null) @@ -156,7 +156,7 @@ public IncrementalLoadingCollection(int itemsPerPage = 20, Action onStartLoading /// An that is called when a retrieval operation ends. /// /// - /// An that is called if an error occours during data retrieval. + /// An that is called if an error occurs during data retrieval. /// /// public IncrementalLoadingCollection(TSource source, int itemsPerPage = 20, Action onStartLoading = null, Action onEndLoading = null, Action onError = null) diff --git a/Microsoft.Toolkit/Extensions/StringExtensions.cs b/Microsoft.Toolkit/Extensions/StringExtensions.cs index 9192cb6810c..5e81855f128 100644 --- a/Microsoft.Toolkit/Extensions/StringExtensions.cs +++ b/Microsoft.Toolkit/Extensions/StringExtensions.cs @@ -27,7 +27,7 @@ public static class StringExtensions /// /// Regular expression for matching an email address. /// - /// General Email Regex (RFC 5322 Official Standard) from emailregex.com. + /// General Email Regex (RFC 5322 Official Standard) from https://emailregex.com. internal const string EmailRegex = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"; /// diff --git a/Microsoft.Toolkit/Helpers/NotifyTaskCompletion.cs b/Microsoft.Toolkit/Helpers/NotifyTaskCompletion.cs index 515edb45b9b..0f9fb1f0610 100644 --- a/Microsoft.Toolkit/Helpers/NotifyTaskCompletion.cs +++ b/Microsoft.Toolkit/Helpers/NotifyTaskCompletion.cs @@ -9,7 +9,7 @@ namespace Microsoft.Toolkit.Helpers { /// - /// Helper class to wrap around a Task to provide more information usable for UI databinding scenarios. As discussed in MSDN Magazine: https://msdn.microsoft.com/magazine/dn605875. + /// Helper class to wrap around a Task to provide more information usable for UI data binding scenarios. As discussed in MSDN Magazine: https://msdn.microsoft.com/magazine/dn605875. /// /// Type of result returned by task. [Obsolete("This helper will be removed in a future release, use the ObservableObject base class from Microsoft.Toolkit.Mvvm and the SetAndNotifyOnCompletion method")] diff --git a/UnitTests/UnitTests.Notifications.UWP/Properties/UnitTestApp.rd.xml b/UnitTests/UnitTests.Notifications.UWP/Properties/UnitTestApp.rd.xml index efee59d2788..c58aac08178 100644 --- a/UnitTests/UnitTests.Notifications.UWP/Properties/UnitTestApp.rd.xml +++ b/UnitTests/UnitTests.Notifications.UWP/Properties/UnitTestApp.rd.xml @@ -12,7 +12,7 @@ Using the Namespace directive to apply reflection policy to all the types in a particular namespace - + --> diff --git a/UnitTests/UnitTests.Notifications.WinRT/Properties/UnitTestApp.rd.xml b/UnitTests/UnitTests.Notifications.WinRT/Properties/UnitTestApp.rd.xml index efee59d2788..c58aac08178 100644 --- a/UnitTests/UnitTests.Notifications.WinRT/Properties/UnitTestApp.rd.xml +++ b/UnitTests/UnitTests.Notifications.WinRT/Properties/UnitTestApp.rd.xml @@ -12,7 +12,7 @@ Using the Namespace directive to apply reflection policy to all the types in a particular namespace - + --> diff --git a/UnitTests/UnitTests.Shared/Collections/ObservableGroupedCollectionExtensionsTests.cs b/UnitTests/UnitTests.Shared/Collections/ObservableGroupedCollectionExtensionsTests.cs index 78e99abce61..a93ed45032e 100644 --- a/UnitTests/UnitTests.Shared/Collections/ObservableGroupedCollectionExtensionsTests.cs +++ b/UnitTests/UnitTests.Shared/Collections/ObservableGroupedCollectionExtensionsTests.cs @@ -284,7 +284,7 @@ public void AddItem_WhenSeveralTargetGroupsAlreadyExist_ShouldAddItemToFirstExis [TestCategory("Collections")] [TestMethod] - public void InsertItem_WhenGroupDoesNotExist_ShoudThrow() + public void InsertItem_WhenGroupDoesNotExist_ShouldThrow() { var groupedCollection = new ObservableGroupedCollection(); groupedCollection.AddGroup("A", 1, 2, 3); @@ -298,7 +298,7 @@ public void InsertItem_WhenGroupDoesNotExist_ShoudThrow() [DataTestMethod] [DataRow(-1)] [DataRow(4)] - public void InsertItem_WhenIndexOutOfRange_ShoudThrow(int index) + public void InsertItem_WhenIndexOutOfRange_ShouldThrow(int index) { var groupedCollection = new ObservableGroupedCollection(); groupedCollection.AddGroup("A", 1, 2, 3); @@ -340,7 +340,7 @@ public void InsertItem_WithValidIndex_WithSeveralGroups_ShoudInsertItemInFirstGr [TestCategory("Collections")] [TestMethod] - public void SetItem_WhenGroupDoesNotExist_ShoudThrow() + public void SetItem_WhenGroupDoesNotExist_ShouldThrow() { var groupedCollection = new ObservableGroupedCollection(); groupedCollection.AddGroup("A", 1, 2, 3); @@ -354,7 +354,7 @@ public void SetItem_WhenGroupDoesNotExist_ShoudThrow() [DataTestMethod] [DataRow(-1)] [DataRow(3)] - public void SetItem_WhenIndexOutOfRange_ShoudThrow(int index) + public void SetItem_WhenIndexOutOfRange_ShouldThrow(int index) { var groupedCollection = new ObservableGroupedCollection(); groupedCollection.AddGroup("A", 1, 2, 3); @@ -369,7 +369,7 @@ public void SetItem_WhenIndexOutOfRange_ShoudThrow(int index) [DataRow(0, new[] { 23, 2, 3 })] [DataRow(1, new[] { 1, 23, 3 })] [DataRow(2, new[] { 1, 2, 23 })] - public void SetItem_WithValidIndex_WithSeveralGroups_ShoudReplaceItemInFirstGroup(int index, int[] expecteGroupValues) + public void SetItem_WithValidIndex_WithSeveralGroups_ShouldReplaceItemInFirstGroup(int index, int[] expectedGroupValues) { var groupedCollection = new ObservableGroupedCollection(); groupedCollection.AddGroup("A", 4, 5); @@ -387,7 +387,7 @@ public void SetItem_WithValidIndex_WithSeveralGroups_ShoudReplaceItemInFirstGrou groupedCollection.ElementAt(1).Key.Should().Be("B"); groupedCollection.ElementAt(1).Should().HaveCount(3); - groupedCollection.ElementAt(1).Should().ContainInOrder(expecteGroupValues); + groupedCollection.ElementAt(1).Should().ContainInOrder(expectedGroupValues); groupedCollection.ElementAt(2).Key.Should().Be("B"); groupedCollection.ElementAt(2).Should().HaveCount(2); diff --git a/UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.Array.cs b/UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.Array.cs index c7dee14f272..fcb7181273f 100644 --- a/UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.Array.cs +++ b/UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.Array.cs @@ -88,9 +88,9 @@ public void Test_Guard_HasSizeGreaterThan_ArrayEqualFail() [TestCategory("Guard")] [TestMethod] [ExpectedException(typeof(ArgumentException))] - public void Test_Guard_HasSizeGreaterThan_ArraSmallerFail() + public void Test_Guard_HasSizeGreaterThan_ArraySmallerFail() { - Guard.HasSizeGreaterThan(new int[1], 4, nameof(Test_Guard_HasSizeGreaterThan_ArraSmallerFail)); + Guard.HasSizeGreaterThan(new int[1], 4, nameof(Test_Guard_HasSizeGreaterThan_ArraySmallerFail)); } [TestCategory("Guard")] diff --git a/UnitTests/UnitTests.UWP/Extensions/Test_EnumValuesExtension.cs b/UnitTests/UnitTests.UWP/Extensions/Test_EnumValuesExtension.cs index a46f6f7b864..cfd9b1a1406 100644 --- a/UnitTests/UnitTests.UWP/Extensions/Test_EnumValuesExtension.cs +++ b/UnitTests/UnitTests.UWP/Extensions/Test_EnumValuesExtension.cs @@ -19,7 +19,7 @@ public class Test_EnumValuesExtension [UITestMethod] public void Test_EnumValuesExtension_MarkupExtension() { - var treeroot = XamlReader.Load(@" ") as FrameworkElement; - var list = treeroot.FindChildByName("Check") as ListView; + var list = treeRoot.FindChildByName("Check") as ListView; - Assert.IsNotNull(list, "Could not find listview control in tree."); + Assert.IsNotNull(list, "Could not find ListView control in tree."); Animal[] items = list.ItemsSource as Animal[]; diff --git a/UnitTests/UnitTests.UWP/Extensions/Test_FontIconSourceExtensionMarkupExtension.cs b/UnitTests/UnitTests.UWP/Extensions/Test_FontIconSourceExtensionMarkupExtension.cs index 0a35c561b15..a2aa7f2a1fc 100644 --- a/UnitTests/UnitTests.UWP/Extensions/Test_FontIconSourceExtensionMarkupExtension.cs +++ b/UnitTests/UnitTests.UWP/Extensions/Test_FontIconSourceExtensionMarkupExtension.cs @@ -20,7 +20,7 @@ public class Test_FontIconSourceExtensionMarkupExtension [UITestMethod] public void Test_FontIconSourceExtension_MarkupExtension_ProvideSegoeMdl2Asset() { - var treeroot = XamlReader.Load(@" ") as FrameworkElement; - var button = treeroot.FindChildByName("Check") as MockSwipeItem; + var button = treeRoot.FindChildByName("Check") as MockSwipeItem; Assert.IsNotNull(button, $"Could not find the {nameof(MockSwipeItem)} control in tree."); @@ -44,7 +44,7 @@ public void Test_FontIconSourceExtension_MarkupExtension_ProvideSegoeMdl2Asset() [UITestMethod] public void Test_FontIconSourceExtension_MarkupExtension_ProvideSegoeUI() { - var treeroot = XamlReader.Load(@" ") as FrameworkElement; - var button = treeroot.FindChildByName("Check") as MockSwipeItem; + var button = treeRoot.FindChildByName("Check") as MockSwipeItem; Assert.IsNotNull(button, $"Could not find the {nameof(MockSwipeItem)} control in tree."); @@ -68,7 +68,7 @@ public void Test_FontIconSourceExtension_MarkupExtension_ProvideSegoeUI() [UITestMethod] public void Test_FontIconSourceExtension_MarkupExtension_ProvideCustomFontIcon() { - var treeroot = XamlReader.Load(@" ") as FrameworkElement; - var button = treeroot.FindChildByName("Check") as MockSwipeItem; + var button = treeRoot.FindChildByName("Check") as MockSwipeItem; Assert.IsNotNull(button, $"Could not find the {nameof(MockSwipeItem)} control in tree."); diff --git a/UnitTests/UnitTests.UWP/PrivateType.cs b/UnitTests/UnitTests.UWP/PrivateType.cs index 1db00eea621..9de773fb09b 100644 --- a/UnitTests/UnitTests.UWP/PrivateType.cs +++ b/UnitTests/UnitTests.UWP/PrivateType.cs @@ -68,7 +68,7 @@ public PrivateType(Type type) /// Invokes static member /// /// Name of the member to InvokeHelper - /// Arguements to the invoction + /// Arguments to the invocation /// Result of invocation public object InvokeStatic(string name, params object[] args) { @@ -80,7 +80,7 @@ public object InvokeStatic(string name, params object[] args) /// /// Name of the member to InvokeHelper /// An array of objects representing the number, order, and type of the parameters for the method to invoke - /// Arguements to the invoction + /// Arguments to the invocation /// Result of invocation public object InvokeStatic(string name, Type[] parameterTypes, object[] args) { @@ -92,7 +92,7 @@ public object InvokeStatic(string name, Type[] parameterTypes, object[] args) /// /// Name of the member to InvokeHelper /// An array of objects representing the number, order, and type of the parameters for the method to invoke - /// Arguements to the invoction + /// Arguments to the invocation /// An array of types corresponding to the types of the generic arguments. /// Result of invocation public object InvokeStatic(string name, Type[] parameterTypes, object[] args, Type[] typeArguments) @@ -104,7 +104,7 @@ public object InvokeStatic(string name, Type[] parameterTypes, object[] args, Ty /// Invokes the static method /// /// Name of the member - /// Arguements to the invocation + /// Arguments to the invocation /// Culture /// Result of invocation public object InvokeStatic(string name, object[] args, CultureInfo culture) @@ -117,7 +117,7 @@ public object InvokeStatic(string name, object[] args, CultureInfo culture) /// /// Name of the member /// An array of objects representing the number, order, and type of the parameters for the method to invoke - /// Arguements to the invocation + /// Arguments to the invocation /// Culture info /// Result of invocation public object InvokeStatic(string name, Type[] parameterTypes, object[] args, CultureInfo culture) @@ -130,7 +130,7 @@ public object InvokeStatic(string name, Type[] parameterTypes, object[] args, Cu /// /// Name of the member /// Additional invocation attributes - /// Arguements to the invocation + /// Arguments to the invocation /// Result of invocation public object InvokeStatic(string name, BindingFlags bindingFlags, params object[] args) { @@ -143,7 +143,7 @@ public object InvokeStatic(string name, BindingFlags bindingFlags, params object /// Name of the member /// Additional invocation attributes /// An array of objects representing the number, order, and type of the parameters for the method to invoke - /// Arguements to the invocation + /// Arguments to the invocation /// Result of invocation public object InvokeStatic(string name, BindingFlags bindingFlags, Type[] parameterTypes, object[] args) { @@ -155,7 +155,7 @@ public object InvokeStatic(string name, BindingFlags bindingFlags, Type[] parame /// /// Name of the member /// Additional invocation attributes - /// Arguements to the invocation + /// Arguments to the invocation /// Culture /// Result of invocation public object InvokeStatic(string name, BindingFlags bindingFlags, object[] args, CultureInfo culture) @@ -169,7 +169,7 @@ public object InvokeStatic(string name, BindingFlags bindingFlags, object[] args /// Name of the member /// Additional invocation attributes /// /// An array of objects representing the number, order, and type of the parameters for the method to invoke - /// Arguements to the invocation + /// Arguments to the invocation /// Culture /// Result of invocation public object InvokeStatic(string name, BindingFlags bindingFlags, Type[] parameterTypes, object[] args, CultureInfo culture) @@ -183,7 +183,7 @@ public object InvokeStatic(string name, BindingFlags bindingFlags, Type[] parame /// Name of the member /// Additional invocation attributes /// /// An array of objects representing the number, order, and type of the parameters for the method to invoke - /// Arguements to the invocation + /// Arguments to the invocation /// Culture /// An array of types corresponding to the types of the generic arguments. /// Result of invocation @@ -241,7 +241,7 @@ public object GetStaticArrayElement(string name, params int[] indices) } /// - /// Sets the memeber of the static array + /// Sets the member of the static array /// /// Name of the array /// value to set @@ -255,7 +255,7 @@ public void SetStaticArrayElement(string name, object value, params int[] indice } /// - /// Gets the element in satatic array + /// Gets the element in static array /// /// Name of the array /// Additional InvokeHelper attributes @@ -263,7 +263,7 @@ public void SetStaticArrayElement(string name, object value, params int[] indice /// A one-dimensional array of 32-bit integers that represent the indexes specifying /// the position of the element to get. For instance, to access a[10][11] the array would be {10,11} /// - /// element at the spcified location + /// element at the specified location public object GetStaticArrayElement(string name, BindingFlags bindingFlags, params int[] indices) { Array arr = (Array)this.InvokeHelperStatic(name, BindingFlags.GetField | BindingFlags.GetProperty | bindingFlags, null, CultureInfo.InvariantCulture); @@ -271,7 +271,7 @@ public object GetStaticArrayElement(string name, BindingFlags bindingFlags, para } /// - /// Sets the memeber of the static array + /// Sets the member of the static array /// /// Name of the array /// Additional InvokeHelper attributes @@ -300,7 +300,7 @@ public object GetStaticField(string name) /// Sets the static field /// /// Name of the field - /// Arguement to the invocation + /// Arguments to the invocation public void SetStaticField(string name, object value) { this.SetStaticField(name, BindToEveryThing, value); @@ -322,7 +322,7 @@ public object GetStaticField(string name, BindingFlags bindingFlags) /// /// Name of the field /// Additional InvokeHelper attributes - /// Arguement to the invocation + /// Arguments to the invocation public void SetStaticField(string name, BindingFlags bindingFlags, object value) { this.InvokeHelperStatic(name, BindingFlags.SetField | bindingFlags | BindingFlags.Static, new[] { value }, CultureInfo.InvariantCulture); @@ -374,7 +374,7 @@ public void SetStaticFieldOrProperty(string name, BindingFlags bindingFlags, obj /// Gets the static property /// /// Name of the field or property - /// Arguements to the invocation + /// Arguments to the invocation /// The static property. public object GetStaticProperty(string name, params object[] args) { @@ -489,7 +489,7 @@ public void SetStaticProperty(string name, BindingFlags bindingFlags, object val /// /// Name of the member /// Additional invocation attributes - /// Arguements to the invocation + /// Arguments to the invocation /// Culture /// Result of invocation private object InvokeHelperStatic(string name, BindingFlags bindingFlags, object[] args, CultureInfo culture) diff --git a/UnitTests/UnitTests.UWP/Properties/UnitTestApp.rd.xml b/UnitTests/UnitTests.UWP/Properties/UnitTestApp.rd.xml index 98511bbba74..50999352cde 100644 --- a/UnitTests/UnitTests.UWP/Properties/UnitTestApp.rd.xml +++ b/UnitTests/UnitTests.UWP/Properties/UnitTestApp.rd.xml @@ -12,7 +12,7 @@ Using the Namespace directive to apply reflection policy to all the types in a particular namespace - + --> diff --git a/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_General.cs b/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_General.cs index 3c4c0c235ab..4822631c3d3 100644 --- a/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_General.cs +++ b/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_General.cs @@ -18,7 +18,7 @@ public class Test_TokenizingTextBox_General [UITestMethod] public void Test_Clear() { - var treeroot = XamlReader.Load( + var treeRoot = XamlReader.Load( @"") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var tokenBox = treeroot.FindChildByName("tokenboxname") as TokenizingTextBox; + var tokenBox = treeRoot.FindChildByName("tokenboxname") as TokenizingTextBox; Assert.IsNotNull(tokenBox, "Could not find TokenizingTextBox in tree."); diff --git a/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_InterspersedCollection.cs b/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_InterspersedCollection.cs index 140e6ec5fde..1f489e23eb4 100644 --- a/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_InterspersedCollection.cs +++ b/UnitTests/UnitTests.UWP/UI/Controls/Test_TokenizingTextBox_InterspersedCollection.cs @@ -129,7 +129,7 @@ public void TestIndexMappingOuterBounds() #endif /// - /// Tests the mapping indicies of the projected outer collection back to the inner source. + /// Tests the mapping indices of the projected outer collection back to the inner source. /// [TestMethod] public void TestIndexMappingInner() @@ -150,7 +150,7 @@ public void TestIndexMappingInner() } /// - /// Tests the mapping indicies of the projected outer collection back to the inner source. + /// Tests the mapping indices of the projected outer collection back to the inner source. /// [TestMethod] public void TestIndexMappingInnerDifferentOrder() @@ -176,7 +176,7 @@ public void TestIndexMappingInnerDifferentOrder() #if DEBUG /// - /// Tests the mapping indicies of the projected outer collection back to the inner source. + /// Tests the mapping indices of the projected outer collection back to the inner source. /// [TestMethod] public void TestIndexMappingInnerBounds() @@ -265,7 +265,7 @@ public void TestMoveKeysBackwardAdjacentNearPivot() CollectionAssert.AreEqual(new object[] { "1", "2", 3 }, ioc, string.Format("Collection not as expected, received {0}", ioc.ToArray().ToArrayString())); Assert.AreEqual(0, ioc.IndexOf("1"), "Key didn't move backwards."); - Assert.AreEqual(1, ioc.IndexOf("2"), "Key didn't move backwards (2)."); + Assert.AreEqual(1, ioc.IndexOf("2"), "Key didn't move backwards (2)."); } [TestMethod] @@ -316,7 +316,7 @@ public void TestBasicInsertionEnumeration() } [TestMethod] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:Opening parenthesis should be spaced correctly", Justification = "Alignment/readibility")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:Opening parenthesis should be spaced correctly", Justification = "Alignment/readability")] public void TestBasicIndexing() { var originalSource = new List(new object[] { 1, 3, 5 }); diff --git a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_AutoLayout.cs b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_AutoLayout.cs index c486dbc7eb8..b24c51b2439 100644 --- a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_AutoLayout.cs +++ b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_AutoLayout.cs @@ -21,7 +21,7 @@ public class Test_UniformGrid_AutoLayout [UITestMethod] public void Test_UniformGrid_AutoLayout_FixedElementSingle() { - var treeroot = XamlReader.Load(@" @@ -49,9 +49,9 @@ public void Test_UniformGrid_AutoLayout_FixedElementSingle() (2, 1) }; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -82,7 +82,7 @@ public void Test_UniformGrid_AutoLayout_FixedElementSingle() [UITestMethod] public void Test_UniformGrid_AutoLayout_FixedElementZeroZeroSpecial() { - var treeroot = XamlReader.Load(@" (2, 1) }; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -144,7 +144,7 @@ Otherwise we can't tell it apart from the other items. --> [UITestMethod] public void Test_UniformGrid_AutoLayout_FixedElementSquare() { - var treeroot = XamlReader.Load(@" @@ -174,9 +174,9 @@ public void Test_UniformGrid_AutoLayout_FixedElementSquare() (2, 3) }; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -204,7 +204,7 @@ public void Test_UniformGrid_AutoLayout_FixedElementSquare() [UITestMethod] public void Test_UniformGrid_AutoLayout_VerticalElement_FixedPosition() { - var treeroot = XamlReader.Load(@" @@ -220,9 +220,9 @@ public void Test_UniformGrid_AutoLayout_VerticalElement_FixedPosition() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -232,14 +232,14 @@ public void Test_UniformGrid_AutoLayout_VerticalElement_FixedPosition() grid.Measure(new Size(1000, 1000)); - var border = treeroot.FindChildByName("OurItem") as Border; + var border = treeRoot.FindChildByName("OurItem") as Border; Assert.IsNotNull(border, "Could not find our item to test."); Assert.AreEqual(1, Grid.GetRow(border)); Assert.AreEqual(1, Grid.GetColumn(border)); - var border2 = treeroot.FindChildByName("Shifted") as Border; + var border2 = treeRoot.FindChildByName("Shifted") as Border; Assert.IsNotNull(border2, "Could not find shifted item to test."); @@ -251,7 +251,7 @@ public void Test_UniformGrid_AutoLayout_VerticalElement_FixedPosition() [UITestMethod] public void Test_UniformGrid_AutoLayout_VerticalElement() { - var treeroot = XamlReader.Load(@" @@ -267,9 +267,9 @@ public void Test_UniformGrid_AutoLayout_VerticalElement() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -279,14 +279,14 @@ public void Test_UniformGrid_AutoLayout_VerticalElement() grid.Measure(new Size(1000, 1000)); - var border = treeroot.FindChildByName("OurItem") as Border; + var border = treeRoot.FindChildByName("OurItem") as Border; Assert.IsNotNull(border, "Could not find our item to test."); Assert.AreEqual(1, Grid.GetRow(border)); Assert.AreEqual(1, Grid.GetColumn(border)); - var border2 = treeroot.FindChildByName("Shifted") as Border; + var border2 = treeRoot.FindChildByName("Shifted") as Border; Assert.IsNotNull(border2, "Could not find shifted item to test."); @@ -298,7 +298,7 @@ public void Test_UniformGrid_AutoLayout_VerticalElement() [UITestMethod] public void Test_UniformGrid_AutoLayout_HorizontalElement() { - var treeroot = XamlReader.Load(@" @@ -314,9 +314,9 @@ public void Test_UniformGrid_AutoLayout_HorizontalElement() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -326,14 +326,14 @@ public void Test_UniformGrid_AutoLayout_HorizontalElement() grid.Measure(new Size(1000, 1000)); - var border = treeroot.FindChildByName("OurItem") as Border; + var border = treeRoot.FindChildByName("OurItem") as Border; Assert.IsNotNull(border, "Could not find our item to test."); Assert.AreEqual(0, Grid.GetRow(border)); Assert.AreEqual(1, Grid.GetColumn(border)); - var border2 = treeroot.FindChildByName("Shifted") as Border; + var border2 = treeRoot.FindChildByName("Shifted") as Border; Assert.IsNotNull(border2, "Could not find shifted item to test."); @@ -345,7 +345,7 @@ public void Test_UniformGrid_AutoLayout_HorizontalElement() [UITestMethod] public void Test_UniformGrid_AutoLayout_LargeElement() { - var treeroot = XamlReader.Load(@" @@ -369,9 +369,9 @@ public void Test_UniformGrid_AutoLayout_LargeElement() (2, 2), }; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -393,7 +393,7 @@ public void Test_UniformGrid_AutoLayout_LargeElement() [UITestMethod] public void Test_UniformGrid_AutoLayout_HorizontalElement_FixedPosition() { - var treeroot = XamlReader.Load(@" @@ -409,9 +409,9 @@ public void Test_UniformGrid_AutoLayout_HorizontalElement_FixedPosition() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -421,14 +421,14 @@ public void Test_UniformGrid_AutoLayout_HorizontalElement_FixedPosition() grid.Measure(new Size(1000, 1000)); - var border = treeroot.FindChildByName("OurItem") as Border; + var border = treeRoot.FindChildByName("OurItem") as Border; Assert.IsNotNull(border, "Could not find our item to test."); Assert.AreEqual(1, Grid.GetRow(border)); Assert.AreEqual(1, Grid.GetColumn(border)); - var border2 = treeroot.FindChildByName("Shifted") as Border; + var border2 = treeRoot.FindChildByName("Shifted") as Border; Assert.IsNotNull(border2, "Could not find shifted item to test."); diff --git a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_Dimensions.cs b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_Dimensions.cs index db58e683413..a8e43606e31 100644 --- a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_Dimensions.cs +++ b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_Dimensions.cs @@ -19,7 +19,7 @@ public class Test_UniformGrid_Dimensions [UITestMethod] public void Test_UniformGrid_GetDimensions_NoElements() { - var treeroot = XamlReader.Load(@" @@ -27,9 +27,9 @@ public void Test_UniformGrid_GetDimensions_NoElements() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -47,7 +47,7 @@ public void Test_UniformGrid_GetDimensions_NoElements() [UITestMethod] public void Test_UniformGrid_GetDimensions_AllVisible() { - var treeroot = XamlReader.Load(@" @@ -63,9 +63,9 @@ public void Test_UniformGrid_GetDimensions_AllVisible() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -83,7 +83,7 @@ public void Test_UniformGrid_GetDimensions_AllVisible() [UITestMethod] public void Test_UniformGrid_GetDimensions_SomeVisible() { - var treeroot = XamlReader.Load(@" @@ -99,9 +99,9 @@ public void Test_UniformGrid_GetDimensions_SomeVisible() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -124,7 +124,7 @@ public void Test_UniformGrid_GetDimensions_SomeVisible() [UITestMethod] public void Test_UniformGrid_GetDimensions_FirstColumn() { - var treeroot = XamlReader.Load(@" @@ -140,9 +140,9 @@ public void Test_UniformGrid_GetDimensions_FirstColumn() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -160,7 +160,7 @@ public void Test_UniformGrid_GetDimensions_FirstColumn() [UITestMethod] public void Test_UniformGrid_GetDimensions_ElementLarger() { - var treeroot = XamlReader.Load(@" @@ -176,9 +176,9 @@ public void Test_UniformGrid_GetDimensions_ElementLarger() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); @@ -196,7 +196,7 @@ public void Test_UniformGrid_GetDimensions_ElementLarger() [UITestMethod] public void Test_UniformGrid_GetDimensions_FirstColumnEqualsColumns() { - var treeroot = XamlReader.Load(@" @@ -211,9 +211,9 @@ public void Test_UniformGrid_GetDimensions_FirstColumnEqualsColumns() ") as FrameworkElement; - Assert.IsNotNull(treeroot, "Could not load XAML tree."); + Assert.IsNotNull(treeRoot, "Could not load XAML tree."); - var grid = treeroot.FindChildByName("UniformGrid") as UniformGrid; + var grid = treeRoot.FindChildByName("UniformGrid") as UniformGrid; Assert.IsNotNull(grid, "Could not find UniformGrid in tree."); diff --git a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_FreeSpots.cs b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_FreeSpots.cs index 60069fe0759..1a22e5c0780 100644 --- a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_FreeSpots.cs +++ b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_FreeSpots.cs @@ -17,7 +17,7 @@ public class Test_UniformGrid_FreeSpots [UITestMethod] public void Test_UniformGrid_GetFreeSpots_Basic() { - var testref = new TakenSpotsReferenceHolder(new bool[4, 5] + var testRef = new TakenSpotsReferenceHolder(new bool[4, 5] { { false, true, false, true, false }, { false, true, true, true, false }, @@ -25,7 +25,7 @@ public void Test_UniformGrid_GetFreeSpots_Basic() { false, false, true, false, false }, }); - var results = UniformGrid.GetFreeSpot(testref, 0, false).ToArray(); + var results = UniformGrid.GetFreeSpot(testRef, 0, false).ToArray(); var expected = new (int row, int column)[] { @@ -47,7 +47,7 @@ public void Test_UniformGrid_GetFreeSpots_Basic() [UITestMethod] public void Test_UniformGrid_GetFreeSpots_FirstColumn() { - var testref = new TakenSpotsReferenceHolder(new bool[4, 5] + var testRef = new TakenSpotsReferenceHolder(new bool[4, 5] { { true, false, false, true, false }, { false, true, true, true, false }, @@ -55,7 +55,7 @@ public void Test_UniformGrid_GetFreeSpots_FirstColumn() { false, false, true, false, false }, }); - var results = UniformGrid.GetFreeSpot(testref, 2, false).ToArray(); + var results = UniformGrid.GetFreeSpot(testRef, 2, false).ToArray(); var expected = new (int row, int column)[] { @@ -77,14 +77,14 @@ public void Test_UniformGrid_GetFreeSpots_FirstColumn() [UITestMethod] public void Test_UniformGrid_GetFreeSpots_FirstColumnEndBoundMinusOne() { - var testref = new TakenSpotsReferenceHolder(new bool[3, 3] + var testRef = new TakenSpotsReferenceHolder(new bool[3, 3] { { false, false, false }, { false, false, false }, { false, false, false }, }); - var results = UniformGrid.GetFreeSpot(testref, 2, false).ToArray(); + var results = UniformGrid.GetFreeSpot(testRef, 2, false).ToArray(); var expected = new (int row, int column)[] { @@ -105,14 +105,14 @@ public void Test_UniformGrid_GetFreeSpots_FirstColumnEndBoundMinusOne() [UITestMethod] public void Test_UniformGrid_GetFreeSpots_FirstColumnEndBound() { - var testref = new TakenSpotsReferenceHolder(new bool[3, 3] + var testRef = new TakenSpotsReferenceHolder(new bool[3, 3] { { false, false, false }, { false, false, false }, { false, false, false }, }); - var results = UniformGrid.GetFreeSpot(testref, 3, false).ToArray(); + var results = UniformGrid.GetFreeSpot(testRef, 3, false).ToArray(); var expected = new (int row, int column)[] { @@ -133,14 +133,14 @@ public void Test_UniformGrid_GetFreeSpots_FirstColumnEndBound() [UITestMethod] public void Test_UniformGrid_GetFreeSpots_FirstColumnEndBound_TopDown() { - var testref = new TakenSpotsReferenceHolder(new bool[3, 3] + var testRef = new TakenSpotsReferenceHolder(new bool[3, 3] { { false, false, false }, { false, false, false }, { false, false, false }, }); - var results = UniformGrid.GetFreeSpot(testref, 3, true).ToArray(); + var results = UniformGrid.GetFreeSpot(testRef, 3, true).ToArray(); var expected = new (int row, int column)[] { @@ -161,7 +161,7 @@ public void Test_UniformGrid_GetFreeSpots_FirstColumnEndBound_TopDown() [UITestMethod] public void Test_UniformGrid_GetFreeSpots_VerticalOrientation() { - var testref = new TakenSpotsReferenceHolder(new bool[4, 5] + var testRef = new TakenSpotsReferenceHolder(new bool[4, 5] { { false, false, false, true, false }, { false, true, true, false, false }, @@ -169,7 +169,7 @@ public void Test_UniformGrid_GetFreeSpots_VerticalOrientation() { false, false, true, false, false }, }); - var results = UniformGrid.GetFreeSpot(testref, 0, true).ToArray(); + var results = UniformGrid.GetFreeSpot(testRef, 0, true).ToArray(); // top-bottom, transpose of matrix above. var expected = new (int row, int column)[] diff --git a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_RowColDefinitions.cs b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_RowColDefinitions.cs index 6b68556f2cd..bf6539aea5f 100644 --- a/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_RowColDefinitions.cs +++ b/UnitTests/UnitTests.UWP/UI/Controls/Test_UniformGrid_RowColDefinitions.cs @@ -125,7 +125,7 @@ public void Test_UniformGrid_SetupRowDefinitions_FirstFixed() Assert.AreEqual(3, grid.RowDefinitions.Count); var rdo = grid.RowDefinitions[0]; - + // Did we mark that our row is special? Assert.AreEqual(false, UniformGrid.GetAutoLayout(rdo)); @@ -465,7 +465,7 @@ public void Test_UniformGrid_SetupColumnDefinitions_AllAutomatic() //// DO IT AGAIN //// This is so we can check that it will behave the same again on another pass. - + // We'll have three columns in this setup grid.SetupColumnDefinitions(3);