提交 fca0fde0 编写于 作者: C Cyrus Najmabadi

Format this()/base() calls uniformly in the IDE.

上级 d570d6cc
......@@ -49,12 +49,12 @@ public ArrayBuilder(int size)
_builder = ImmutableArray.CreateBuilder<T>(size);
}
public ArrayBuilder() :
this(8)
public ArrayBuilder()
: this(8)
{ }
private ArrayBuilder(ObjectPool<ArrayBuilder<T>> pool) :
this()
private ArrayBuilder(ObjectPool<ArrayBuilder<T>> pool)
: this()
{
_pool = pool;
}
......
......@@ -19,8 +19,8 @@ internal class ExtractMethodCommandHandler :
public ExtractMethodCommandHandler(
ITextBufferUndoManagerProvider undoManager,
IEditorOperationsFactoryService editorOperationsFactoryService,
IInlineRenameService renameService) :
base(undoManager, editorOperationsFactoryService, renameService)
IInlineRenameService renameService)
: base(undoManager, editorOperationsFactoryService, renameService)
{
}
}
......
......@@ -33,9 +33,8 @@ internal class SmartTokenFormatterCommandHandler :
[ImportingConstructor]
public SmartTokenFormatterCommandHandler(
ITextUndoHistoryRegistry undoHistoryRegistry,
IEditorOperationsFactoryService editorOperationsFactoryService) :
base(undoHistoryRegistry,
editorOperationsFactoryService)
IEditorOperationsFactoryService editorOperationsFactoryService)
: base(undoHistoryRegistry, editorOperationsFactoryService)
{
}
......
......@@ -18,8 +18,8 @@ internal class PreviewConflictTaggerProvider
: AbstractPreviewTaggerProvider<ConflictTag>
{
[ImportingConstructor]
public PreviewConflictTaggerProvider() :
base(PredefinedPreviewTaggerKeys.ConflictSpansKey, ConflictTag.Instance)
public PreviewConflictTaggerProvider()
: base(PredefinedPreviewTaggerKeys.ConflictSpansKey, ConflictTag.Instance)
{
}
}
......
......@@ -23,8 +23,8 @@ internal class PreviewReferenceHighlightingTaggerProvider
: AbstractPreviewTaggerProvider<NavigableHighlightTag>
{
[ImportingConstructor]
public PreviewReferenceHighlightingTaggerProvider() :
base(PredefinedPreviewTaggerKeys.ReferenceHighlightingSpansKey, ReferenceHighlightTag.Instance)
public PreviewReferenceHighlightingTaggerProvider()
: base(PredefinedPreviewTaggerKeys.ReferenceHighlightingSpansKey, ReferenceHighlightTag.Instance)
{
}
}
......@@ -38,8 +38,8 @@ internal class PreviewWrittenReferenceHighlightingTaggerProvider
: AbstractPreviewTaggerProvider<NavigableHighlightTag>
{
[ImportingConstructor]
public PreviewWrittenReferenceHighlightingTaggerProvider() :
base(PredefinedPreviewTaggerKeys.WrittenReferenceHighlightingSpansKey, WrittenReferenceHighlightTag.Instance)
public PreviewWrittenReferenceHighlightingTaggerProvider()
: base(PredefinedPreviewTaggerKeys.WrittenReferenceHighlightingSpansKey, WrittenReferenceHighlightTag.Instance)
{
}
}
......@@ -53,8 +53,8 @@ internal class PreviewDefinitionHighlightingTaggerProvider
: AbstractPreviewTaggerProvider<NavigableHighlightTag>
{
[ImportingConstructor]
public PreviewDefinitionHighlightingTaggerProvider() :
base(PredefinedPreviewTaggerKeys.DefinitionHighlightingSpansKey, DefinitionHighlightTag.Instance)
public PreviewDefinitionHighlightingTaggerProvider()
: base(PredefinedPreviewTaggerKeys.DefinitionHighlightingSpansKey, DefinitionHighlightTag.Instance)
{
}
}
......
......@@ -19,8 +19,8 @@ internal class PreviewWarningTaggerProvider
: AbstractPreviewTaggerProvider<PreviewWarningTag>
{
[ImportingConstructor]
public PreviewWarningTaggerProvider() :
base(PredefinedPreviewTaggerKeys.WarningSpansKey, PreviewWarningTag.Instance)
public PreviewWarningTaggerProvider()
: base(PredefinedPreviewTaggerKeys.WarningSpansKey, PreviewWarningTag.Instance)
{
}
}
......
......@@ -26,8 +26,9 @@ internal class RoslynBlockTag : BlockTag
IEditorOptionsFactoryService editorOptionsFactoryService,
IBlockTag parent,
ITextSnapshot snapshot,
BlockSpan blockSpan) :
base(span: blockSpan.TextSpan.ToSnapshotSpan(snapshot),
BlockSpan blockSpan)
: base(
span: blockSpan.TextSpan.ToSnapshotSpan(snapshot),
statementSpan: blockSpan.HintSpan.ToSnapshotSpan(snapshot),
parent: parent,
type: blockSpan.Type,
......
......@@ -12,8 +12,8 @@ namespace Microsoft.CodeAnalysis.Editor.Commands
[ExcludeFromCodeCoverage]
internal class CopyCommandArgs : CommandArgs
{
public CopyCommandArgs(ITextView textView, ITextBuffer subjectBuffer) :
base(textView, subjectBuffer)
public CopyCommandArgs(ITextView textView, ITextBuffer subjectBuffer)
: base(textView, subjectBuffer)
{
}
}
......
......@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.Editor.Commands
[ExcludeFromCodeCoverage]
internal class PasteCommandArgs : CommandArgs
{
public PasteCommandArgs(ITextView textView, ITextBuffer subjectBuffer) :
base(textView, subjectBuffer)
public PasteCommandArgs(ITextView textView, ITextBuffer subjectBuffer)
: base(textView, subjectBuffer)
{
}
}
......
......@@ -13,8 +13,8 @@ internal class ExportCommandHandlerAttribute : ExportAttribute
public string Name { get; }
public IEnumerable<string> ContentTypes { get; }
public ExportCommandHandlerAttribute(string name, params string[] contentTypes) :
base(typeof(ICommandHandler))
public ExportCommandHandlerAttribute(string name, params string[] contentTypes)
: base(typeof(ICommandHandler))
{
this.Name = name;
this.ContentTypes = contentTypes;
......
......@@ -12,8 +12,8 @@ internal class ExportInteractiveAttribute : ExportAttribute
{
public IEnumerable<string> ContentTypes { get; }
public ExportInteractiveAttribute(Type t, params string[] contentTypes) :
base(t)
public ExportInteractiveAttribute(Type t, params string[] contentTypes)
: base(t)
{
this.ContentTypes = contentTypes;
}
......
......@@ -13,8 +13,8 @@ private class ParseOptionChangedEventSource : AbstractWorkspaceTrackingTaggerEve
{
private readonly object _gate = new object();
public ParseOptionChangedEventSource(ITextBuffer subjectBuffer, TaggerDelay delay) :
base(subjectBuffer, delay)
public ParseOptionChangedEventSource(ITextBuffer subjectBuffer, TaggerDelay delay)
: base(subjectBuffer, delay)
{
}
......
......@@ -16,8 +16,8 @@ private class SemanticChangedEventSource : AbstractWorkspaceTrackingTaggerEventS
{
private readonly ISemanticChangeNotificationService _notificationService;
public SemanticChangedEventSource(ITextBuffer subjectBuffer, TaggerDelay delay, ISemanticChangeNotificationService notificationService) :
base(subjectBuffer, delay)
public SemanticChangedEventSource(ITextBuffer subjectBuffer, TaggerDelay delay, ISemanticChangeNotificationService notificationService)
: base(subjectBuffer, delay)
{
_notificationService = notificationService;
}
......
......@@ -251,8 +251,8 @@ private struct DiffResult
public NormalizedSnapshotSpanCollection Added { get; }
public NormalizedSnapshotSpanCollection Removed { get; }
public DiffResult(List<SnapshotSpan> added, List<SnapshotSpan> removed) :
this(added?.Count == 0 ? null : (IEnumerable<SnapshotSpan>)added, removed?.Count == 0 ? null : (IEnumerable<SnapshotSpan>)removed)
public DiffResult(List<SnapshotSpan> added, List<SnapshotSpan> removed)
: this(added?.Count == 0 ? null : (IEnumerable<SnapshotSpan>)added, removed?.Count == 0 ? null : (IEnumerable<SnapshotSpan>)removed)
{
}
......
......@@ -120,8 +120,8 @@ private static TestTaggerEventSource CreateEventSource()
private sealed class TestTag : TextMarkerTag
{
public TestTag() :
base("Test")
public TestTag()
: base("Test")
{
}
}
......@@ -173,8 +173,8 @@ protected override Task ProduceTagsAsync(TaggerContext<TestTag> context, Documen
private sealed class TestTaggerEventSource : AbstractTaggerEventSource
{
public TestTaggerEventSource() :
base(delay: TaggerDelay.NearImmediate)
public TestTaggerEventSource()
: base(delay: TaggerDelay.NearImmediate)
{
}
......
......@@ -54,8 +54,8 @@ public static async Task<RemoteHostClient> CreateAsync(Workspace workspace, bool
Workspace workspace,
InProcRemoteServices inprocServices,
ReferenceCountedDisposable<RemotableDataJsonRpc> remotableDataRpc,
Stream stream) :
base(workspace)
Stream stream)
: base(workspace)
{
Contract.ThrowIfNull(remotableDataRpc);
......
......@@ -61,8 +61,8 @@ public sealed override Task RegisterCodeFixesAsync(CodeFixContext context)
private sealed class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(FeaturesResources.Add_braces, createChangedDocument, FeaturesResources.Add_braces)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(FeaturesResources.Add_braces, createChangedDocument, FeaturesResources.Add_braces)
{
}
}
......
......@@ -209,8 +209,8 @@ protected override bool TryGetNode(SyntaxNode root, TextSpan span, out SyntaxNod
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Document newDocument) :
base(title, c => Task.FromResult(newDocument))
public MyCodeAction(string title, Document newDocument)
: base(title, c => Task.FromResult(newDocument))
{
}
}
......
......@@ -126,8 +126,8 @@ private static bool TryGetIEnumerableSymbols(SemanticModel model, out INamedType
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Document newDocument) :
base(title, c => Task.FromResult(newDocument))
public MyCodeAction(string title, Document newDocument)
: base(title, c => Task.FromResult(newDocument))
{
}
}
......
......@@ -113,10 +113,10 @@ private static SyntaxNode TryGetStatementToFix(SyntaxNode node)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Add_await,
createChangedDocument,
CSharpFeaturesResources.Add_await)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Add_await,
createChangedDocument,
CSharpFeaturesResources.Add_await)
{
}
}
......
......@@ -193,10 +193,10 @@ static TypeSyntax TryGetSingleTypeArgument(TypeSyntax type)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Declare_as_nullable,
createChangedDocument,
CSharpFeaturesResources.Declare_as_nullable)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Declare_as_nullable,
createChangedDocument,
CSharpFeaturesResources.Declare_as_nullable)
{
}
}
......
......@@ -86,8 +86,8 @@ private ExpressionSyntax Recurse(ExpressionSyntax old)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -589,8 +589,8 @@ private static bool IsInDeconstructionAssignmentLeft(ExpressionSyntax node)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -284,8 +284,8 @@ static void Main()
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -105,8 +105,8 @@ private async Task<Document> UpdateDocumentAsync(Document document, SyntaxNode n
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders
{
internal class AsyncKeywordRecommender : AbstractSyntacticSingleKeywordRecommender
{
public AsyncKeywordRecommender() :
base(SyntaxKind.AsyncKeyword, isValidInPreprocessorContext: false)
public AsyncKeywordRecommender()
: base(SyntaxKind.AsyncKeyword, isValidInPreprocessorContext: false)
{
}
......
......@@ -82,8 +82,8 @@ protected override async Task FixAllAsync(Document document, ImmutableArray<Diag
private sealed class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Convert_switch_statement_to_expression, createChangedDocument)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Convert_switch_statement_to_expression, createChangedDocument)
{
}
}
......
......@@ -24,8 +24,8 @@ public static Task<AnalyzerResult> AnalyzeAsync(SelectionResult selectionResult,
return analyzer.AnalyzeAsync();
}
public CSharpAnalyzer(SelectionResult selectionResult, CancellationToken cancellationToken) :
base(selectionResult, cancellationToken)
public CSharpAnalyzer(SelectionResult selectionResult, CancellationToken cancellationToken)
: base(selectionResult, cancellationToken)
{
}
......
......@@ -21,8 +21,8 @@ private class ExpressionCodeGenerator : CSharpCodeGenerator
public ExpressionCodeGenerator(
InsertionPoint insertionPoint,
SelectionResult selectionResult,
AnalyzerResult analyzerResult) :
base(insertionPoint, selectionResult, analyzerResult)
AnalyzerResult analyzerResult)
: base(insertionPoint, selectionResult, analyzerResult)
{
}
......
......@@ -18,8 +18,8 @@ public class MultipleStatementsCodeGenerator : CSharpCodeGenerator
public MultipleStatementsCodeGenerator(
InsertionPoint insertionPoint,
SelectionResult selectionResult,
AnalyzerResult analyzerResult) :
base(insertionPoint, selectionResult, analyzerResult)
AnalyzerResult analyzerResult)
: base(insertionPoint, selectionResult, analyzerResult)
{
}
......
......@@ -18,8 +18,8 @@ public class SingleStatementCodeGenerator : CSharpCodeGenerator
public SingleStatementCodeGenerator(
InsertionPoint insertionPoint,
SelectionResult selectionResult,
AnalyzerResult analyzerResult) :
base(insertionPoint, selectionResult, analyzerResult)
AnalyzerResult analyzerResult)
: base(insertionPoint, selectionResult, analyzerResult)
{
}
......
......@@ -62,8 +62,8 @@ private abstract partial class CSharpCodeGenerator : CodeGenerator<StatementSynt
protected CSharpCodeGenerator(
InsertionPoint insertionPoint,
SelectionResult selectionResult,
AnalyzerResult analyzerResult) :
base(insertionPoint, selectionResult, analyzerResult)
AnalyzerResult analyzerResult)
: base(insertionPoint, selectionResult, analyzerResult)
{
Contract.ThrowIfFalse(this.SemanticDocument == selectionResult.SemanticDocument);
......
......@@ -25,8 +25,8 @@ public static async Task<CSharpTriviaResult> ProcessAsync(SelectionResult select
result);
}
private CSharpTriviaResult(SemanticDocument document, ITriviaSavedResult result) :
base(document, result, (int)SyntaxKind.EndOfLineTrivia, (int)SyntaxKind.WhitespaceTrivia)
private CSharpTriviaResult(SemanticDocument document, ITriviaSavedResult result)
: base(document, result, (int)SyntaxKind.EndOfLineTrivia, (int)SyntaxKind.WhitespaceTrivia)
{
}
......
......@@ -17,8 +17,8 @@ namespace Microsoft.CodeAnalysis.CSharp.ExtractMethod
{
internal partial class CSharpMethodExtractor : MethodExtractor
{
public CSharpMethodExtractor(CSharpSelectionResult result) :
base(result)
public CSharpMethodExtractor(CSharpSelectionResult result)
: base(result)
{
}
......
......@@ -24,8 +24,8 @@ private class ExpressionResult : CSharpSelectionResult
bool selectionInExpression,
SemanticDocument document,
SyntaxAnnotation firstTokenAnnotation,
SyntaxAnnotation lastTokenAnnotation) :
base(status, originalSpan, finalSpan, options, selectionInExpression, document, firstTokenAnnotation, lastTokenAnnotation)
SyntaxAnnotation lastTokenAnnotation)
: base(status, originalSpan, finalSpan, options, selectionInExpression, document, firstTokenAnnotation, lastTokenAnnotation)
{
}
......
......@@ -22,8 +22,8 @@ private class StatementResult : CSharpSelectionResult
bool selectionInExpression,
SemanticDocument document,
SyntaxAnnotation firstTokenAnnotation,
SyntaxAnnotation lastTokenAnnotation) :
base(status, originalSpan, finalSpan, options, selectionInExpression, document, firstTokenAnnotation, lastTokenAnnotation)
SyntaxAnnotation lastTokenAnnotation)
: base(status, originalSpan, finalSpan, options, selectionInExpression, document, firstTokenAnnotation, lastTokenAnnotation)
{
}
......
......@@ -65,9 +65,9 @@ internal abstract partial class CSharpSelectionResult : SelectionResult
bool selectionInExpression,
SemanticDocument document,
SyntaxAnnotation firstTokenAnnotation,
SyntaxAnnotation lastTokenAnnotation) :
base(status, originalSpan, finalSpan, options, selectionInExpression,
document, firstTokenAnnotation, lastTokenAnnotation)
SyntaxAnnotation lastTokenAnnotation)
: base(status, originalSpan, finalSpan, options, selectionInExpression,
document, firstTokenAnnotation, lastTokenAnnotation)
{
}
......
......@@ -23,8 +23,8 @@ internal partial class CSharpSelectionValidator : SelectionValidator
public CSharpSelectionValidator(
SemanticDocument document,
TextSpan textSpan,
OptionSet options) :
base(document, textSpan, options)
OptionSet options)
: base(document, textSpan, options)
{
}
......
......@@ -70,8 +70,8 @@ public override Task RegisterCodeFixesAsync(CodeFixContext context)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(FeaturesResources.Make_readonly_fields_writable, createChangedDocument)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(FeaturesResources.Make_readonly_fields_writable, createChangedDocument)
{
}
}
......
......@@ -60,8 +60,8 @@ protected override Task FixAllAsync(Document document, ImmutableArray<Diagnostic
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Remove_unused_function, createChangedDocument, CSharpFeaturesResources.Remove_unused_function)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Remove_unused_function, createChangedDocument, CSharpFeaturesResources.Remove_unused_function)
{
}
}
......
......@@ -156,10 +156,10 @@ private static ExpressionSyntax GenerateTupleDeclaration(ITypeSymbol typeSymbol,
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Use_explicit_type_instead_of_var,
createChangedDocument,
CSharpFeaturesResources.Use_explicit_type_instead_of_var)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Use_explicit_type_instead_of_var,
createChangedDocument,
CSharpFeaturesResources.Use_explicit_type_instead_of_var)
{
}
}
......
......@@ -59,10 +59,10 @@ internal static void ReplaceTypeWithVar(SyntaxEditor editor, SyntaxNode node)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.use_var_instead_of_explicit_type,
createChangedDocument,
CSharpFeaturesResources.use_var_instead_of_explicit_type)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.use_var_instead_of_explicit_type,
createChangedDocument,
CSharpFeaturesResources.use_var_instead_of_explicit_type)
{
}
}
......
......@@ -64,9 +64,9 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
private sealed class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(CSharpFeaturesResources.Use_explicit_type_instead_of_var,
createChangedDocument)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(CSharpFeaturesResources.Use_explicit_type_instead_of_var,
createChangedDocument)
{
}
}
......
......@@ -72,8 +72,8 @@ private static bool SymbolCandidatesContainsSupportedSymbols(SymbolInfo symbolIn
private class MyCodeAction : DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument, equivalenceKey: title)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument, equivalenceKey: title)
{
}
}
......
......@@ -55,8 +55,8 @@ protected static bool TryGetTaskType(SemanticModel semanticModel, out INamedType
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -40,8 +40,8 @@ public override FixAllProvider GetFixAllProvider()
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -85,8 +85,8 @@ private static string GetCodeActionId(string assemblyName, string abstractTypeFu
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string id) :
base(FeaturesResources.Implement_Abstract_Class, createChangedDocument, id)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string id)
: base(FeaturesResources.Implement_Abstract_Class, createChangedDocument, id)
{
}
}
......
......@@ -123,8 +123,8 @@ private TExpressionSyntax GetAwaitableExpression(TextSpan textSpan, SyntaxToken
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -97,8 +97,8 @@ private async Task<Document> AddRenameAnnotationAsync(Document document, SyntaxT
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -96,8 +96,8 @@ public override async Task ComputeRefactoringsAsync(CodeRefactoringContext conte
private class ChangeNamespaceCodeAction : SolutionChangeAction
{
public ChangeNamespaceCodeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) :
base(title, createChangedSolution)
public ChangeNamespaceCodeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution)
: base(title, createChangedSolution)
{
}
}
......
......@@ -259,8 +259,8 @@ private static bool ShouldIncludeFormatMethod(IMethodSymbol methodSymbol)
private class ConvertToInterpolatedStringCodeAction : CodeAction.DocumentChangeAction
{
public ConvertToInterpolatedStringCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public ConvertToInterpolatedStringCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -859,8 +859,8 @@ private class CollectNestedCompilationContext : CompilationStartAnalysisContext
{
public bool IsCompilationEndAnalyzer { get; private set; } = false;
public CollectNestedCompilationContext(Compilation compilation, AnalyzerOptions options, CancellationToken cancellationToken) :
base(compilation, options, cancellationToken)
public CollectNestedCompilationContext(Compilation compilation, AnalyzerOptions options, CancellationToken cancellationToken)
: base(compilation, options, cancellationToken)
{
}
......
......@@ -11,8 +11,8 @@ internal class AnalyzerUpdateArgsId : BuildToolId.Base<DiagnosticAnalyzer>, ISup
{
public DiagnosticAnalyzer Analyzer => _Field1;
protected AnalyzerUpdateArgsId(DiagnosticAnalyzer analyzer) :
base(analyzer)
protected AnalyzerUpdateArgsId(DiagnosticAnalyzer analyzer)
: base(analyzer)
{
}
......
......@@ -415,8 +415,8 @@ private void AssertIfNull(ImmutableArray<DiagnosticData> diagnostics)
public readonly object Id;
public readonly ImmutableArray<DiagnosticData> Diagnostics;
public Data(UpdatedEventArgs args) :
this(args, ImmutableArray<DiagnosticData>.Empty)
public Data(UpdatedEventArgs args)
: this(args, ImmutableArray<DiagnosticData>.Empty)
{
}
......
......@@ -40,8 +40,8 @@ public DocumentAnalysisData(VersionStamp version, ImmutableArray<DiagnosticData>
OldItems = default;
}
public DocumentAnalysisData(VersionStamp version, ImmutableArray<DiagnosticData> oldItems, ImmutableArray<DiagnosticData> newItems) :
this(version, newItems)
public DocumentAnalysisData(VersionStamp version, ImmutableArray<DiagnosticData> oldItems, ImmutableArray<DiagnosticData> newItems)
: this(version, newItems)
{
OldItems = oldItems;
}
......@@ -95,8 +95,8 @@ public ProjectAnalysisData(ProjectId projectId, VersionStamp version, ImmutableD
ProjectId projectId,
VersionStamp version,
ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> oldResult,
ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> newResult) :
this(projectId, version, newResult)
ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> newResult)
: this(projectId, version, newResult)
{
OldResult = oldResult;
}
......
......@@ -233,13 +233,13 @@ private ImmutableArray<DiagnosticData> FilterSuppressedDiagnostics(ImmutableArra
private class IDECachedDiagnosticGetter : DiagnosticGetter
{
public IDECachedDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, object id, bool includeSuppressedDiagnostics) :
base(owner, solution, projectId: null, documentId: null, id: id, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
public IDECachedDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, object id, bool includeSuppressedDiagnostics)
: base(owner, solution, projectId: null, documentId: null, id: id, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
{
}
public IDECachedDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, ProjectId projectId, DocumentId documentId, bool includeSuppressedDiagnostics) :
base(owner, solution, projectId, documentId, id: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
public IDECachedDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, ProjectId projectId, DocumentId documentId, bool includeSuppressedDiagnostics)
: base(owner, solution, projectId, documentId, id: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
{
}
......@@ -335,25 +335,25 @@ private class IDELatestDiagnosticGetter : DiagnosticGetter
{
private readonly ImmutableHashSet<string> _diagnosticIds;
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, object id, bool includeSuppressedDiagnostics) :
base(owner, solution, projectId: null, documentId: null, id: id, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, object id, bool includeSuppressedDiagnostics)
: base(owner, solution, projectId: null, documentId: null, id: id, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
{
_diagnosticIds = null;
}
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, ProjectId projectId, DocumentId documentId, bool includeSuppressedDiagnostics) :
base(owner, solution, projectId, documentId, id: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, ProjectId projectId, DocumentId documentId, bool includeSuppressedDiagnostics)
: base(owner, solution, projectId, documentId, id: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
{
_diagnosticIds = null;
}
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, ImmutableHashSet<string> diagnosticIds, Solution solution, ProjectId projectId, bool includeSuppressedDiagnostics) :
this(owner, diagnosticIds, solution, projectId, documentId: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, ImmutableHashSet<string> diagnosticIds, Solution solution, ProjectId projectId, bool includeSuppressedDiagnostics)
: this(owner, diagnosticIds, solution, projectId, documentId: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
{
}
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, ImmutableHashSet<string> diagnosticIds, Solution solution, ProjectId projectId, DocumentId documentId, bool includeSuppressedDiagnostics) :
base(owner, solution, projectId, documentId, id: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
public IDELatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, ImmutableHashSet<string> diagnosticIds, Solution solution, ProjectId projectId, DocumentId documentId, bool includeSuppressedDiagnostics)
: base(owner, solution, projectId, documentId, id: null, includeSuppressedDiagnostics: includeSuppressedDiagnostics)
{
_diagnosticIds = diagnosticIds;
}
......
......@@ -76,9 +76,9 @@ internal sealed partial class HostAnalyzerManager
/// </summary>
private readonly ConditionalWeakTable<DiagnosticAnalyzer, IReadOnlyCollection<DiagnosticDescriptor>> _descriptorCache;
public HostAnalyzerManager(Lazy<ImmutableArray<HostDiagnosticAnalyzerPackage>> hostAnalyzerPackages, IAnalyzerAssemblyLoader hostAnalyzerAssemblyLoader, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, PrimaryWorkspace primaryWorkspace) :
this(new Lazy<ImmutableArray<AnalyzerReference>>(() => CreateAnalyzerReferencesFromPackages(hostAnalyzerPackages.Value, new HostAnalyzerReferenceDiagnosticReporter(hostDiagnosticUpdateSource, primaryWorkspace), hostAnalyzerAssemblyLoader), isThreadSafe: true),
hostAnalyzerPackages, hostDiagnosticUpdateSource)
public HostAnalyzerManager(Lazy<ImmutableArray<HostDiagnosticAnalyzerPackage>> hostAnalyzerPackages, IAnalyzerAssemblyLoader hostAnalyzerAssemblyLoader, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, PrimaryWorkspace primaryWorkspace)
: this(new Lazy<ImmutableArray<AnalyzerReference>>(() => CreateAnalyzerReferencesFromPackages(hostAnalyzerPackages.Value, new HostAnalyzerReferenceDiagnosticReporter(hostDiagnosticUpdateSource, primaryWorkspace), hostAnalyzerAssemblyLoader), isThreadSafe: true),
hostAnalyzerPackages, hostDiagnosticUpdateSource)
{
}
......@@ -99,8 +99,8 @@ internal sealed partial class HostAnalyzerManager
}
// this is for testing
internal HostAnalyzerManager(ImmutableArray<AnalyzerReference> hostAnalyzerReferences, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource) :
this(new Lazy<ImmutableArray<AnalyzerReference>>(() => hostAnalyzerReferences), new Lazy<ImmutableArray<HostDiagnosticAnalyzerPackage>>(() => ImmutableArray<HostDiagnosticAnalyzerPackage>.Empty), hostDiagnosticUpdateSource)
internal HostAnalyzerManager(ImmutableArray<AnalyzerReference> hostAnalyzerReferences, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
: this(new Lazy<ImmutableArray<AnalyzerReference>>(() => hostAnalyzerReferences), new Lazy<ImmutableArray<HostDiagnosticAnalyzerPackage>>(() => ImmutableArray<HostDiagnosticAnalyzerPackage>.Empty), hostDiagnosticUpdateSource)
{
}
......
......@@ -11,8 +11,8 @@ internal class LiveDiagnosticUpdateArgsId : AnalyzerUpdateArgsId
public readonly object Key;
public readonly int Kind;
public LiveDiagnosticUpdateArgsId(DiagnosticAnalyzer analyzer, object key, int kind, string analyzerPackageName) :
base(analyzer)
public LiveDiagnosticUpdateArgsId(DiagnosticAnalyzer analyzer, object key, int kind, string analyzerPackageName)
: base(analyzer)
{
Contract.ThrowIfNull(key);
......
......@@ -413,14 +413,14 @@ public Result(Solution solutionWithProperty, string name, Glyph glyph)
Glyph = glyph;
}
public Result(Solution solutionWithProperty, string name, Glyph glyph, List<IFieldSymbol> failedFieldSymbols) :
this(solutionWithProperty, name, glyph)
public Result(Solution solutionWithProperty, string name, Glyph glyph, List<IFieldSymbol> failedFieldSymbols)
: this(solutionWithProperty, name, glyph)
{
FailedFields = failedFieldSymbols.ToImmutableArrayOrEmpty();
}
public Result(Solution originalSolution, params IFieldSymbol[] fields) :
this(originalSolution, string.Empty, Glyph.Error)
public Result(Solution originalSolution, params IFieldSymbol[] fields)
: this(originalSolution, string.Empty, Glyph.Error)
{
FailedFields = fields.ToImmutableArrayOrEmpty();
}
......
......@@ -194,8 +194,8 @@ private static void BuildMatrix()
bool readInside,
bool writtenInside,
bool readOutside,
bool writtenOutside) :
this()
bool writtenOutside)
: this()
{
DataFlowIn = dataFlowIn;
DataFlowOut = dataFlowOut;
......
......@@ -74,8 +74,8 @@ protected VariableSymbol(Compilation compilation, ITypeSymbol type)
protected abstract class NotMovableVariableSymbol : VariableSymbol
{
public NotMovableVariableSymbol(Compilation compilation, ITypeSymbol type) :
base(compilation, type)
public NotMovableVariableSymbol(Compilation compilation, ITypeSymbol type)
: base(compilation, type)
{
}
......@@ -103,8 +103,8 @@ protected class ParameterVariableSymbol : NotMovableVariableSymbol, IComparable<
{
private readonly IParameterSymbol _parameterSymbol;
public ParameterVariableSymbol(Compilation compilation, IParameterSymbol parameterSymbol, ITypeSymbol type) :
base(compilation, type)
public ParameterVariableSymbol(Compilation compilation, IParameterSymbol parameterSymbol, ITypeSymbol type)
: base(compilation, type)
{
Contract.ThrowIfNull(parameterSymbol);
_parameterSymbol = parameterSymbol;
......@@ -182,8 +182,8 @@ protected class LocalVariableSymbol<T> : VariableSymbol, IComparable<LocalVariab
private readonly ILocalSymbol _localSymbol;
private readonly HashSet<int> _nonNoisySet;
public LocalVariableSymbol(Compilation compilation, ILocalSymbol localSymbol, ITypeSymbol type, HashSet<int> nonNoisySet) :
base(compilation, type)
public LocalVariableSymbol(Compilation compilation, ILocalSymbol localSymbol, ITypeSymbol type, HashSet<int> nonNoisySet)
: base(compilation, type)
{
Contract.ThrowIfNull(localSymbol);
Contract.ThrowIfNull(nonNoisySet);
......@@ -299,8 +299,8 @@ protected class QueryVariableSymbol : NotMovableVariableSymbol, IComparable<Quer
{
private readonly IRangeVariableSymbol _symbol;
public QueryVariableSymbol(Compilation compilation, IRangeVariableSymbol symbol, ITypeSymbol type) :
base(compilation, type)
public QueryVariableSymbol(Compilation compilation, IRangeVariableSymbol symbol, ITypeSymbol type)
: base(compilation, type)
{
Contract.ThrowIfNull(symbol);
_symbol = symbol;
......
......@@ -9,13 +9,13 @@ internal partial class SelectionValidator
// null object
protected class NullSelectionResult : SelectionResult
{
public NullSelectionResult() :
this(OperationStatus.FailedWithUnknownReason)
public NullSelectionResult()
: this(OperationStatus.FailedWithUnknownReason)
{
}
protected NullSelectionResult(OperationStatus status) :
base(status)
protected NullSelectionResult(OperationStatus status)
: base(status)
{
}
......@@ -42,8 +42,8 @@ public override ITypeSymbol GetContainingScopeType()
protected class ErrorSelectionResult : NullSelectionResult
{
public ErrorSelectionResult(OperationStatus status) :
base(status.MakeFail())
public ErrorSelectionResult(OperationStatus status)
: base(status.MakeFail())
{
}
}
......
......@@ -332,8 +332,8 @@ private IEnumerable<INamespaceOrTypeSymbol> FilterAndSort(IEnumerable<SymbolResu
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument, equivalenceKey: title)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument, equivalenceKey: title)
{
}
}
......
......@@ -94,8 +94,8 @@ private async Task MakeFieldReadonlyAsync(Document document, SyntaxEditor editor
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(FeaturesResources.Add_readonly_modifier, createChangedDocument)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(FeaturesResources.Add_readonly_modifier, createChangedDocument)
{
}
}
......
......@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.Organizing.Organizers
[AttributeUsage(AttributeTargets.Class)]
internal class ExportSyntaxNodeOrganizerAttribute : ExportAttribute
{
public ExportSyntaxNodeOrganizerAttribute(string languageName) :
base(typeof(ISyntaxOrganizer))
public ExportSyntaxNodeOrganizerAttribute(string languageName)
: base(typeof(ISyntaxOrganizer))
{
Language = languageName;
}
......
......@@ -228,8 +228,8 @@ private int InsertPosition(ISwitchOperation switchStatement)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -39,8 +39,8 @@ public sealed override Task RegisterCodeFixesAsync(CodeFixContext context)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument) :
base(title, createChangedDocument)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
: base(title, createChangedDocument)
{
}
}
......
......@@ -121,8 +121,8 @@ protected static void AdjustAndAddAppropriateDeclaratorsToRemove(SyntaxNode pare
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(FeaturesResources.Remove_unused_member, createChangedDocument)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(FeaturesResources.Remove_unused_member, createChangedDocument)
{
}
}
......
......@@ -840,8 +840,8 @@ async Task<bool> TryRemoveUnusedLocalAsync(TLocalDeclarationStatementSyntax newD
private sealed class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string equivalenceKey) :
base(title, createChangedDocument, equivalenceKey)
public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string equivalenceKey)
: base(title, createChangedDocument, equivalenceKey)
{
}
}
......
......@@ -181,8 +181,8 @@ private void MergeNodesToRemove(HashSet<SyntaxNode> nodesToRemove)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(FeaturesResources.Remove_unused_variable, createChangedDocument, FeaturesResources.Remove_unused_variable)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(FeaturesResources.Remove_unused_variable, createChangedDocument, FeaturesResources.Remove_unused_variable)
{
}
}
......
......@@ -20,8 +20,8 @@ internal class SymbolKeySignatureHelpItem : SignatureHelpItem, IEquatable<Symbol
IEnumerable<TaggedText> separatorParts,
IEnumerable<TaggedText> suffixParts,
IEnumerable<SignatureHelpParameter> parameters,
IEnumerable<TaggedText> descriptionParts) :
base(isVariadic, documentationFactory, prefixParts, separatorParts, suffixParts, parameters, descriptionParts)
IEnumerable<TaggedText> descriptionParts)
: base(isVariadic, documentationFactory, prefixParts, separatorParts, suffixParts, parameters, descriptionParts)
{
SymbolKey = symbol?.GetSymbolKey();
}
......
......@@ -20,8 +20,8 @@ internal abstract class GlobalOperationAwareIdleProcessor : IdleProcessor
IAsynchronousOperationListener listener,
IGlobalOperationNotificationService globalOperationNotificationService,
int backOffTimeSpanInMs,
CancellationToken shutdownToken) :
base(listener, backOffTimeSpanInMs, shutdownToken)
CancellationToken shutdownToken)
: base(listener, backOffTimeSpanInMs, shutdownToken)
{
_globalOperation = null;
_globalOperationTask = Task.CompletedTask;
......
......@@ -29,8 +29,8 @@ private abstract class AbstractPriorityProcessor : GlobalOperationAwareIdleProce
Lazy<ImmutableArray<IIncrementalAnalyzer>> lazyAnalyzers,
IGlobalOperationNotificationService globalOperationNotificationService,
int backOffTimeSpanInMs,
CancellationToken shutdownToken) :
base(listener, globalOperationNotificationService, backOffTimeSpanInMs, shutdownToken)
CancellationToken shutdownToken)
: base(listener, globalOperationNotificationService, backOffTimeSpanInMs, shutdownToken)
{
_gate = new object();
_lazyAnalyzers = lazyAnalyzers;
......
......@@ -16,8 +16,8 @@ private class AsyncDocumentWorkItemQueue : AsyncWorkItemQueue<DocumentId>
{
private readonly Dictionary<ProjectId, Dictionary<DocumentId, WorkItem>> _documentWorkQueue = new Dictionary<ProjectId, Dictionary<DocumentId, WorkItem>>();
public AsyncDocumentWorkItemQueue(SolutionCrawlerProgressReporter progressReporter, Workspace workspace) :
base(progressReporter, workspace)
public AsyncDocumentWorkItemQueue(SolutionCrawlerProgressReporter progressReporter, Workspace workspace)
: base(progressReporter, workspace)
{
}
......
......@@ -17,8 +17,8 @@ private sealed class AsyncProjectWorkItemQueue : AsyncWorkItemQueue<ProjectId>
{
private readonly Dictionary<ProjectId, WorkItem> _projectWorkQueue = new Dictionary<ProjectId, WorkItem>();
public AsyncProjectWorkItemQueue(SolutionCrawlerProgressReporter progressReporter, Workspace workspace) :
base(progressReporter, workspace)
public AsyncProjectWorkItemQueue(SolutionCrawlerProgressReporter progressReporter, Workspace workspace)
: base(progressReporter, workspace)
{
}
......
......@@ -32,8 +32,8 @@ private sealed class HighPriorityProcessor : IdleProcessor
IncrementalAnalyzerProcessor processor,
Lazy<ImmutableArray<IIncrementalAnalyzer>> lazyAnalyzers,
int backOffTimeSpanInMs,
CancellationToken shutdownToken) :
base(listener, backOffTimeSpanInMs, shutdownToken)
CancellationToken shutdownToken)
: base(listener, backOffTimeSpanInMs, shutdownToken)
{
_processor = processor;
_lazyAnalyzers = lazyAnalyzers;
......
......@@ -29,8 +29,8 @@ private sealed class LowPriorityProcessor : AbstractPriorityProcessor
Lazy<ImmutableArray<IIncrementalAnalyzer>> lazyAnalyzers,
IGlobalOperationNotificationService globalOperationNotificationService,
int backOffTimeSpanInMs,
CancellationToken shutdownToken) :
base(listener, processor, lazyAnalyzers, globalOperationNotificationService, backOffTimeSpanInMs, shutdownToken)
CancellationToken shutdownToken)
: base(listener, processor, lazyAnalyzers, globalOperationNotificationService, backOffTimeSpanInMs, shutdownToken)
{
_workItemQueue = new AsyncProjectWorkItemQueue(processor._registration.ProgressReporter, processor._registration.Workspace);
......
......@@ -46,8 +46,8 @@ private sealed class NormalPriorityProcessor : AbstractPriorityProcessor
Lazy<ImmutableArray<IIncrementalAnalyzer>> lazyAnalyzers,
IGlobalOperationNotificationService globalOperationNotificationService,
int backOffTimeSpanInMs,
CancellationToken shutdownToken) :
base(listener, processor, lazyAnalyzers, globalOperationNotificationService, backOffTimeSpanInMs, shutdownToken)
CancellationToken shutdownToken)
: base(listener, processor, lazyAnalyzers, globalOperationNotificationService, backOffTimeSpanInMs, shutdownToken)
{
_running = Task.CompletedTask;
_workItemQueue = new AsyncDocumentWorkItemQueue(processor._registration.ProgressReporter, processor._registration.Workspace);
......
......@@ -41,8 +41,8 @@ private sealed class SemanticChangeProcessor : IdleProcessor
IncrementalAnalyzerProcessor documentWorkerProcessor,
int backOffTimeSpanInMS,
int projectBackOffTimeSpanInMS,
CancellationToken cancellationToken) :
base(listener, backOffTimeSpanInMS, cancellationToken)
CancellationToken cancellationToken)
: base(listener, backOffTimeSpanInMS, cancellationToken)
{
_gate = new SemaphoreSlim(initialCount: 0);
......@@ -355,8 +355,8 @@ private class ProjectProcessor : IdleProcessor
Registration registration,
IncrementalAnalyzerProcessor processor,
int backOffTimeSpanInMS,
CancellationToken cancellationToken) :
base(listener, backOffTimeSpanInMS, cancellationToken)
CancellationToken cancellationToken)
: base(listener, backOffTimeSpanInMS, cancellationToken)
{
_registration = registration;
_processor = processor;
......
......@@ -91,10 +91,10 @@ private class ImplicitCacheMonitor : IdleProcessor
private readonly ProjectCacheService _owner;
private readonly SemaphoreSlim _gate;
public ImplicitCacheMonitor(ProjectCacheService owner, int backOffTimeSpanInMS) :
base(AsynchronousOperationListenerProvider.NullListener,
backOffTimeSpanInMS,
CancellationToken.None)
public ImplicitCacheMonitor(ProjectCacheService owner, int backOffTimeSpanInMS)
: base(AsynchronousOperationListenerProvider.NullListener,
backOffTimeSpanInMS,
CancellationToken.None)
{
_owner = owner;
_gate = new SemaphoreSlim(0);
......
......@@ -22,8 +22,8 @@ internal sealed class CSharpGraphProvider : AbstractGraphProvider
IGlyphService glyphService,
SVsServiceProvider serviceProvider,
IProgressionPrimaryWorkspaceProvider workspaceProvider,
IAsynchronousOperationListenerProvider listenerProvider) :
base(threadingContext, glyphService, serviceProvider, workspaceProvider.PrimaryWorkspace, listenerProvider)
IAsynchronousOperationListenerProvider listenerProvider)
: base(threadingContext, glyphService, serviceProvider, workspaceProvider.PrimaryWorkspace, listenerProvider)
{
}
}
......
......@@ -41,8 +41,8 @@ internal class PreviewEngine : ForegroundThreadAffinitizedObject, IVsPreviewChan
public Solution FinalSolution { get; private set; }
public bool ShowCheckBoxes { get; private set; }
public PreviewEngine(IThreadingContext threadingContext, string title, string helpString, string description, string topLevelItemName, Glyph topLevelGlyph, Solution newSolution, Solution oldSolution, IComponentModel componentModel, bool showCheckBoxes = true) :
this(threadingContext, title, helpString, description, topLevelItemName, topLevelGlyph, newSolution, oldSolution, componentModel, null, showCheckBoxes)
public PreviewEngine(IThreadingContext threadingContext, string title, string helpString, string description, string topLevelItemName, Glyph topLevelGlyph, Solution newSolution, Solution oldSolution, IComponentModel componentModel, bool showCheckBoxes = true)
: this(threadingContext, title, helpString, description, topLevelItemName, topLevelGlyph, newSolution, oldSolution, componentModel, null, showCheckBoxes)
{
}
......
......@@ -58,8 +58,8 @@ internal sealed partial class MiscellaneousFilesWorkspace : Workspace, IRunningD
IMetadataAsSourceFileService fileTrackingMetadataAsSourceService,
SaveEventsService saveEventsService,
VisualStudioWorkspace visualStudioWorkspace,
SVsServiceProvider serviceProvider) :
base(visualStudioWorkspace.Services.HostServices, WorkspaceKind.MiscellaneousFiles)
SVsServiceProvider serviceProvider)
: base(visualStudioWorkspace.Services.HostServices, WorkspaceKind.MiscellaneousFiles)
{
_foregroundThreadAffinitization = new ForegroundThreadAffinitizedObject(threadingContext, assertIsForeground: true);
......
......@@ -26,10 +26,10 @@ private class SolutionChecksumUpdater : GlobalOperationAwareIdleProcessor
// hold last async token
private IAsyncToken _lastToken;
public SolutionChecksumUpdater(RemoteHostClientService service, CancellationToken shutdownToken) :
base(service.Listener,
service.Workspace.Services.GetService<IGlobalOperationNotificationService>(),
service.Workspace.Options.GetOption(RemoteHostOptions.SolutionChecksumMonitorBackOffTimeSpanInMS), shutdownToken)
public SolutionChecksumUpdater(RemoteHostClientService service, CancellationToken shutdownToken)
: base(service.Listener,
service.Workspace.Services.GetService<IGlobalOperationNotificationService>(),
service.Workspace.Options.GetOption(RemoteHostOptions.SolutionChecksumMonitorBackOffTimeSpanInMS), shutdownToken)
{
_service = service;
_textChangeQueue = new SimpleTaskQueue(TaskScheduler.Default);
......
......@@ -20,15 +20,15 @@ internal class MiscellaneousDiagnosticListTable : VisualStudioBaseDiagnosticList
private readonly LiveTableDataSource _source;
[ImportingConstructor]
public MiscellaneousDiagnosticListTable(MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
this((Workspace)workspace, diagnosticService, provider)
public MiscellaneousDiagnosticListTable(MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider)
: this((Workspace)workspace, diagnosticService, provider)
{
ConnectWorkspaceEvents();
}
/// this is for test only
internal MiscellaneousDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
base(workspace, diagnosticService, provider)
internal MiscellaneousDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider)
: base(workspace, diagnosticService, provider)
{
_source = new LiveTableDataSource(workspace, diagnosticService, IdentifierString);
AddInitialTableSource(workspace.CurrentSolution, _source);
......
......@@ -14,15 +14,15 @@ internal class MiscellaneousTodoListTable : VisualStudioBaseTodoListTable
internal const string IdentifierString = nameof(MiscellaneousTodoListTable);
[ImportingConstructor]
public MiscellaneousTodoListTable(MiscellaneousFilesWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
base(workspace, todoListProvider, IdentifierString, provider)
public MiscellaneousTodoListTable(MiscellaneousFilesWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider)
: base(workspace, todoListProvider, IdentifierString, provider)
{
ConnectWorkspaceEvents();
}
// only for test
public MiscellaneousTodoListTable(Microsoft.CodeAnalysis.Workspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
base(workspace, todoListProvider, IdentifierString, provider)
public MiscellaneousTodoListTable(Microsoft.CodeAnalysis.Workspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider)
: base(workspace, todoListProvider, IdentifierString, provider)
{
}
}
......
......@@ -195,8 +195,8 @@ public AbstractTableEntriesSnapshot<TItem> CreateSnapshot(int version, Immutable
private class EmptySnapshot : AbstractTableEntriesSnapshot<TItem>
{
public EmptySnapshot(int version) :
base(version, ImmutableArray<TItem>.Empty, ImmutableArray<ITrackingPoint>.Empty)
public EmptySnapshot(int version)
: base(version, ImmutableArray<TItem>.Empty, ImmutableArray<ITrackingPoint>.Empty)
{
}
......
......@@ -32,8 +32,8 @@ protected class LiveTableDataSource : AbstractRoslynTableDataSource<DiagnosticTa
private readonly Workspace _workspace;
private readonly OpenDocumentTracker<DiagnosticTableItem> _tracker;
public LiveTableDataSource(Workspace workspace, IDiagnosticService diagnosticService, string identifier) :
base(workspace)
public LiveTableDataSource(Workspace workspace, IDiagnosticService diagnosticService, string identifier)
: base(workspace)
{
_workspace = workspace;
_identifier = identifier;
......
......@@ -30,8 +30,8 @@ internal abstract partial class VisualStudioBaseDiagnosticListTable : AbstractTa
SuppressionStateColumnDefinition.ColumnName
};
protected VisualStudioBaseDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
base(workspace, provider, StandardTables.ErrorsTable)
protected VisualStudioBaseDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider)
: base(workspace, provider, StandardTables.ErrorsTable)
{
}
......
......@@ -35,8 +35,8 @@ internal class VisualStudioBaseTodoListTable : AbstractTable
private readonly TableDataSource _source;
protected VisualStudioBaseTodoListTable(Workspace workspace, ITodoListProvider todoListProvider, string identifier, ITableManagerProvider provider) :
base(workspace, provider, StandardTables.TasksTable)
protected VisualStudioBaseTodoListTable(Workspace workspace, ITodoListProvider todoListProvider, string identifier, ITableManagerProvider provider)
: base(workspace, provider, StandardTables.TasksTable)
{
_source = new TableDataSource(workspace, todoListProvider, identifier);
AddInitialTableSource(workspace.CurrentSolution, _source);
......@@ -75,8 +75,8 @@ private class TableDataSource : AbstractRoslynTableDataSource<TodoTableItem>
private readonly string _identifier;
private readonly ITodoListProvider _todoListProvider;
public TableDataSource(Workspace workspace, ITodoListProvider todoListProvider, string identifier) :
base(workspace)
public TableDataSource(Workspace workspace, ITodoListProvider todoListProvider, string identifier)
: base(workspace)
{
_workspace = workspace;
_identifier = identifier;
......
......@@ -121,8 +121,8 @@ private class TableEntriesSnapshot : AbstractTableEntriesSnapshot<DiagnosticTabl
private readonly DiagnosticTableEntriesSource _source;
public TableEntriesSnapshot(
DiagnosticTableEntriesSource source, int version, ImmutableArray<DiagnosticTableItem> items) :
base(version, items, ImmutableArray<ITrackingPoint>.Empty)
DiagnosticTableEntriesSource source, int version, ImmutableArray<DiagnosticTableItem> items)
: base(version, items, ImmutableArray<ITrackingPoint>.Empty)
{
_source = source;
}
......
......@@ -30,8 +30,8 @@ internal partial class VisualStudioDiagnosticListTable : VisualStudioBaseDiagnos
VisualStudioWorkspace workspace,
IDiagnosticService diagnosticService,
ExternalErrorDiagnosticUpdateSource errorSource,
ITableManagerProvider provider) :
this(workspace, diagnosticService, errorSource, provider)
ITableManagerProvider provider)
: this(workspace, diagnosticService, errorSource, provider)
{
ConnectWorkspaceEvents();
......@@ -58,15 +58,15 @@ private ITableDataSource GetCurrentDataSource()
}
/// this is for test only
internal VisualStudioDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
this(workspace, diagnosticService, errorSource: null, provider)
internal VisualStudioDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider)
: this(workspace, diagnosticService, errorSource: null, provider)
{
AddInitialTableSource(workspace.CurrentSolution, _liveTableSource);
}
/// this is for test only
internal VisualStudioDiagnosticListTable(Workspace workspace, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider) :
this(workspace, diagnosticService: null, errorSource, provider)
internal VisualStudioDiagnosticListTable(Workspace workspace, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider)
: this(workspace, diagnosticService: null, errorSource, provider)
{
AddInitialTableSource(workspace.CurrentSolution, _buildTableSource);
}
......@@ -75,8 +75,8 @@ private ITableDataSource GetCurrentDataSource()
Workspace workspace,
IDiagnosticService diagnosticService,
ExternalErrorDiagnosticUpdateSource errorSource,
ITableManagerProvider provider) :
base(workspace, diagnosticService, provider)
ITableManagerProvider provider)
: base(workspace, diagnosticService, provider)
{
_liveTableSource = new LiveTableDataSource(workspace, diagnosticService, IdentifierString);
_buildTableSource = new BuildTableDataSource(workspace, errorSource);
......
......@@ -15,15 +15,15 @@ internal class VisualStudioTodoListTable : VisualStudioBaseTodoListTable
internal const string IdentifierString = nameof(VisualStudioTodoListTable);
[ImportingConstructor]
public VisualStudioTodoListTable(VisualStudioWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
base(workspace, todoListProvider, IdentifierString, provider)
public VisualStudioTodoListTable(VisualStudioWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider)
: base(workspace, todoListProvider, IdentifierString, provider)
{
ConnectWorkspaceEvents();
}
// only for test
public VisualStudioTodoListTable(Workspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
base(workspace, todoListProvider, IdentifierString, provider)
public VisualStudioTodoListTable(Workspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider)
: base(workspace, todoListProvider, IdentifierString, provider)
{
}
}
......
......@@ -9,18 +9,18 @@ namespace Roslyn.VisualStudio.Next.UnitTests.Mocks
{
internal class TestAssetSource : SimpleAssetSource
{
public TestAssetSource(AssetStorage assetStorage) :
this(assetStorage, new Dictionary<Checksum, object>())
public TestAssetSource(AssetStorage assetStorage)
: this(assetStorage, new Dictionary<Checksum, object>())
{
}
public TestAssetSource(AssetStorage assetStorage, Checksum checksum, object data) :
this(assetStorage, new Dictionary<Checksum, object>() { { checksum, data } })
public TestAssetSource(AssetStorage assetStorage, Checksum checksum, object data)
: this(assetStorage, new Dictionary<Checksum, object>() { { checksum, data } })
{
}
public TestAssetSource(AssetStorage assetStorage, Dictionary<Checksum, object> map) :
base(assetStorage, map)
public TestAssetSource(AssetStorage assetStorage, Dictionary<Checksum, object> map)
: base(assetStorage, map)
{
}
}
......
......@@ -254,8 +254,8 @@ private IDiagnosticAnalyzerService GetDiagnosticAnalyzerService(IEnumerable<Anal
private class TestService : ServiceHubServiceBase
{
public TestService(Stream stream, IServiceProvider serviceProvider) :
base(serviceProvider, stream)
public TestService(Stream stream, IServiceProvider serviceProvider)
: base(serviceProvider, stream)
{
Event = new ManualResetEvent(false);
......
......@@ -18,8 +18,8 @@ public class DiagnosticsWindow : ToolWindowPane
/// <summary>
/// Standard constructor for the tool window.
/// </summary>
public DiagnosticsWindow(object context) :
base(null)
public DiagnosticsWindow(object context)
: base(null)
{
// Set the window title reading it from the resources.
this.Caption = Resources.ToolWindowTitle;
......
......@@ -53,8 +53,8 @@ public sealed override Task RegisterCodeFixesAsync(CodeFixContext context)
private class MyCodeAction : CodeAction.DocumentChangeAction
{
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument) :
base(Resources.RemoveUnnecessaryNamespaces, createChangedDocument)
public MyCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument)
: base(Resources.RemoveUnnecessaryNamespaces, createChangedDocument)
{
}
}
......
......@@ -26,8 +26,8 @@ private class DirectiveWalker : CSharpSyntaxWalker
public DirectiveWalker(
IDictionary<DirectiveTriviaSyntax, DirectiveTriviaSyntax> directiveMap,
IDictionary<DirectiveTriviaSyntax, IReadOnlyList<DirectiveTriviaSyntax>> conditionalMap,
CancellationToken cancellationToken) :
base(SyntaxWalkerDepth.Token)
CancellationToken cancellationToken)
: base(SyntaxWalkerDepth.Token)
{
_directiveMap = directiveMap;
_conditionalMap = conditionalMap;
......
......@@ -15,8 +15,8 @@ namespace Microsoft.CodeAnalysis.CSharp.Formatting
{
internal class AggregatedFormattingResult : AbstractAggregatedFormattingResult
{
public AggregatedFormattingResult(SyntaxNode node, IList<AbstractFormattingResult> results, SimpleIntervalTree<TextSpan> formattingSpans) :
base(node, results, formattingSpans)
public AggregatedFormattingResult(SyntaxNode node, IList<AbstractFormattingResult> results, SimpleIntervalTree<TextSpan> formattingSpans)
: base(node, results, formattingSpans)
{
}
......
......@@ -14,8 +14,8 @@ internal class CSharpFormatEngine : AbstractFormatEngine
OptionSet optionSet,
IEnumerable<AbstractFormattingRule> formattingRules,
SyntaxToken token1,
SyntaxToken token2) :
base(TreeData.Create(node),
SyntaxToken token2)
: base(TreeData.Create(node),
optionSet,
formattingRules,
token1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册