提交 13147545 编写于 作者: N Nikita Potapenko

Fix typo

.Net - .NET
上级 5597c56f
...@@ -17,7 +17,7 @@ You'll need to create a .resx file to hold your localizable resources. For the p ...@@ -17,7 +17,7 @@ You'll need to create a .resx file to hold your localizable resources. For the p
Using Localized Resources in Analyzers Using Localized Resources in Analyzers
-------------------------------------- --------------------------------------
Normally, .Net applications can simply access the resource through the type generated from the .resx file: Normally, .NET applications can simply access the resource through the type generated from the .resx file:
``` C# ``` C#
string message = AnalyzerResources.Message; string message = AnalyzerResources.Message;
``` ```
......
### VB Embedded Runtime inherits overflow checking from the compilation ### VB Embedded Runtime inherits overflow checking from the compilation
See https://github.com/dotnet/roslyn/issues/6941. Some VB runtime methods are specified to throw an `OverflowException` when a converted value overflows the target type. When compiling a VB project with the runtime embedded (`/vbruntime*`), the compiler includes the necessary VB runtime helpers into the assembly that is produced. These runtime helpers inherit the overflow checking behavior of the VB.NET project that they are embedded into. As a result, if you both embed the runtime and have overflow checking disabled (`/removeintchecks+`), you will not get the specified exceptions from the runtime helpers. Although technically it is a bug, it has long been the behavior of VB.Net and we have found that customers would be broken by having it fixed, so we do not expect to change this behavior. See https://github.com/dotnet/roslyn/issues/6941. Some VB runtime methods are specified to throw an `OverflowException` when a converted value overflows the target type. When compiling a VB project with the runtime embedded (`/vbruntime*`), the compiler includes the necessary VB runtime helpers into the assembly that is produced. These runtime helpers inherit the overflow checking behavior of the VB.NET project that they are embedded into. As a result, if you both embed the runtime and have overflow checking disabled (`/removeintchecks+`), you will not get the specified exceptions from the runtime helpers. Although technically it is a bug, it has long been the behavior of VB.NET and we have found that customers would be broken by having it fixed, so we do not expect to change this behavior.
``` vb ``` vb
Sub Main() Sub Main()
......
...@@ -43,7 +43,7 @@ The Test.cmd script will run our unit test on already built binaries. It can be ...@@ -43,7 +43,7 @@ The Test.cmd script will run our unit test on already built binaries. It can be
2. Navigate to the directory of your Git clone. 2. Navigate to the directory of your Git clone.
3. Run `msbuild /v:m /m /nodereuse:false BuildAndTest.proj` in the command prompt. 3. Run `msbuild /v:m /m /nodereuse:false BuildAndTest.proj` in the command prompt.
You can more precisely control how the tests are run by running the eng/build.ps1 script directly with the relevant options. For example passing in the `-test` switch will run the tests on .Net Framework, whilst passing in the `-testCoreClr` switch will run the tests on .Net Core. You can more precisely control how the tests are run by running the eng/build.ps1 script directly with the relevant options. For example passing in the `-test` switch will run the tests on .NET Framework, whilst passing in the `-testCoreClr` switch will run the tests on .NET Core.
The results of the tests can be viewed in the artifacts/TestResults directory. The results of the tests can be viewed in the artifacts/TestResults directory.
......
...@@ -73,7 +73,7 @@ If the left-hand-side is nested the process will be repeated. For instance, in ` ...@@ -73,7 +73,7 @@ If the left-hand-side is nested the process will be repeated. For instance, in `
In the case where the expression on the right is a tuple expression, it is first given a type. So in `long x; string y; (x, y) = (1, null);` the literals on the right-hand-side are typed as `long` and `string` before the deconstruction even starts, which means that no conversions will be needed during the deconstruction steps. In the case where the expression on the right is a tuple expression, it is first given a type. So in `long x; string y; (x, y) = (1, null);` the literals on the right-hand-side are typed as `long` and `string` before the deconstruction even starts, which means that no conversions will be needed during the deconstruction steps.
We noted already that tuples (which are syntactic sugar for the `System.ValueTuple` underlying type) don't need to invoke `Deconstruct`. We noted already that tuples (which are syntactic sugar for the `System.ValueTuple` underlying type) don't need to invoke `Deconstruct`.
The .Net framework also includes a set of `System.Tuple` types. Those are not recognized as C# tuples, and so will rely on the *Deconstruct* pattern. Those `Deconstruct` methods will be provided as extension methods for `System.Tuple` for up to 3 nestings deep (that is 21 elements). The .NET framework also includes a set of `System.Tuple` types. Those are not recognized as C# tuples, and so will rely on the *Deconstruct* pattern. Those `Deconstruct` methods will be provided as extension methods for `System.Tuple` for up to 3 nestings deep (that is 21 elements).
A *deconstruction-assignment* returns a tuple value (with elements using default names) which is shaped and typed like the left-hand-side and holds the (converted) parts resulting from deconstruction. A *deconstruction-assignment* returns a tuple value (with elements using default names) which is shaped and typed like the left-hand-side and holds the (converted) parts resulting from deconstruction.
......
...@@ -286,7 +286,7 @@ private void InitializerCountRecursive(ImmutableArray<BoundExpression> inits, re ...@@ -286,7 +286,7 @@ private void InitializerCountRecursive(ImmutableArray<BoundExpression> inits, re
else else
{ {
// NOTE: default values do not need to be initialized. // NOTE: default values do not need to be initialized.
// .Net arrays are always zero-inited. // .NET arrays are always zero-inited.
if (!init.IsDefaultValue()) if (!init.IsDefaultValue())
{ {
initCount += 1; initCount += 1;
......
...@@ -3236,7 +3236,7 @@ internal void SymbolDeclaredEvent(Symbol symbol) ...@@ -3236,7 +3236,7 @@ internal void SymbolDeclaredEvent(Symbol symbol)
/// <remarks> /// <remarks>
/// In NetFx 4.0, block array initializers do not work on all combinations of {32/64 X Debug/Retail} when array elements are enums. /// In NetFx 4.0, block array initializers do not work on all combinations of {32/64 X Debug/Retail} when array elements are enums.
/// This is fixed in 4.5 thus enabling block array initialization for a very common case. /// This is fixed in 4.5 thus enabling block array initialization for a very common case.
/// We look for the presence of <see cref="System.Runtime.GCLatencyMode.SustainedLowLatency"/> which was introduced in .Net 4.5 /// We look for the presence of <see cref="System.Runtime.GCLatencyMode.SustainedLowLatency"/> which was introduced in .NET Framework 4.5
/// </remarks> /// </remarks>
internal bool EnableEnumArrayBlockInitialization internal bool EnableEnumArrayBlockInitialization
{ {
......
...@@ -2031,7 +2031,7 @@ public void AppConfig1() ...@@ -2031,7 +2031,7 @@ public void AppConfig1()
[Fact] [Fact]
public void AppConfig2() public void AppConfig2()
{ {
// Create a dll with a reference to .net system // Create a dll with a reference to .NET system
string libSource = @" string libSource = @"
using System.Runtime.Versioning; using System.Runtime.Versioning;
public class C { public static FrameworkName Goo() { return null; }}"; public class C { public static FrameworkName Goo() { return null; }}";
......
...@@ -1607,7 +1607,7 @@ public class Test { } ...@@ -1607,7 +1607,7 @@ public class Test { }
EntityHandle token = metadata.GetTypeRef(metadata.GetAssemblyRef("mscorlib"), "System.Runtime.CompilerServices", "AssemblyAttributesGoHereM"); EntityHandle token = metadata.GetTypeRef(metadata.GetAssemblyRef("mscorlib"), "System.Runtime.CompilerServices", "AssemblyAttributesGoHereM");
Assert.True(token.IsNil); //could the type ref be located? If not then the attribute's not there. Assert.True(token.IsNil); //could the type ref be located? If not then the attribute's not there.
// Exported types in .Net module cause PEVerify to fail. // Exported types in .NET module cause PEVerify to fail.
CompileAndVerify(appCompilation, verify: Verification.Fails, CompileAndVerify(appCompilation, verify: Verification.Fails,
symbolValidator: m => symbolValidator: m =>
{ {
......
...@@ -6981,7 +6981,7 @@ public class CF3<T> ...@@ -6981,7 +6981,7 @@ public class CF3<T>
forwardedTypes1Ref forwardedTypes1Ref
}, TestOptions.ReleaseDll); }, TestOptions.ReleaseDll);
// Exported types in .Net modules cause PEVerify to fail on some platforms. // Exported types in .NET modules cause PEVerify to fail on some platforms.
CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics(); CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics();
compilation = CreateCompilation("[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(CF3<byte>))]", compilation = CreateCompilation("[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(CF3<byte>))]",
......
...@@ -515,8 +515,8 @@ public void ArrayTypes() ...@@ -515,8 +515,8 @@ public void ArrayTypes()
} }
// Interfaces impl-ed by System.Array // Interfaces impl-ed by System.Array
// .Net 2/3.0 (7) IList&[T] -> ICollection&[T] ->IEnumerable&[T]; ICloneable; // .NET 2/3.0 (7) IList&[T] -> ICollection&[T] ->IEnumerable&[T]; ICloneable;
// .Net 4.0 (9) IList&[T] -> ICollection&[T] ->IEnumerable&[T]; ICloneable; IStructuralComparable; IStructuralEquatable // .NET 4.0 (9) IList&[T] -> ICollection&[T] ->IEnumerable&[T]; ICloneable; IStructuralComparable; IStructuralEquatable
// Array T[] impl IList[T] only // Array T[] impl IList[T] only
[Fact, WorkItem(537300, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/537300"), WorkItem(527247, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/527247")] [Fact, WorkItem(537300, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/537300"), WorkItem(527247, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/527247")]
public void ArrayTypeInterfaces() public void ArrayTypeInterfaces()
......
...@@ -51,7 +51,7 @@ protected sealed override string GenerateCommandLineCommands() ...@@ -51,7 +51,7 @@ protected sealed override string GenerateCommandLineCommands()
/// <summary> /// <summary>
/// This generates the path to the executable that is directly ran. /// This generates the path to the executable that is directly ran.
/// This could be the managed assembly itself (on desktop .net on Windows), /// This could be the managed assembly itself (on desktop .NET on Windows),
/// or a runtime such as dotnet. /// or a runtime such as dotnet.
/// </summary> /// </summary>
protected sealed override string GenerateFullPathToTool() protected sealed override string GenerateFullPathToTool()
......
...@@ -71,7 +71,7 @@ public static bool LooksLikeTypeParameterName(this string name) ...@@ -71,7 +71,7 @@ public static bool LooksLikeTypeParameterName(this string name)
bool trimLeadingTypePrefix, bool trimLeadingTypePrefix,
Func<char, char> convert) Func<char, char> convert)
{ {
// Special case the common .net pattern of "IGoo" as a type name. In this case we // Special case the common .NET pattern of "IGoo" as a type name. In this case we
// want to generate "goo" as the parameter name. // want to generate "goo" as the parameter name.
if (!string.IsNullOrEmpty(shortName)) if (!string.IsNullOrEmpty(shortName))
{ {
......
...@@ -238,7 +238,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGen ...@@ -238,7 +238,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGen
InitializerCountRecursive(asArrayInit.Initializers, initCount, constInits) InitializerCountRecursive(asArrayInit.Initializers, initCount, constInits)
Else Else
' NOTE Default values Do Not need To be initialized. ' NOTE Default values Do Not need To be initialized.
' .Net arrays are always zero-inited. ' .NET arrays are always zero-inited.
If Not init.IsDefaultValue() Then If Not init.IsDefaultValue() Then
initCount += 1 initCount += 1
If init.ConstantValueOpt IsNot Nothing Then If init.ConstantValueOpt IsNot Nothing Then
......
...@@ -1278,7 +1278,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic ...@@ -1278,7 +1278,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' <remarks> ''' <remarks>
''' In NetFx 4.0, block array initializers do not work on all combinations of {32/64 X Debug/Retail} when array elements are enums. ''' In NetFx 4.0, block array initializers do not work on all combinations of {32/64 X Debug/Retail} when array elements are enums.
''' This is fixed in 4.5 thus enabling block array initialization for a very common case. ''' This is fixed in 4.5 thus enabling block array initialization for a very common case.
''' We look for the presence of <see cref="System.Runtime.GCLatencyMode.SustainedLowLatency"/> which was introduced in .Net 4.5 ''' We look for the presence of <see cref="System.Runtime.GCLatencyMode.SustainedLowLatency"/> which was introduced in .NET Framework 4.5
''' </remarks> ''' </remarks>
Friend ReadOnly Property EnableEnumArrayBlockInitialization As Boolean Friend ReadOnly Property EnableEnumArrayBlockInitialization As Boolean
Get Get
......
...@@ -1042,7 +1042,7 @@ End class ...@@ -1042,7 +1042,7 @@ End class
token = metadata.GetTypeRef(metadata.GetAssemblyRef("mscorlib"), "System.Runtime.CompilerServices", "AssemblyAttributesGoHereM") token = metadata.GetTypeRef(metadata.GetAssemblyRef("mscorlib"), "System.Runtime.CompilerServices", "AssemblyAttributesGoHereM")
Assert.True(token.IsNil) 'could the type ref be located? If not then the attribute's not there. Assert.True(token.IsNil) 'could the type ref be located? If not then the attribute's not there.
' Exported types in .Net module cause PEVerify to fail. ' Exported types in .NET module cause PEVerify to fail.
CompileAndVerify(appCompilation, verify:=Verification.Fails, CompileAndVerify(appCompilation, verify:=Verification.Fails,
symbolValidator:=Sub(m) symbolValidator:=Sub(m)
Dim metadataReader1 = DirectCast(m, PEModuleSymbol).Module.GetMetadataReader() Dim metadataReader1 = DirectCast(m, PEModuleSymbol).Module.GetMetadataReader()
...@@ -1210,7 +1210,7 @@ End class ...@@ -1210,7 +1210,7 @@ End class
Dim appCompilation = CreateCompilationWithMscorlib40AndReferences(app, {modRef, New VisualBasicCompilationReference(forwardedTypesCompilation)}, TestOptions.ReleaseDll) Dim appCompilation = CreateCompilationWithMscorlib40AndReferences(app, {modRef, New VisualBasicCompilationReference(forwardedTypesCompilation)}, TestOptions.ReleaseDll)
' Exported types in .Net module cause PEVerify to fail. ' Exported types in .NET module cause PEVerify to fail.
CompileAndVerify(appCompilation, verify:=Verification.Fails, CompileAndVerify(appCompilation, verify:=Verification.Fails,
symbolValidator:=Sub(m) symbolValidator:=Sub(m)
Dim peReader1 = DirectCast(m, PEModuleSymbol).Module.GetMetadataReader() Dim peReader1 = DirectCast(m, PEModuleSymbol).Module.GetMetadataReader()
......
...@@ -3195,7 +3195,7 @@ BC37218: Type 'ns.CF2' forwarded to assembly 'ForwardedTypes1, Version=0.0.0.0, ...@@ -3195,7 +3195,7 @@ BC37218: Type 'ns.CF2' forwarded to assembly 'ForwardedTypes1, Version=0.0.0.0,
forwardedTypes1Ref forwardedTypes1Ref
}, TestOptions.ReleaseDll) }, TestOptions.ReleaseDll)
' Exported types in .Net modules cause PEVerify to fail. ' Exported types in .NET modules cause PEVerify to fail.
CompileAndVerify(compilation, verify:=Verification.Fails).VerifyDiagnostics() CompileAndVerify(compilation, verify:=Verification.Fails).VerifyDiagnostics()
compilation = CreateCompilationWithMscorlib40AndReferences(emptySource, compilation = CreateCompilationWithMscorlib40AndReferences(emptySource,
......
...@@ -341,7 +341,7 @@ CaseLabel2: ...@@ -341,7 +341,7 @@ CaseLabel2:
End Set End Set
End Property End Property
'vb.net can't support abstract member variable 'VB.NET can't support abstract member variable
Public ReadOnly Property P2() As String Public ReadOnly Property P2() As String
Get Get
End Get End Get
......
...@@ -315,7 +315,7 @@ CaseLabel2: ...@@ -315,7 +315,7 @@ CaseLabel2:
End Set End Set
End Property End Property
'vb.net can't support abstract member variable 'VB.NET can't support abstract member variable
Public ReadOnly Property P2() As String Public ReadOnly Property P2() As String
Get Get
End Get End Get
......
...@@ -363,7 +363,7 @@ private static IPropertySymbol GenerateProperty(Document document, IPropertySymb ...@@ -363,7 +363,7 @@ private static IPropertySymbol GenerateProperty(Document document, IPropertySymb
// in the type. Instead, we just want to generate auto-props. So we effectively clone // in the type. Instead, we just want to generate auto-props. So we effectively clone
// the property, just throwing aways anything we don't need for that purpose. // the property, just throwing aways anything we don't need for that purpose.
// //
// We also want to follow general .net naming. So that means converting to pascal // We also want to follow general .NET naming. So that means converting to pascal
// case from camel-case. // case from camel-case.
var getMethod = prop.GetMethod != null ? CreateAccessorSymbol(prop, MethodKind.PropertyGet) : null; var getMethod = prop.GetMethod != null ? CreateAccessorSymbol(prop, MethodKind.PropertyGet) : null;
......
...@@ -373,7 +373,7 @@ private void ProvideEscapeCategoryCompletions(EmbeddedCompletionContext context) ...@@ -373,7 +373,7 @@ private void ProvideEscapeCategoryCompletions(EmbeddedCompletionContext context)
context.AddIfMissing($@"\k< {Regex_name_or_number} >", Regex_named_backreference_short, Regex_named_backreference_long, parentOpt, @"\k<".Length, insertionText: @"\k<>"); context.AddIfMissing($@"\k< {Regex_name_or_number} >", Regex_named_backreference_short, Regex_named_backreference_long, parentOpt, @"\k<".Length, insertionText: @"\k<>");
// Note: we intentionally do not add `\<>` to the list. While supported by the // Note: we intentionally do not add `\<>` to the list. While supported by the
// .net regex engine, it is effectively deprecated and discouraged from use. // .NET regex engine, it is effectively deprecated and discouraged from use.
// Instead, it is recommended that `\k<>` is used instead. // Instead, it is recommended that `\k<>` is used instead.
// //
// context.AddIfMissing(@"\<>", "", "", parentOpt, @"\<".Length)); // context.AddIfMissing(@"\<>", "", "", parentOpt, @"\<".Length));
......
...@@ -110,7 +110,7 @@ private State(Compilation compilation) ...@@ -110,7 +110,7 @@ private State(Compilation compilation)
if (char.IsLower(name[0]) && !semanticDocument.SemanticModel.Compilation.IsCaseSensitive) if (char.IsLower(name[0]) && !semanticDocument.SemanticModel.Compilation.IsCaseSensitive)
{ {
// It's near universal in .Net that types start with a capital letter. As such, // It's near universal in .NET that types start with a capital letter. As such,
// if this name starts with a lowercase letter, don't even bother to offer // if this name starts with a lowercase letter, don't even bother to offer
// "generate type". The user most likely wants to run 'Add Import' (which will // "generate type". The user most likely wants to run 'Add Import' (which will
// then fix up a case where they typed an existing type name in lowercase, // then fix up a case where they typed an existing type name in lowercase,
......
...@@ -121,7 +121,7 @@ internal abstract partial class AbstractNavigateToSearchService ...@@ -121,7 +121,7 @@ internal abstract partial class AbstractNavigateToSearchService
} }
// Would like to use CWT.AddOrUpdate. But that is not available on the // Would like to use CWT.AddOrUpdate. But that is not available on the
// version of .Net that we're using. So we need to take lock as we're // version of .NET that we're using. So we need to take lock as we're
// making multiple mutations. // making multiple mutations.
lock (s_lastProjectSearchCache) lock (s_lastProjectSearchCache)
{ {
......
...@@ -1190,7 +1190,7 @@ CaseLabel2: ...@@ -1190,7 +1190,7 @@ CaseLabel2:
End Set End Set
End Property End Property
'vb.net can't support abstract member variable 'VB.NET can't support abstract member variable
Public ReadOnly Property P2() As String Public ReadOnly Property P2() As String
Get Get
End Get End Get
...@@ -2234,7 +2234,7 @@ CaseLabel2: ...@@ -2234,7 +2234,7 @@ CaseLabel2:
End Set End Set
End Property End Property
'vb.net can't support abstract member variable 'VB.NET can't support abstract member variable
Public ReadOnly Property P2() As String Public ReadOnly Property P2() As String
Get Get
End Get End Get
......
...@@ -383,7 +383,7 @@ internal bool IsCPSProject(CodeAnalysis.Project project) ...@@ -383,7 +383,7 @@ internal bool IsCPSProject(CodeAnalysis.Project project)
if (this.TryGetHierarchy(project.Id, out var hierarchy)) if (this.TryGetHierarchy(project.Id, out var hierarchy))
{ {
// Currently renaming files in CPS projects (i.e. .Net Core) doesn't work proprey. // Currently renaming files in CPS projects (i.e. .NET Core) doesn't work proprey.
// This is because the remove/add of the documents in CPS is not synchronous // This is because the remove/add of the documents in CPS is not synchronous
// (despite the DTE interfaces being synchronous). So Roslyn calls the methods // (despite the DTE interfaces being synchronous). So Roslyn calls the methods
// expecting the changes to happen immediately. Because they are deferred in CPS // expecting the changes to happen immediately. Because they are deferred in CPS
......
...@@ -21,7 +21,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.Venus ...@@ -21,7 +21,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.Venus
internal sealed partial class ContainedDocument internal sealed partial class ContainedDocument
{ {
// this is to support old venus/razor case before dev16. // this is to support old venus/razor case before dev16.
// all new razor (asp.net core after dev16) should use thier own implementation not ours // all new razor (asp.NET core after dev16) should use thier own implementation not ours
public class DocumentServiceProvider : IDocumentServiceProvider public class DocumentServiceProvider : IDocumentServiceProvider
{ {
private readonly SpanMapper _spanMapper; private readonly SpanMapper _spanMapper;
......
...@@ -69,7 +69,7 @@ public static bool LooksLikeStandaloneTypeName(this SimpleNameSyntax simpleName) ...@@ -69,7 +69,7 @@ public static bool LooksLikeStandaloneTypeName(this SimpleNameSyntax simpleName)
// "Standalone type name". // "Standalone type name".
// //
// 1. Users are not going to name types the same name as C# keywords (contextual or otherwise). // 1. Users are not going to name types the same name as C# keywords (contextual or otherwise).
// 2. Types in .Net are virtually always start with a Uppercase. While keywords are lowercase) // 2. Types in .NET are virtually always start with a Uppercase. While keywords are lowercase)
// //
// Having a lowercase identifier which matches a c# keyword is enough of a signal // Having a lowercase identifier which matches a c# keyword is enough of a signal
// to just not treat this as a standalone type name (even though for some identifiers // to just not treat this as a standalone type name (even though for some identifiers
......
...@@ -146,25 +146,25 @@ private SyntaxToken GetStringToken(string text) ...@@ -146,25 +146,25 @@ private SyntaxToken GetStringToken(string text)
} }
catch (IndexOutOfRangeException) when (allowIndexOutOfRange) catch (IndexOutOfRangeException) when (allowIndexOutOfRange)
{ {
// bug with .net regex parser. Can happen with patterns like: (?<-0 // bug with .NET regex parser. Can happen with patterns like: (?<-0
Assert.NotEmpty(tree.Diagnostics); Assert.NotEmpty(tree.Diagnostics);
return treeAndText; return treeAndText;
} }
catch (NullReferenceException) when (allowNullReference) catch (NullReferenceException) when (allowNullReference)
{ {
// bug with .net regex parser. can happen with patterns like: (?(?S)) // bug with .NET regex parser. can happen with patterns like: (?(?S))
return treeAndText; return treeAndText;
} }
catch (OutOfMemoryException) when (allowOutOfMemeory) catch (OutOfMemoryException) when (allowOutOfMemeory)
{ {
// bug with .net regex parser. can happen with patterns like: a{2147483647,} // bug with .NET regex parser. can happen with patterns like: a{2147483647,}
return treeAndText; return treeAndText;
} }
catch (ArgumentException ex) catch (ArgumentException ex)
{ {
Assert.NotEmpty(tree.Diagnostics); Assert.NotEmpty(tree.Diagnostics);
// Ensure the diagnostic we emit is the same as the .Net one. Note: we can only // Ensure the diagnostic we emit is the same as the .NET one. Note: we can only
// do this in en-US as that's the only culture where we control the text exactly // do this in en-US as that's the only culture where we control the text exactly
// and can ensure it exactly matches Regex. We depend on localization to do a // and can ensure it exactly matches Regex. We depend on localization to do a
// good enough job here for other languages. // good enough job here for other languages.
......
...@@ -316,7 +316,7 @@ public void Visit(RegexTextNode node) ...@@ -316,7 +316,7 @@ public void Visit(RegexTextNode node)
public void Visit(RegexPosixPropertyNode node) public void Visit(RegexPosixPropertyNode node)
{ {
// The .net parser just interprets the [ of the node, and skips the rest. So // The .NET parser just interprets the [ of the node, and skips the rest. So
// classify the end part as a comment. // classify the end part as a comment.
Result.Add(new ClassifiedSpan(node.TextToken.VirtualChars[0].Span, ClassificationTypeNames.RegexText)); Result.Add(new ClassifiedSpan(node.TextToken.VirtualChars[0].Span, ClassificationTypeNames.RegexText));
Result.Add(new ClassifiedSpan( Result.Add(new ClassifiedSpan(
......
...@@ -19,7 +19,7 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions ...@@ -19,7 +19,7 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions
/// <summary> /// <summary>
/// Minimal copy of https://github.com/dotnet/corefx/blob/master/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCharClass.cs /// Minimal copy of https://github.com/dotnet/corefx/blob/master/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCharClass.cs
/// Used to accurately determine if something is a WordChar according to the .Net regex engine. /// Used to accurately determine if something is a WordChar according to the .NET regex engine.
/// </summary> /// </summary>
internal static class RegexCharClass internal static class RegexCharClass
{ {
......
...@@ -440,7 +440,7 @@ public RegexToken ScanOctalCharacters(RegexOptions options) ...@@ -440,7 +440,7 @@ public RegexToken ScanOctalCharacters(RegexOptions options)
Position++; Position++;
// Ecmascript doesn't allow octal values above 32 (0x20 in hex). Note: we do // Ecmascript doesn't allow octal values above 32 (0x20 in hex). Note: we do
// *not* add a diagnostic. This is not an error situation. The .net lexer // *not* add a diagnostic. This is not an error situation. The .NET lexer
// simply stops once it hits a value greater than a legal octal value. // simply stops once it hits a value greater than a legal octal value.
if (HasOption(options, RegexOptions.ECMAScript) && currentVal >= 0x20) if (HasOption(options, RegexOptions.ECMAScript) && currentVal >= 0x20)
{ {
......
...@@ -263,7 +263,7 @@ public override void Accept(IRegexNodeVisitor visitor) ...@@ -263,7 +263,7 @@ public override void Accept(IRegexNodeVisitor visitor)
} }
/// <summary> /// <summary>
/// Represents a ```[:...:]``` node in a character class. Note: the .net regex parser /// Represents a ```[:...:]``` node in a character class. Note: the .NET regex parser
/// simply treats this as the character ```[``` and ignores the rest of the ```:...:]```. /// simply treats this as the character ```[``` and ignores the rest of the ```:...:]```.
/// They latter part has no impact on the actual match engine that is produced. /// They latter part has no impact on the actual match engine that is produced.
/// </summary> /// </summary>
......
...@@ -23,18 +23,18 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions ...@@ -23,18 +23,18 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions
/// Produces a <see cref="RegexTree"/> from a sequence of <see cref="VirtualChar"/> characters. /// Produces a <see cref="RegexTree"/> from a sequence of <see cref="VirtualChar"/> characters.
/// ///
/// Importantly, this parser attempts to replicate diagnostics with almost the exact same text /// Importantly, this parser attempts to replicate diagnostics with almost the exact same text
/// as the native .Net regex parser. This is important so that users get an understandable /// as the native .NET regex parser. This is important so that users get an understandable
/// experience where it appears to them that this is all one cohesive system and that the IDE /// experience where it appears to them that this is all one cohesive system and that the IDE
/// will let them discover and fix the same issues they would encounter when previously trying /// will let them discover and fix the same issues they would encounter when previously trying
/// to just compile and execute these regexes. /// to just compile and execute these regexes.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Invariants we try to maintain (and should consider a bug if we do not): l 1. If the .net /// Invariants we try to maintain (and should consider a bug if we do not): l 1. If the .NET
/// regex parser does not report an error for a given pattern, we should not either. it would be /// regex parser does not report an error for a given pattern, we should not either. it would be
/// very bad if we told the user there was something wrong with there pattern when there really /// very bad if we told the user there was something wrong with there pattern when there really
/// wasn't. /// wasn't.
/// ///
/// 2. If the .net regex parser does report an error for a given pattern, we should either not /// 2. If the .NET regex parser does report an error for a given pattern, we should either not
/// report an error (not recommended) or report the same error at an appropriate location in the /// report an error (not recommended) or report the same error at an appropriate location in the
/// pattern. Not reporting the error can be confusing as the user will think their pattern is /// pattern. Not reporting the error can be confusing as the user will think their pattern is
/// ok, when it really is not. However, it can be acceptable to do this as it's not telling /// ok, when it really is not. However, it can be acceptable to do this as it's not telling
...@@ -43,23 +43,23 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions ...@@ -43,23 +43,23 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions
/// documented in <see cref="ParsePossibleEcmascriptBackreferenceEscape"/>). /// documented in <see cref="ParsePossibleEcmascriptBackreferenceEscape"/>).
/// ///
/// Note1: "report the same error" means that we will attempt to report the error using the same /// Note1: "report the same error" means that we will attempt to report the error using the same
/// text the .net regex parser uses for its error messages. This is so that the user is not /// text the .NET regex parser uses for its error messages. This is so that the user is not
/// confused when they use the IDE vs running the regex by getting different messages for the /// confused when they use the IDE vs running the regex by getting different messages for the
/// same issue. /// same issue.
/// ///
/// Note2: the above invariants make life difficult at times. This happens due to the fact that /// Note2: the above invariants make life difficult at times. This happens due to the fact that
/// the .net parser is multi-pass. Meaning it does a first scan (which may report errors), then /// the .NET parser is multi-pass. Meaning it does a first scan (which may report errors), then
/// does the full parse. This means that it might report an error in a later location during /// does the full parse. This means that it might report an error in a later location during
/// the initial scan than it would during the parse. We replicate that behavior to follow the /// the initial scan than it would during the parse. We replicate that behavior to follow the
/// second invariant. /// second invariant.
/// ///
/// Note3: It would be nice if we could check these invariants at runtime, so we could control /// Note3: It would be nice if we could check these invariants at runtime, so we could control
/// our behavior by the behavior of the real .net regex engine. For example, if the .net regex /// our behavior by the behavior of the real .NET regex engine. For example, if the .NET regex
/// engine did not report any issues, we could suppress any diagnostics we generated and we /// engine did not report any issues, we could suppress any diagnostics we generated and we
/// could log an NFW to record which pattern we deviated on so we could fix the issue for a /// could log an NFW to record which pattern we deviated on so we could fix the issue for a
/// future release. However, we cannot do this as the .net regex engine has no guarantees about /// future release. However, we cannot do this as the .NET regex engine has no guarantees about
/// its performance characteristics. For example, certain regex patterns might end up causing /// its performance characteristics. For example, certain regex patterns might end up causing
/// that engine to consume unbounded amounts of CPU and memory. This is because the .net regex /// that engine to consume unbounded amounts of CPU and memory. This is because the .NET regex
/// engine is not just a parser, but something that builds an actual recognizer using techniques /// engine is not just a parser, but something that builds an actual recognizer using techniques
/// that are not necessarily bounded. As such, while we test ourselves around it during our /// that are not necessarily bounded. As such, while we test ourselves around it during our
/// tests, we cannot do the same at runtime as part of the IDE. /// tests, we cannot do the same at runtime as part of the IDE.
...@@ -67,7 +67,7 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions ...@@ -67,7 +67,7 @@ namespace Microsoft.CodeAnalysis.EmbeddedLanguages.RegularExpressions
/// This parser was based off the corefx RegexParser based at: /// This parser was based off the corefx RegexParser based at:
/// https://github.com/dotnet/corefx/blob/f759243d724f462da0bcef54e86588f8a55352c6/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L1 /// https://github.com/dotnet/corefx/blob/f759243d724f462da0bcef54e86588f8a55352c6/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L1
/// ///
/// Note4: The .Net parser itself changes over time (for example to fix behavior that even it /// Note4: The .NET parser itself changes over time (for example to fix behavior that even it
/// thinks is buggy). When this happens, we have to make a choice as to which behavior to /// thinks is buggy). When this happens, we have to make a choice as to which behavior to
/// follow. In general, the overall principle is that we should follow the more lenient /// follow. In general, the overall principle is that we should follow the more lenient
/// behavior. If we end up taking the more strict interpretation we risk giving people an error /// behavior. If we end up taking the more strict interpretation we risk giving people an error
...@@ -104,7 +104,7 @@ internal partial struct RegexParser ...@@ -104,7 +104,7 @@ internal partial struct RegexParser
/// produce the next token after that. /// produce the next token after that.
/// </summary> /// </summary>
/// <param name="allowTrivia">Whether or not trivia is allowed on the next token /// <param name="allowTrivia">Whether or not trivia is allowed on the next token
/// produced. In the .net parser trivia is only allowed on a few constructs, /// produced. In the .NET parser trivia is only allowed on a few constructs,
/// and our parser mimics that behavior. Note that even if trivia is allowed, /// and our parser mimics that behavior. Note that even if trivia is allowed,
/// the type of trivia that can be scanned depends on the current RegexOptions. /// the type of trivia that can be scanned depends on the current RegexOptions.
/// For example, if <see cref="RegexOptions.IgnorePatternWhitespace"/> is currently /// For example, if <see cref="RegexOptions.IgnorePatternWhitespace"/> is currently
...@@ -135,7 +135,7 @@ public static RegexTree TryParse(VirtualCharSequence text, RegexOptions options) ...@@ -135,7 +135,7 @@ public static RegexTree TryParse(VirtualCharSequence text, RegexOptions options)
// to then parse the tree again, as the captures will affect how we interpret // to then parse the tree again, as the captures will affect how we interpret
// certain things (i.e. escape references) and what errors will be reported. // certain things (i.e. escape references) and what errors will be reported.
// //
// This is necessary as .net regexes allow references to *future* captures. // This is necessary as .NET regexes allow references to *future* captures.
// As such, we don't know when we're seeing a reference if it's to something // As such, we don't know when we're seeing a reference if it's to something
// that exists or not. // that exists or not.
var tree1 = new RegexParser(text, options, var tree1 = new RegexParser(text, options,
...@@ -235,7 +235,7 @@ private RegexExpressionNode ParseAlternatingSequences(bool consumeCloseParen) ...@@ -235,7 +235,7 @@ private RegexExpressionNode ParseAlternatingSequences(bool consumeCloseParen)
/// <summary> /// <summary>
/// Parses out code of the form: ...|...|... /// Parses out code of the form: ...|...|...
/// This is the type of code you have at the top level of a regex, or inside any grouping /// This is the type of code you have at the top level of a regex, or inside any grouping
/// contruct. Note that sequences can be empty in .net regex. i.e. the following is legal: /// contruct. Note that sequences can be empty in .NET regex. i.e. the following is legal:
/// ///
/// ...||... /// ...||...
/// ///
...@@ -853,7 +853,7 @@ private void MoveBackBeforePreviousScan() ...@@ -853,7 +853,7 @@ private void MoveBackBeforePreviousScan()
private RegexConditionalGroupingNode ParseConditionalExpressionGrouping( private RegexConditionalGroupingNode ParseConditionalExpressionGrouping(
RegexToken openParenToken, RegexToken questionToken, RegexToken innerOpenParenToken) RegexToken openParenToken, RegexToken questionToken, RegexToken innerOpenParenToken)
{ {
// Reproduce very specific errors the .net regex parser looks for. Technically, // Reproduce very specific errors the .NET regex parser looks for. Technically,
// we would error out in these cases no matter what. However, it means we can // we would error out in these cases no matter what. However, it means we can
// stringently enforce that our parser produces the same errors as the native one. // stringently enforce that our parser produces the same errors as the native one.
// //
...@@ -1217,7 +1217,7 @@ private static RegexOptions OptionFromCode(VirtualChar ch) ...@@ -1217,7 +1217,7 @@ private static RegexOptions OptionFromCode(VirtualChar ch)
private RegexBaseCharacterClassNode ParseCharacterClass() private RegexBaseCharacterClassNode ParseCharacterClass()
{ {
// Note: ScanCharClass is one of the strangest function in the .net regex parser. Code // Note: ScanCharClass is one of the strangest function in the .NET regex parser. Code
// for it is here: // for it is here:
// https://github.com/dotnet/corefx/blob/6ae0da1563e6e701bac61012c62ede8f8737f065/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L498 // https://github.com/dotnet/corefx/blob/6ae0da1563e6e701bac61012c62ede8f8737f065/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L498
// //
...@@ -1238,8 +1238,8 @@ private RegexBaseCharacterClassNode ParseCharacterClass() ...@@ -1238,8 +1238,8 @@ private RegexBaseCharacterClassNode ParseCharacterClass()
// ignoring that character on the right side of a character range. So, if you had // ignoring that character on the right side of a character range. So, if you had
// ```[#-\-b]```, then this *should* be treated as the character class containing // ```[#-\-b]```, then this *should* be treated as the character class containing
// the range of character from '#' to '-', unioned with the character 'b'. However, // the range of character from '#' to '-', unioned with the character 'b'. However,
// .net will interpret this as the character class containing the range of characters // .NET will interpret this as the character class containing the range of characters
// from '#' to 'b'. We follow .Net here to keep our errors in sync with them. // from '#' to 'b'. We follow .NET here to keep our errors in sync with them.
// //
// See the comment about this in ParseRightSideOfCharacterClassRange // See the comment about this in ParseRightSideOfCharacterClassRange
...@@ -1506,7 +1506,7 @@ private bool HasProblem(RegexNodeOrToken component) ...@@ -1506,7 +1506,7 @@ private bool HasProblem(RegexNodeOrToken component)
private RegexExpressionNode ParseRightSideOfCharacterClassRange() private RegexExpressionNode ParseRightSideOfCharacterClassRange()
{ {
// Parsing the right hand side of a - is extremely strange (and most likely buggy) in // Parsing the right hand side of a - is extremely strange (and most likely buggy) in
// the .net parser. Specifically, the .net parser will still consider itself on the // the .NET parser. Specifically, the .NET parser will still consider itself on the
// right side no matter how many escaped dashes it sees. So, for example, the following // right side no matter how many escaped dashes it sees. So, for example, the following
// is legal [a-\-] (even though \- is less than 'a'). Similarly, the following are // is legal [a-\-] (even though \- is less than 'a'). Similarly, the following are
// *illegal* [b-\-a] and [b-\-\-a]. That's because the range that is checked is // *illegal* [b-\-a] and [b-\-\-a]. That's because the range that is checked is
...@@ -1601,7 +1601,7 @@ private RegexPrimaryExpressionNode ParseSingleCharacterClassComponent(bool isFir ...@@ -1601,7 +1601,7 @@ private RegexPrimaryExpressionNode ParseSingleCharacterClassComponent(bool isFir
ConsumeCurrentToken(allowTrivia: false)); ConsumeCurrentToken(allowTrivia: false));
} }
// From the .net regex code: // From the .NET regex code:
// This is code for Posix style properties - [:Ll:] or [:IsTibetan:]. // This is code for Posix style properties - [:Ll:] or [:IsTibetan:].
// It currently doesn't do anything other than skip the whole thing! // It currently doesn't do anything other than skip the whole thing!
if (!afterRangeMinus && _currentToken.Kind == RegexKind.OpenBracketToken && _lexer.IsAt(":")) if (!afterRangeMinus && _currentToken.Kind == RegexKind.OpenBracketToken && _lexer.IsAt(":"))
...@@ -1751,7 +1751,7 @@ private RegexEscapeNode ParsePossibleBackreferenceEscape(RegexToken backslashTok ...@@ -1751,7 +1751,7 @@ private RegexEscapeNode ParsePossibleBackreferenceEscape(RegexToken backslashTok
RegexToken backslashToken, bool allowTriviaAfterEnd) RegexToken backslashToken, bool allowTriviaAfterEnd)
{ {
// Small deviation: Ecmascript allows references only to captures that precede // Small deviation: Ecmascript allows references only to captures that precede
// this position (unlike .net which allows references in any direction). However, // this position (unlike .NET which allows references in any direction). However,
// because we don't track position, we just consume the entire back-reference. // because we don't track position, we just consume the entire back-reference.
// //
// This is addressable if we add position tracking when we locate all the captures. // This is addressable if we add position tracking when we locate all the captures.
...@@ -1849,7 +1849,7 @@ private RegexEscapeNode ParsePossibleKCaptureEscape(RegexToken backslashToken, b ...@@ -1849,7 +1849,7 @@ private RegexEscapeNode ParsePossibleKCaptureEscape(RegexToken backslashToken, b
if (capture.IsMissing || closeToken.IsMissing) if (capture.IsMissing || closeToken.IsMissing)
{ {
// Native parser falls back to normal escape scanning, if it doesn't see a capture, // Native parser falls back to normal escape scanning, if it doesn't see a capture,
// or close brace. For normal .net regexes, this will then fail later (as \k is not // or close brace. For normal .NET regexes, this will then fail later (as \k is not
// a legal escape), but will succeed for ecmascript regexes. // a legal escape), but will succeed for ecmascript regexes.
_lexer.Position = afterBackslashPosition; _lexer.Position = afterBackslashPosition;
return ParseCharEscape(backslashToken, allowTriviaAfterEnd); return ParseCharEscape(backslashToken, allowTriviaAfterEnd);
...@@ -1985,17 +1985,17 @@ private RegexControlEscapeNode ParseControlEscape(RegexToken backslashToken, boo ...@@ -1985,17 +1985,17 @@ private RegexControlEscapeNode ParseControlEscape(RegexToken backslashToken, boo
{ {
// From: https://github.com/dotnet/corefx/blob/80e220fc7009de0f0611ee6b52d4d5ffd25eb6c7/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L1450 // From: https://github.com/dotnet/corefx/blob/80e220fc7009de0f0611ee6b52d4d5ffd25eb6c7/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L1450
// Note: Roslyn accepts a control escape that current .Net parser does not. // Note: Roslyn accepts a control escape that current .NET parser does not.
// Specifically: \c[ // Specifically: \c[
// //
// It is a bug that the .Net parser does not support this construct. The bug was // It is a bug that the .NET parser does not support this construct. The bug was
// reported at: https://github.com/dotnet/corefx/issues/26501 and was fixed for // reported at: https://github.com/dotnet/corefx/issues/26501 and was fixed for
// CoreFx with https://github.com/dotnet/corefx/commit/80e220fc7009de0f0611ee6b52d4d5ffd25eb6c7 // CoreFx with https://github.com/dotnet/corefx/commit/80e220fc7009de0f0611ee6b52d4d5ffd25eb6c7
// //
// Because it was a bug, we follow the correct behavior. That means we will not // Because it was a bug, we follow the correct behavior. That means we will not
// report a diagnostic for a Regex that someone might run on a previous version of // report a diagnostic for a Regex that someone might run on a previous version of
// .Net that ends up throwing at runtime. That's acceptable. Our goal is to match // .NET that ends up throwing at runtime. That's acceptable. Our goal is to match
// the latest .Net 'correct' behavior. Not intermediary points with bugs that have // the latest .NET 'correct' behavior. Not intermediary points with bugs that have
// since been fixed. // since been fixed.
// \ca interpreted as \cA // \ca interpreted as \cA
......
...@@ -73,7 +73,7 @@ private static Option<T> CreateOption<T>(OptionGroup group, string name, T defau ...@@ -73,7 +73,7 @@ private static Option<T> CreateOption<T>(OptionGroup group, string name, T defau
/// Default value of 120 was picked based on the amount of code in a github.com diff at 1080p. /// Default value of 120 was picked based on the amount of code in a github.com diff at 1080p.
/// That resolution is the most common value as per the last DevDiv survey as well as the latest /// That resolution is the most common value as per the last DevDiv survey as well as the latest
/// Steam hardware survey. This also seems to a reasonable length default in that shorter /// Steam hardware survey. This also seems to a reasonable length default in that shorter
/// lengths can often feel too cramped for .Net languages, which are often starting with a /// lengths can often feel too cramped for .NET languages, which are often starting with a
/// default indentation of at least 16 (for namespace, class, member, plus the final construct /// default indentation of at least 16 (for namespace, class, member, plus the final construct
/// indentation). /// indentation).
/// </summary> /// </summary>
......
...@@ -18,7 +18,7 @@ public static bool OverlapsHiddenPosition(this SyntaxTree tree, TextSpan span, C ...@@ -18,7 +18,7 @@ public static bool OverlapsHiddenPosition(this SyntaxTree tree, TextSpan span, C
return text.OverlapsHiddenPosition(span, (position, cancellationToken2) => return text.OverlapsHiddenPosition(span, (position, cancellationToken2) =>
{ {
// implements the ASP.Net IsHidden rule // implements the ASP.NET IsHidden rule
var lineVisibility = tree.GetLineVisibility(position, cancellationToken2); var lineVisibility = tree.GetLineVisibility(position, cancellationToken2);
return lineVisibility == LineVisibility.Hidden || lineVisibility == LineVisibility.BeforeFirstLineDirective; return lineVisibility == LineVisibility.Hidden || lineVisibility == LineVisibility.BeforeFirstLineDirective;
}, },
......
...@@ -99,7 +99,7 @@ private static int ComputeK(int expectedCount, double falsePositiveProbability) ...@@ -99,7 +99,7 @@ private static int ComputeK(int expectedCount, double falsePositiveProbability)
/// This is needed over the normal 'string.GetHashCode()' because we need to be able to generate /// This is needed over the normal 'string.GetHashCode()' because we need to be able to generate
/// 'k' different well distributed hashes for any given string s. Also, we want to be able to /// 'k' different well distributed hashes for any given string s. Also, we want to be able to
/// generate these hashes without allocating any memory. My ideal solution would be to use an /// generate these hashes without allocating any memory. My ideal solution would be to use an
/// MD5 hash. However, there appears to be no way to do MD5 in .Net where you can: /// MD5 hash. However, there appears to be no way to do MD5 in .NET where you can:
/// ///
/// a) feed it individual values instead of a byte[] /// a) feed it individual values instead of a byte[]
/// ///
......
...@@ -89,7 +89,7 @@ public static T WaitAndGetResult_CanCallOnBackground<T>(this Task<T> task, Cance ...@@ -89,7 +89,7 @@ public static T WaitAndGetResult_CanCallOnBackground<T>(this Task<T> task, Cance
return task.Result; return task.Result;
} }
// NOTE(cyrusn): Once we switch over to .Net 4.5 we can make our SafeContinueWith overloads // NOTE(cyrusn): Once we switch over to .NET Framework 4.5 we can make our SafeContinueWith overloads
// simply call into task.ContinueWith(..., TaskContinuationOptions.LazyCancellation, ...) as // simply call into task.ContinueWith(..., TaskContinuationOptions.LazyCancellation, ...) as
// that will have the semantics that we want. From the TPL guys: // that will have the semantics that we want. From the TPL guys:
// //
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
namespace Microsoft.CodeAnalysis.Host namespace Microsoft.CodeAnalysis.Host
{ {
/// <summary> /// <summary>
/// Provides a way to map from an assembly name to the actual path of the .Net framework /// 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 /// assemby with that name in the context of a specified project. For example, if the
/// assembly name is "System.Data" then a project targetting .Net 2.0 would resolve this /// assembly name is "System.Data" then a project targetting .NET 2.0 would resolve this
/// to a different path than a project targetting .Net 4.5. /// to a different path than a project targetting .NET 4.5.
/// </summary> /// </summary>
internal interface IFrameworkAssemblyPathResolver : IWorkspaceService internal interface IFrameworkAssemblyPathResolver : IWorkspaceService
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册