未验证 提交 9f0d3fcf 编写于 作者: J Jinu 提交者: GitHub

Merge pull request #39061 from nnpcYvIVl/spelling-19

Spelling fixes
......@@ -3270,7 +3270,7 @@ public ILocalSymbol GetDeclaredSymbol(CatchDeclarationSyntax catchDeclaration, C
parentOperator.Event.Equals(accessSymbol, TypeCompareKind.AllNullableIgnoreOptions):
// When we're looking at the left-hand side of an event assignment, we synthesize a BoundEventAccess node. This node does not have
// nullability information, however, so if we're in that case then we need to grab the event symbol from the parent event assignment
// which does have the nullability-reinfered symbol
// which does have the nullability-reinferred symbol
symbols = ImmutableArray.Create<Symbol>(parentOperator.Event);
resultKind = parentOperator.ResultKind;
break;
......
......@@ -383,7 +383,7 @@ public async Task FixAllInDocumentComments2()
{
void M()
{
/* leading */ int dummy; /* inbetween */ int {|FixAllInDocument:i1|}; int i2; // trailing
/* leading */ int dummy; /* in-between */ int {|FixAllInDocument:i1|}; int i2; // trailing
int.TryParse(v, out i1);
int.TryParse(v, out i2);
dummy = 42;
......@@ -393,7 +393,7 @@ void M()
{
void M()
{
/* leading */ int dummy; /* inbetween */ // trailing
/* leading */ int dummy; /* in-between */ // trailing
int.TryParse(v, out int i1);
int.TryParse(v, out int i2);
dummy = 42;
......
......@@ -1357,7 +1357,7 @@ End Class")
"Class C
Private {|FixAllInDocument:_goo|}, _goo2 As Integer, _goo3 As Integer = 0, _goo4, _goo5 As Char
Private _goo6, _goo7 As Integer, _goo8 As Integer = 0
Private _goo9, _goo10 As New String("""") ' Non constant intializer
Private _goo9, _goo10 As New String("""") ' Non constant initializer
Private _goo11 = 0 ' Implicit conversion to Object type in the initializer, hence it is a non constant initializer.
Public Sub M()
......@@ -1366,7 +1366,7 @@ End Class")
End Class",
"Class C
Private _goo4 As Char
Private _goo9, _goo10 As New String("""") ' Non constant intializer
Private _goo9, _goo10 As New String("""") ' Non constant initializer
Private _goo11 = 0 ' Implicit conversion to Object type in the initializer, hence it is a non constant initializer.
Public Sub M()
......
......@@ -186,7 +186,7 @@ private bool IsNuGetInstalled(out bool hasUnresolvedAnalyzerReference)
private bool IsCandidate(SuggestedAction action)
{
// Candidates fill the following critera:
// Candidates fill the following criteria:
// 1: Are a Dotnet user (as evidenced by the fact that this code is being run)
// 2: Have triggered a lightbulb on 3 separate days or if this is a code quality suggested action.
......
......@@ -388,7 +388,7 @@ private static string GetRootNamespacePropertyValue(IVsHierarchy hierarchy)
// declared in the compilation.
//
// Unfortunately, although being different concepts, default namespace and root namespace are almost
// used interchangebly in VS. For example, (1) the value is define in "rootnamespace" property in project
// used interchangeably in VS. For example, (1) the value is define in "rootnamespace" property in project
// files and, (2) the property name we use to call into hierarchy below to retrieve the value is
// called "DefaultNamespace".
......
......@@ -36,7 +36,7 @@ public PullMembersUpOptions GetPullMemberUpOptions(Document document, ISymbol se
.SelectAsArray(member =>
new PullMemberUpSymbolViewModel(member, _glyphService)
{
// The member user selected will be checked at the begining.
// The member user selected will be checked at the beginning.
IsChecked = SymbolEquivalenceComparer.Instance.Equals(selectedMember, member),
MakeAbstract = false,
IsMakeAbstractCheckable = !member.IsKind(SymbolKind.Field) && !member.IsAbstract,
......
......@@ -59,7 +59,7 @@ internal static class Connections
RemoteHostCrashInfoBar.ShowInfoBar(workspace);
// throw soft crash exception to minimize hard crash. it doesn't
// gurantee 100% hard crash free. but 99% it doesn't cause
// guarantee 100% hard crash free. but 99% it doesn't cause
// hard crash
throw new SoftCrashException("retry timed out", cancellationToken);
}
......
......@@ -546,7 +546,7 @@ static bool IsDocumentLevelDiagnostic(DiagnosticData diagnoaticData)
//
// but also we can't simply say it is a document level error because it has file path
// since project level error can have a file path pointing to a file such as dll
// , pdb, embeded files and etc.
// , pdb, embedded files and etc.
//
// unfortunately, there is no 100% correct way to do this.
// so we will use a heuristic that will most likely work for most of common cases.
......
......@@ -187,7 +187,7 @@ public DocumentExcerpter(ITextBuffer primaryBuffer)
continue;
}
// we don't have gurantee that pirmary snapshot is from same snapshot as roslyn snapshot. make sure
// we don't have guarantee that pirmary snapshot is from same snapshot as roslyn snapshot. make sure
// we map it to right snapshot
var fixedUpSpan = roslynSpan.TranslateTo(roslynSnapshot, SpanTrackingMode.EdgeExclusive);
var classifiedSpans = await ClassifierHelper.GetClassifiedSpansAsync(document, fixedUpSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
......
......@@ -108,7 +108,7 @@ private IndentationResult GetIndentationBasedOnToken(Indenter indenter, SyntaxTo
// special cases
// case 1: token belongs to verbatim token literal
// case 2: $@"$${0}"
// case 3: $@"Comment$$ inbetween{0}"
// case 3: $@"Comment$$ in-between{0}"
// case 4: $@"{0}$$"
if (token.IsVerbatimStringLiteral() ||
token.IsKind(SyntaxKind.InterpolatedVerbatimStringStartToken) ||
......
......@@ -337,7 +337,7 @@ private Task<ProjectInfo> CreateProjectInfoAsync(ProjectFileInfo projectFileInfo
if (string.IsNullOrWhiteSpace(assemblyName))
{
// if there isn't an assembly name, make one from the file path.
// Note: This may not be necessary any longer if the commmand line args
// Note: This may not be necessary any longer if the command line args
// always produce a valid compilation name.
assemblyName = GetAssemblyNameFromProjectPath(projectPath);
}
......
......@@ -58,7 +58,7 @@ public static CompilationOptions FixUpCompilationOptions(this ProjectInfo.Projec
private static XmlFileResolver GetXmlResolver(string filePath)
{
// Given filePath can be any arbitary string project is created with.
// Given filePath can be any arbitrary string project is created with.
// for primary solution in host such as VSWorkspace, ETA or MSBuildWorkspace
// filePath will point to actual file on disk, but in memory solultion, or
// one from AdhocWorkspace and etc, FilePath can be a random string.
......@@ -75,7 +75,7 @@ private static XmlFileResolver GetXmlResolver(string filePath)
private static ImmutableArray<string> GetStrongNameKeyPaths(ProjectInfo.ProjectAttributes info)
{
// Given FilePath/OutputFilePath can be any arbitary strings project is created with.
// Given FilePath/OutputFilePath can be any arbitrary strings project is created with.
// for primary solution in host such as VSWorkspace, ETA or MSBuildWorkspace
// filePath will point to actual file on disk, but in memory solultion, or
// one from AdhocWorkspace and etc, FilePath/OutputFilePath can be a random string.
......
......@@ -4,7 +4,7 @@ namespace Microsoft.CodeAnalysis.Host
{
/// <summary>
/// Provides a way to map from an assembly name to the actual path of the .NET Framework
/// assemby with that name in the context of a specified project. For example, if the
/// assembly with that name in the context of a specified project. For example, if the
/// assembly name is "System.Data" then a project targeting .NET 2.0 would resolve this
/// to a different path than a project targeting .NET 4.5.
/// </summary>
......
......@@ -336,7 +336,7 @@ public bool TryGetCompilation([NotNullWhen(returnValue: true)] out Compilation?
}
/// <summary>
/// Determines if the compilation returned by <see cref="GetCompilationAsync"/> and all its referenced compilaton are from fully loaded projects.
/// Determines if the compilation returned by <see cref="GetCompilationAsync"/> and all its referenced compilation are from fully loaded projects.
/// </summary>
// TODO: make this public
internal Task<bool> HasSuccessfullyLoadedAsync(CancellationToken cancellationToken = default)
......
......@@ -1943,7 +1943,7 @@ public bool TryGetCompilation(ProjectId projectId, [NotNullWhen(returnValue: tru
public Task<bool> HasSuccessfullyLoadedAsync(ProjectState project, CancellationToken cancellationToken)
{
// return HasAllInformation when compilation is not supported.
// regardless whether project support compilation or not, if projectInfo is not complete, we can't gurantee its reference completeness
// regardless whether project support compilation or not, if projectInfo is not complete, we can't guarantee its reference completeness
return project.SupportsCompilation
? this.GetCompilationTracker(project.Id).HasSuccessfullyLoadedAsync(this, cancellationToken)
: project.HasAllInformation ? SpecializedTasks.True : SpecializedTasks.False;
......
......@@ -1972,7 +1972,7 @@ internal class WorkspacesResources {
}
/// <summary>
/// Looks up a localized string similar to hexidecimal escape.
/// Looks up a localized string similar to hexadecimal escape.
/// </summary>
internal static string Regex_hexadecimal_escape_short {
get {
......
......@@ -1535,7 +1535,7 @@ public void TestWithSyntaxTree()
var factory = dummyProject.LanguageServices.SyntaxTreeFactory;
// create the origin tree
var strongTree = factory.ParseSyntaxTree("dummy", dummyProject.ParseOptions, SourceText.From("// emtpy"), treeDiagnosticReportingOptions: null, CancellationToken.None);
var strongTree = factory.ParseSyntaxTree("dummy", dummyProject.ParseOptions, SourceText.From("// empty"), treeDiagnosticReportingOptions: null, CancellationToken.None);
// create recoverable tree off the original tree
var recoverableTree = factory.CreateRecoverableTree(
......
......@@ -28,7 +28,7 @@ public async Task CheckPEReferencesSameAfterSolutionChangedTest()
var compilation1 = await project.GetCompilationAsync();
var references1 = compilation1.ExternalReferences;
// just some arbitary action to create new snpahost that doesnt affect references
// just some arbitrary action to create new snpahost that doesnt affect references
var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
var document = ws.AddDocument(info);
......@@ -68,7 +68,7 @@ public async Task CheckP2PReferencesSameAfterSolutionChangedTest()
var compilation1 = await project.GetCompilationAsync();
var references1 = compilation1.ExternalReferences;
// just some arbitary action to create new snpahost that doesnt affect references
// just some arbitrary action to create new snpahost that doesnt affect references
var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
var document = ws.AddDocument(info);
......@@ -108,7 +108,7 @@ public async Task CheckCrossLanguageReferencesSameAfterSolutionChangedTest()
var compilation1 = await project.GetCompilationAsync();
var references1 = compilation1.ExternalReferences;
// just some arbitary action to create new snpahost that doesnt affect references
// just some arbitrary action to create new snpahost that doesnt affect references
var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
var document = ws.AddDocument(info);
......@@ -152,7 +152,7 @@ public async Task CheckP2PReferencesNotSameAfterReferenceChangedTest()
var referenceDocumentInfo = DocumentInfo.Create(DocumentId.CreateNewId(referenceProject.Id), "code.cs");
var referenceDocument = ws.AddDocument(referenceDocumentInfo);
// just some arbitary action to create new snpahost that doesnt affect references
// just some arbitrary action to create new snpahost that doesnt affect references
var info = DocumentInfo.Create(DocumentId.CreateNewId(project.Id), "code.cs");
var document = ws.AddDocument(info);
......
......@@ -40,7 +40,7 @@ public VisualBasicDocumentDifferenceService()
public async Task<DocumentDifferenceResult> GetDifferenceAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken)
{
// in remote workspace, we don't trust any version based on VersionStamp. we only trust content based information such as
// checksum or tree comparision and etc.
// checksum or tree comparison and etc.
// first check checksum
var oldTextChecksum = (await oldDocument.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false)).Text;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册