提交 14a937c9 编写于 作者: R RoslynTeam

Merge branch 'master' of https://git01.codeplex.com/forks/derekschindelman/djscorrections

capitalization and grammar of comments in several folders.
......@@ -53,7 +53,7 @@ public static async Task<Document> CaseCorrectAsync(Document document, IEnumerab
}
/// <summary>
/// case correct only things that doesn't require semantic information
/// Case correct only things that don't require semantic information
/// </summary>
internal static SyntaxNode CaseCorrect(SyntaxNode root, IEnumerable<TextSpan> spans, Workspace workspace, CancellationToken cancellationToken = default(CancellationToken))
{
......
......@@ -16,7 +16,7 @@ internal interface ICaseCorrectionService : ILanguageService
Task<Document> CaseCorrectAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken);
/// <summary>
/// case corrects only things that doesn't require semantic information
/// Case corrects only things that don't require semantic information
/// </summary>
SyntaxNode CaseCorrect(SyntaxNode root, IEnumerable<TextSpan> spans, Workspace workspace, CancellationToken cancellationToken);
}
......
......@@ -14,14 +14,14 @@
namespace Microsoft.CodeAnalysis.CodeCleanup
{
/// <summary>
/// static CodeCleaner class that provides default code cleaning behavior
/// Static CodeCleaner class that provides default code cleaning behavior.
/// </summary>
internal static class CodeCleaner
{
/// <summary>
/// return default code cleaners for a given document
/// Return default code cleaners for a given document.
///
/// this can be modified and given to Cleanup method to provide different cleaners
/// This can be modified and given to the Cleanup method to provide different cleaners.
/// </summary>
public static IEnumerable<ICodeCleanupProvider> GetDefaultProviders(Document document)
{
......@@ -42,8 +42,8 @@ public static IEnumerable<ICodeCleanupProvider> GetDefaultProviders(Document doc
}
/// <summary>
/// Clean up the whole document.
/// Optionally you can provide your own options and code cleaners. otherwise, default will be used.
/// Cleans up the whole document.
/// Optionally you can provide your own options and code cleaners. Otherwise, the default will be used.
/// </summary>
public static async Task<Document> CleanupAsync(Document document, IEnumerable<ICodeCleanupProvider> providers = null, CancellationToken cancellationToken = default(CancellationToken))
{
......@@ -52,8 +52,8 @@ public static async Task<Document> CleanupAsync(Document document, IEnumerable<I
}
/// <summary>
/// Clean up the document marked with the provided annotation.
/// Optionally you can provide your own options and code cleaners. otherwise, default will be used.
/// Cleans up the document marked with the provided annotation.
/// Optionally you can provide your own options and code cleaners. Otherwise, the default will be used.
/// </summary>
public static async Task<Document> CleanupAsync(Document document, SyntaxAnnotation annotation, IEnumerable<ICodeCleanupProvider> providers = null, CancellationToken cancellationToken = default(CancellationToken))
{
......@@ -62,8 +62,8 @@ public static async Task<Document> CleanupAsync(Document document, SyntaxAnnotat
}
/// <summary>
/// Clean up the provided span in the document
/// Optionally you can provide your own options and code cleaners. otherwise, default will be used.
/// Clean up the provided span in the document.
/// Optionally you can provide your own options and code cleaners. Otherwise, the default will be used.
/// </summary>
public static Task<Document> CleanupAsync(Document document, TextSpan span, IEnumerable<ICodeCleanupProvider> providers = null, CancellationToken cancellationToken = default(CancellationToken))
{
......@@ -71,8 +71,8 @@ public static Task<Document> CleanupAsync(Document document, TextSpan span, IEnu
}
/// <summary>
/// Clean up the provided spans in the document
/// Optionally you can provide your own options and code cleaners. otherwise, default will be used.
/// Clean up the provided spans in the document.
/// Optionally you can provide your own options and code cleaners. Otherwise, the default will be used.
/// </summary>
public static Task<Document> CleanupAsync(Document document, IEnumerable<TextSpan> spans, IEnumerable<ICodeCleanupProvider> providers = null, CancellationToken cancellationToken = default(CancellationToken))
{
......@@ -81,8 +81,8 @@ public static Task<Document> CleanupAsync(Document document, IEnumerable<TextSpa
}
/// <summary>
/// Clean up the provided span in the node
/// this will only cleanup stuff that doesn't require semantic information
/// Clean up the provided span in the node.
/// This will only cleanup stuff that doesn't require semantic information.
/// </summary>
public static SyntaxNode Cleanup(SyntaxNode root, TextSpan span, Workspace workspace, IEnumerable<ICodeCleanupProvider> providers = null, CancellationToken cancellationToken = default(CancellationToken))
{
......@@ -90,8 +90,8 @@ public static SyntaxNode Cleanup(SyntaxNode root, TextSpan span, Workspace works
}
/// <summary>
/// Clean up the provided spans in the node
/// this will only cleanup stuff that doesn't require semantic information
/// Clean up the provided spans in the node.
/// This will only cleanup stuff that doesn't require semantic information.
/// </summary>
public static SyntaxNode Cleanup(SyntaxNode root, IEnumerable<TextSpan> spans, Workspace workspace, IEnumerable<ICodeCleanupProvider> providers = null, CancellationToken cancellationToken = default(CancellationToken))
{
......
......@@ -10,26 +10,26 @@
namespace Microsoft.CodeAnalysis.CodeCleanup
{
/// <summary>
/// internal code cleanup service interface
/// Internal code cleanup service interface.
///
/// this is not supposed to be used directly. it just provide a way to get the right service from each language
/// This is not supposed to be used directly. It just provides a way to get the right service from each language.
/// </summary>
internal interface ICodeCleanerService : ILanguageService
{
/// <summary>
/// returns default code cleaners
/// Returns the default code cleaners.
/// </summary>
IEnumerable<ICodeCleanupProvider> GetDefaultProviders();
/// <summary>
/// this will run all provided code cleaners in an order that is given to the method.
/// This will run all provided code cleaners in an order that is given to the method.
/// </summary>
Task<Document> CleanupAsync(Document document, IEnumerable<TextSpan> spans, IEnumerable<ICodeCleanupProvider> providers, CancellationToken cancellationToken);
/// <summary>
/// this will run all provided code cleaners in an order that is given to the method.
/// This will run all provided code cleaners in an order that is given to the method.
///
/// this will do cleanups that doesn't require any semantic information
/// This will do cleanups that don't require any semantic information.
/// </summary>
SyntaxNode Cleanup(SyntaxNode root, IEnumerable<TextSpan> spans, Workspace workspace, IEnumerable<ICodeCleanupProvider> providers, CancellationToken cancellationToken);
}
......
......@@ -8,7 +8,7 @@
namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
{
/// <summary>
/// Specifies the exact type of the code cleanup exported
/// Specifies the exact type of the code cleanup exported.
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class)]
......
......@@ -17,7 +17,7 @@ public string Name
public async Task<Document> CleanupAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken)
{
// if old text already exist, use fast path for formatting
// If the old text already exists, use the fast path for formatting.
SourceText oldText;
if (document.TryGetText(out oldText))
{
......@@ -31,7 +31,7 @@ public async Task<Document> CleanupAsync(Document document, IEnumerable<TextSpan
public SyntaxNode Cleanup(SyntaxNode root, IEnumerable<TextSpan> spans, Workspace workspace, CancellationToken cancellationToken)
{
// if old text already exist, use fast path for formatting
// If the old text already exists, use the fast path for formatting.
SourceText oldText;
if (root.SyntaxTree != null && root.SyntaxTree.TryGetText(out oldText))
{
......
......@@ -8,24 +8,24 @@
namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
{
/// <summary>
/// code cleaner that requires semantic information to do its job
/// A code cleaner that requires semantic information to do its job.
/// </summary>
internal interface ICodeCleanupProvider
{
/// <summary>
/// return name of this provider
/// Returns the name of this provider.
/// </summary>
string Name { get; }
/// <summary>
/// this should apply its code clean up logic to the spans of the document
/// This should apply its code clean up logic to the spans of the document.
/// </summary>
Task<Document> CleanupAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// this will run all provided code cleaners in an order that is given to the method.
/// This will run all provided code cleaners in an order that is given to the method.
///
/// this will do cleanups that doesn't require any semantic information
/// This will do cleanups that don't require any semantic information
/// </summary>
SyntaxNode Cleanup(SyntaxNode root, IEnumerable<TextSpan> spans, Workspace workspace, CancellationToken cancellationToken = default(CancellationToken));
}
......
......@@ -10,7 +10,7 @@
namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
{
/// <summary>
/// simple helper class that returns ICodeCleanup implementation
/// Helper class that implements <see cref="ICodeCleanupProvider"/> using delegates passed to its constructor.
/// </summary>
internal class SimpleCodeCleanupProvider : ICodeCleanupProvider
{
......
......@@ -185,7 +185,7 @@ protected static T Cast<T>(object value)
var currentDestination = destination;
// Filter out the members that are implicitly declared. THey're implicit, hence we do
// Filter out the members that are implicitly declared. They're implicit, hence we do
// not want an explicit declaration.
var filteredMembers = membersList.Where(m => !m.IsImplicitlyDeclared);
......
......@@ -144,8 +144,8 @@ class NestedType
#endif
// If we're at the specified context location, but we're trying to find the most
// relevant part for C, then we want to pick the part in C.cs not the one in
// C.NestedType.cs that contains the context location. This is because this simply
// container really isn't really used by the user to place code, but is instead just
// C.NestedType.cs that contains the context location. This is because this
// container isn't really used by the user to place code, but is instead just
// used to separate out the nested type. It would be nice to detect this and do the
// right thing.
declaration = await SelectFirstOrDefaultAsync(declarations, token.Parent.AncestorsAndSelf().Contains, cancellationToken).ConfigureAwait(false);
......
......@@ -18,7 +18,7 @@ internal abstract partial class AbstractCodeGenerator : IComparer<ValueTuple<IFi
protected SyntaxNode CreateEnumConstantValue(INamedTypeSymbol enumType, object constantValue)
{
// Code copied from System.Enum
// Code copied from System.Enum.
var isFlagsEnum = IsFlagsEnum(enumType);
if (isFlagsEnum)
{
......@@ -100,7 +100,7 @@ private SyntaxNode CreateFlagsEnumConstantValue(INamedTypeSymbol enumType, objec
var syntaxFactory = GetSyntaxFactory();
// We were able to represent this number as a bitwise or of valid flags.
// We were able to represent this number as a bitwise OR of valid flags.
if (result == 0 && usedFieldsAndValues.Count > 0)
{
// We want to emit the fields in lower to higher value. So we walk backward.
......
......@@ -9,7 +9,7 @@
namespace Microsoft.CodeAnalysis.CodeGeneration
{
/// <summary>
/// Options for controlling the code produced by the ICodeGenerationService.
/// Options for controlling the code produced by the <see cref="ICodeGenerationService"/>.
/// </summary>
public class CodeGenerationOptions
{
......
......@@ -87,7 +87,7 @@ public override int GetHashCode()
return hash;
}
// has to be 'internal' for now as it's used by EnC test tool
// Has to be 'internal' for now as it's used by EnC test tool
internal string GetDebuggerDisplay()
{
string result = Kind.ToString();
......
......@@ -34,13 +34,13 @@ internal Match(TNode root1, TNode root2, TreeComparer<TNode> nodeComparer, IEnum
int labelCount = nodeComparer.LabelCount;
// calculate chains (not including root node):
// Calculate chains (not including root node):
int count1, count2;
List<TNode>[] nodes1, nodes2;
CategorizeNodesByLabels(root1, labelCount, out nodes1, out count1);
CategorizeNodesByLabels(root2, labelCount, out nodes2, out count2);
// calculate match:
// Calculate match:
this.oneToTwo = new Dictionary<TNode, TNode>(count1);
this.twoToOne = new Dictionary<TNode, TNode>(count2);
......
......@@ -72,14 +72,14 @@ private object LoadOptionFromSerializerOrGetDefault(OptionKey optionKey)
{
foreach (var serializer in optionSerializers)
{
// there can be options (ex, formatting) that only exist in only one specific language. in those cases,
// There can be options (ex, formatting) that only exist in only one specific language. In those cases,
// feature's serialzier should exist in only that language.
if (!SupportedSerializer(optionKey, serializer.Metadata))
{
continue;
}
// We have one a deserializer, so deserialize and use that value
// We have a deserializer, so deserialize and use that value.
object deserializedValue;
if (serializer.Value.TryFetch(optionKey, out deserializedValue))
{
......@@ -151,7 +151,7 @@ public void SetOptions(OptionSet optionSet)
if (object.Equals(currentValue, setValue))
{
// Identical, so nothing changing
// Identical, so nothing is changing
continue;
}
......@@ -165,7 +165,7 @@ public void SetOptions(OptionSet optionSet)
{
foreach (var serializer in optionSerializers)
{
// there can be options (ex, formatting) that only exist in only one specific language. in those cases,
// There can be options (ex, formatting) that only exist in only one specific language. In those cases,
// feature's serialzier should exist in only that language.
if (!SupportedSerializer(optionKey, serializer.Metadata))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册