From 5e0aa0c0fa1437bb0f80f143755cf313d744395e Mon Sep 17 00:00:00 2001 From: Adrian Wright Date: Thu, 18 Oct 2018 10:33:01 +0100 Subject: [PATCH] Fix typos --- .../BlazorDiagnosticFactory.cs | 2 +- .../ChildContentDiagnosticPass.cs | 6 +++--- .../ComponentDocumentRewritePass.cs | 4 ++-- .../ComponentLoweringPass.cs | 8 ++++---- .../EventHandlerTagHelperDescriptorProvider.cs | 4 ++-- .../GenericComponentPass.cs | 6 +++--- .../HtmlBlockPass.cs | 2 +- .../RefTagHelperDescriptorProvider.cs | 6 +++--- .../ScriptTagPass.cs | 4 ++-- .../AutoRebuild/AutoRebuildExtensions.cs | 2 +- .../Circuits/RemoteUriHelper.cs | 2 +- .../FilePathRazorIntegrationTest.cs | 4 ++-- .../Razor/InitializeTestFileAttribute.cs | 2 +- .../RazorBaselineIntegrationTestBase.cs | 4 ++-- .../BindTagHelperDescriptorProviderTest.cs | 14 +++++++------- .../ComponentTagHelperDescriptorProviderTest.cs | 14 +++++++------- .../EventHandlerTagHelperDescriptorProviderTest.cs | 4 ++-- .../RenderTreeDiffBuilderTest.cs | 2 +- .../Circuits/CircuitSynchronizationContextTest.cs | 2 +- .../Circuits/RenderBatchWriterTest.cs | 2 +- .../BasicTestApp/BindCasesComponent.cshtml | 14 +++++++------- test/testapps/BasicTestApp/Startup.cs | 2 +- 22 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorDiagnosticFactory.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorDiagnosticFactory.cs index 715a2447b3..bbf6f84b7b 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorDiagnosticFactory.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorDiagnosticFactory.cs @@ -163,7 +163,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor public static readonly RazorDiagnosticDescriptor BindAttribute_InvalidSyntax = new RazorDiagnosticDescriptor( "BL9991", - () => "The attribute names could not be inferred from bind attibute '{0}'. Bind attributes should be of the form" + + () => "The attribute names could not be inferred from bind attribute '{0}'. Bind attributes should be of the form" + "'bind', 'bind-value' or 'bind-value-change'", RazorDiagnosticSeverity.Error); diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ChildContentDiagnosticPass.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ChildContentDiagnosticPass.cs index d2f099c0c9..bdb5e37705 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ChildContentDiagnosticPass.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ChildContentDiagnosticPass.cs @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor public void VisitExtension(ComponentChildContentIntermediateNode node) { // Check that each child content has a unique parameter name within its scope. This is important - // because the parameter name can be implict, and it doesn't work well when nested. + // because the parameter name can be implicit, and it doesn't work well when nested. if (node.IsParameterized) { for (var i = 0; i < Ancestors.Count - 1; i++) @@ -58,9 +58,9 @@ namespace Microsoft.AspNetCore.Blazor.Razor node.Diagnostics.Add(BlazorDiagnosticFactory.Create_ChildContentRepeatedParameterName( node.Source, node, - (ComponentExtensionNode)Ancestors[0], // Encosing component + (ComponentExtensionNode)Ancestors[0], // Enclosing component ancestor, // conflicting child content node - (ComponentExtensionNode)Ancestors[i + 1])); // Encosing component of conflicting child content node + (ComponentExtensionNode)Ancestors[i + 1])); // Enclosing component of conflicting child content node } } } diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentDocumentRewritePass.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentDocumentRewritePass.cs index 65f8ff77d9..81e7dfac54 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentDocumentRewritePass.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentDocumentRewritePass.cs @@ -258,7 +258,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor // Happy path. // // We need to compute a new source span because when we found the start tag before we knew - // the end poosition of the tag. + // the end position of the tag. var length = end.AbsoluteIndex - popped.Source.Value.AbsoluteIndex; popped.Source = new SourceSpan( popped.Source.Value.FilePath, @@ -426,7 +426,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor // in the DOM, which can accept content that has decoded entities. // // In the event that we merge HtmlContent into an HtmlBlock, we need to - // re-encode the entites. That's done in the HtmlBlock pass. + // re-encode the entities. That's done in the HtmlBlock pass. var tokens = _textSource.Tokenize(HtmlEntityService.Resolver); return tokens; } diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentLoweringPass.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentLoweringPass.cs index 34cd953c67..10eb13ece1 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentLoweringPass.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ComponentLoweringPass.cs @@ -140,7 +140,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor // // We don't want to create a child content for this case, because it can conflict // with a child content that's set via an attribute. We don't want the formatting - // of insigificant whitespace to be annoying when setting attributes directly. + // of insignificant whitespace to be annoying when setting attributes directly. if (node.Children.Count == 1 && IsIgnorableWhitespace(node.Children[0])) { return; @@ -149,11 +149,11 @@ namespace Microsoft.AspNetCore.Blazor.Razor // From here we fork and behave differently based on whether the component's child content is // implicit or explicit. // - // Explict child content will look like:
...
+ // Explicit child content will look like:
...
// compared with implicit:
// // Using implicit child content: - // 1. All content is grouped into a single child content lambda, and assiged to the property 'ChildContent' + // 1. All content is grouped into a single child content lambda, and assigned to the property 'ChildContent' // // Using explicit child content: // 1. All content must be contained within 'child content' elements that are direct children @@ -232,7 +232,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor var child = children[i]; if (child is TagHelperBodyIntermediateNode body) { - // The body is all of the content we want to render, the rest of the childen will + // The body is all of the content we want to render, the rest of the children will // be the attributes. for (var j = 0; j < body.Children.Count; j++) { diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/EventHandlerTagHelperDescriptorProvider.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/EventHandlerTagHelperDescriptorProvider.cs index ccb307d677..e5ef926c57 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/EventHandlerTagHelperDescriptorProvider.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/EventHandlerTagHelperDescriptorProvider.cs @@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor builder.Metadata[TagHelperMetadata.Runtime.Name] = BlazorMetadata.EventHandler.RuntimeName; // WTE has a bug in 15.7p1 where a Tag Helper without a display-name that looks like - // a C# property will crash trying to create the toolips. + // a C# property will crash trying to create the tooltips. builder.SetTypeName(entry.TypeName); builder.TagMatchingRule(rule => @@ -148,7 +148,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor a.Metadata.Add(BlazorMetadata.Component.WeaklyTypedKey, bool.TrueString); // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like - // a C# property will crash trying to create the toolips. + // a C# property will crash trying to create the tooltips. a.SetPropertyName(entry.Attribute); }); diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/GenericComponentPass.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/GenericComponentPass.cs index b0d9d881c8..f57bbe413d 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/GenericComponentPass.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/GenericComponentPass.cs @@ -92,7 +92,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor // We need to verify that an argument was provided that 'covers' each type parameter. // // For example, consider a repeater where the generic type is the 'item' type, but the developer has - // not set the items. We won't be able to do type inference on this and so it will just be nonesense. + // not set the items. We won't be able to do type inference on this and so it will just be nonsense. var attributes = node.Attributes.Select(a => a.BoundAttribute).Concat(node.ChildContents.Select(c => c.BoundAttribute)); foreach (var attribute in attributes) { @@ -139,7 +139,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor node.Diagnostics.Add(BlazorDiagnosticFactory.Create_GenericComponentTypeInferenceUnderspecified(node.Source, node, node.Component.GetTypeParameters())); } - // Next we need to generate a type inference 'method' node. This repesents a method that we will codegen that + // Next we need to generate a type inference 'method' node. This represents a method that we will codegen that // contains all of the operations on the render tree building. Calling a method to operate on the builder // will allow the C# compiler to perform type inference. var documentNode = (DocumentIntermediateNode)Ancestors[Ancestors.Count - 1]; @@ -253,7 +253,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor Bindings = bindings, Component = node, - // Method name is generated and guaraneteed not to collide, since it's unique for each + // Method name is generated and guaranteed not to collide, since it's unique for each // component call site. MethodName = $"Create{node.TagName}_{_id++}", FullTypeName = @namespace + ".TypeInference", diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/HtmlBlockPass.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/HtmlBlockPass.cs index b0c9979f09..5481273f4d 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/HtmlBlockPass.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/HtmlBlockPass.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor // Rewrites contiguous subtrees of HTML into a special node type to reduce the // size of the Render tree. // - // Does not preserve insigificant details of the HTML, like tag closing style + // Does not preserve insignificant details of the HTML, like tag closing style // or quote style. internal class HtmlBlockPass : IntermediateNodePassBase, IRazorOptimizationPass { diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/RefTagHelperDescriptorProvider.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/RefTagHelperDescriptorProvider.cs index 49f0932123..9b7a4343d7 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/RefTagHelperDescriptorProvider.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/RefTagHelperDescriptorProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Blazor.Shared; @@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor builder.Metadata[TagHelperMetadata.Runtime.Name] = BlazorMetadata.Ref.RuntimeName; // WTE has a bug in 15.7p1 where a Tag Helper without a display-name that looks like - // a C# property will crash trying to create the toolips. + // a C# property will crash trying to create the tooltips. builder.SetTypeName("Microsoft.AspNetCore.Blazor.Components.Ref"); builder.TagMatchingRule(rule => @@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor attribute.Name = "ref"; // WTE has a bug 15.7p1 where a Tag Helper without a display-name that looks like - // a C# property will crash trying to create the toolips. + // a C# property will crash trying to create the tooltips. attribute.SetPropertyName("Ref"); attribute.TypeName = typeof(object).FullName; }); diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ScriptTagPass.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ScriptTagPass.cs index 937a5e9ec6..4e5c29abe7 100644 --- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ScriptTagPass.cs +++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/ScriptTagPass.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor { for (var i = 0; i < node.Children.Count; i++) { - // We allow you to supress this error like: + // We allow you to suppress this error like: //