提交 9864f50f 编写于 作者: S Sam Harwell

Make importing constructors public to fix RS0034 (Exported parts should have ImportingConstructor)

上级 292bafdc
......@@ -17,7 +17,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.TextStructureNavigation
internal class TextStructureNavigatorProvider : AbstractTextStructureNavigatorProvider
{
[ImportingConstructor]
internal TextStructureNavigatorProvider(
public TextStructureNavigatorProvider(
ITextStructureNavigatorSelectorService selectorService,
IContentTypeRegistryService contentTypeService,
IWaitIndicator waitIndicator)
......
......@@ -17,7 +17,7 @@ internal sealed class ClassificationTypeFormatDefinitions
private class BraceMatchingFormatDefinition : ClassificationFormatDefinition
{
[ImportingConstructor]
private BraceMatchingFormatDefinition()
public BraceMatchingFormatDefinition()
{
this.DisplayName = EditorFeaturesResources.Brace_Matching;
this.BackgroundColor = Color.FromRgb(0xDB, 0xE0, 0xCC);
......
......@@ -20,7 +20,7 @@ namespace Microsoft.CodeAnalysis.Editor.Diagnostics
internal sealed class UnnecessaryCodeFormatDefinition : ClassificationFormatDefinition
{
[ImportingConstructor]
private UnnecessaryCodeFormatDefinition()
public UnnecessaryCodeFormatDefinition()
{
this.DisplayName = EditorFeaturesResources.Unnecessary_Code;
this.ForegroundOpacity = 0.6;
......
......@@ -26,7 +26,7 @@ internal sealed class ClassificationTypeDefinitions
private class InlineRenameFieldFormatDefinition : ClassificationFormatDefinition
{
[ImportingConstructor]
private InlineRenameFieldFormatDefinition()
public InlineRenameFieldFormatDefinition()
{
this.DisplayName = EditorFeaturesResources.Inline_Rename_Field_Text;
this.ForegroundColor = Color.FromRgb(0x00, 0x64, 0x00);
......
......@@ -13,7 +13,7 @@ internal sealed class InteractiveDocumentNavigationServiceFactory : IWorkspaceSe
private readonly IDocumentNavigationService _singleton;
[ImportingConstructor]
private InteractiveDocumentNavigationServiceFactory()
public InteractiveDocumentNavigationServiceFactory()
{
_singleton = new InteractiveDocumentNavigationService();
}
......
......@@ -37,7 +37,7 @@ internal class FindReferencesCommandHandler : VSCommanding.ICommandHandler<FindR
public string DisplayName => EditorFeaturesResources.Find_References;
[ImportingConstructor]
internal FindReferencesCommandHandler(
public FindReferencesCommandHandler(
[ImportMany] IEnumerable<Lazy<IStreamingFindUsagesPresenter>> streamingPresenters,
IAsynchronousOperationListenerProvider listenerProvider)
{
......
......@@ -34,7 +34,7 @@ internal class CommentUncommentSelectionCommandHandler :
private readonly IEditorOperationsFactoryService _editorOperationsFactoryService;
[ImportingConstructor]
internal CommentUncommentSelectionCommandHandler(
public CommentUncommentSelectionCommandHandler(
ITextUndoHistoryRegistry undoHistoryRegistry,
IEditorOperationsFactoryService editorOperationsFactoryService)
{
......
......@@ -31,7 +31,7 @@ internal sealed class ActiveStatementTrackingService : IActiveStatementTrackingS
private TrackingSession _sessionOpt;
[ImportingConstructor]
internal ActiveStatementTrackingService()
public ActiveStatementTrackingService()
{
}
......
......@@ -21,7 +21,7 @@ internal class PeekableItemFactory : IPeekableItemFactory
private readonly IMetadataAsSourceFileService _metadataAsSourceFileService;
[ImportingConstructor]
private PeekableItemFactory(IMetadataAsSourceFileService metadataAsSourceFileService)
public PeekableItemFactory(IMetadataAsSourceFileService metadataAsSourceFileService)
{
_metadataAsSourceFileService = metadataAsSourceFileService;
}
......
......@@ -19,7 +19,7 @@ internal class ClassificationTypeMap
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
internal ClassificationTypeMap(
public ClassificationTypeMap(
IClassificationTypeRegistryService registryService)
{
_registryService = registryService;
......
......@@ -23,7 +23,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.AutomaticCompletion
Inherits AbstractAutomaticLineEnderCommandHandler
<ImportingConstructor>
Friend Sub New(undoRegistry As ITextUndoHistoryRegistry,
Public Sub New(undoRegistry As ITextUndoHistoryRegistry,
editorOperations As IEditorOperationsFactoryService)
MyBase.New(undoRegistry, editorOperations)
......
......@@ -48,7 +48,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.LineCommit
End Property
<ImportingConstructor()>
Friend Sub New(
Public Sub New(
bufferManagerFactory As CommitBufferManagerFactory,
editorOperationsFactoryService As IEditorOperationsFactoryService,
smartIndentationService As ISmartIndentationService,
......
......@@ -15,7 +15,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.TextStructureNavigation
Inherits AbstractTextStructureNavigatorProvider
<ImportingConstructor()>
Friend Sub New(
Public Sub New(
selectorService As ITextStructureNavigatorSelectorService,
contentTypeService As IContentTypeRegistryService,
waitIndicator As IWaitIndicator)
......
......@@ -18,7 +18,7 @@ internal partial class CSharpCodeModelServiceFactory : ILanguageServiceFactory
private readonly IEnumerable<IRefactorNotifyService> _refactorNotifyServices;
[ImportingConstructor]
private CSharpCodeModelServiceFactory(
public CSharpCodeModelServiceFactory(
IEditorOptionsFactoryService editorOptionsFactoryService,
[ImportMany] IEnumerable<IRefactorNotifyService> refactorNotifyServices)
{
......
......@@ -28,7 +28,7 @@ internal sealed partial class EventHookupSessionManager : ForegroundThreadAffini
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
internal EventHookupSessionManager(IThreadingContext threadingContext, IToolTipService toolTipService)
public EventHookupSessionManager(IThreadingContext threadingContext, IToolTipService toolTipService)
: base(threadingContext)
{
_toolTipService = toolTipService;
......
......@@ -18,7 +18,7 @@ internal class CSharpSyncClassViewCommandHandler : AbstractSyncClassViewCommandH
{
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
private CSharpSyncClassViewCommandHandler(IThreadingContext threadingContext, SVsServiceProvider serviceProvider)
public CSharpSyncClassViewCommandHandler(IThreadingContext threadingContext, SVsServiceProvider serviceProvider)
: base(threadingContext, serviceProvider)
{
}
......
......@@ -32,7 +32,7 @@ internal sealed class HACK_ThemeColorFixer : IWpfTextViewConnectionListener
private bool _done;
[ImportingConstructor]
private HACK_ThemeColorFixer(
public HACK_ThemeColorFixer(
IClassificationTypeRegistryService classificationTypeRegistryService,
IClassificationFormatMapService classificationFormatMapService)
{
......
......@@ -40,7 +40,7 @@ internal class EnhancedColorExperiment : ForegroundThreadAffinitizedObject, IWpf
[ImportingConstructor]
[Obsolete]
private EnhancedColorExperiment(IThreadingContext threadingContext, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider)
public EnhancedColorExperiment(IThreadingContext threadingContext, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider)
: base(threadingContext)
{
_serviceProvider = serviceProvider;
......
......@@ -39,7 +39,7 @@ internal sealed class VirtualMemoryNotificationListener : ForegroundThreadAffini
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
private VirtualMemoryNotificationListener(
public VirtualMemoryNotificationListener(
IThreadingContext threadingContext,
SVsServiceProvider serviceProvider,
VisualStudioWorkspace workspace)
......
......@@ -18,7 +18,7 @@ internal sealed class VisualStudioDocumentNavigationServiceFactory : IWorkspaceS
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
private VisualStudioDocumentNavigationServiceFactory(
public VisualStudioDocumentNavigationServiceFactory(
IThreadingContext threadingContext,
SVsServiceProvider serviceProvider,
IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
......
......@@ -15,7 +15,7 @@ internal class VisualStudioSymbolNavigationServiceFactory : IWorkspaceServiceFac
private readonly ISymbolNavigationService _singleton;
[ImportingConstructor]
private VisualStudioSymbolNavigationServiceFactory(
public VisualStudioSymbolNavigationServiceFactory(
SVsServiceProvider serviceProvider,
[Import] VisualStudio14StructureTaggerProvider outliningTaggerProvider)
{
......
......@@ -31,7 +31,7 @@ internal class RoslynVisualStudioWorkspace : VisualStudioWorkspaceImpl
private readonly IEnumerable<Lazy<IStreamingFindUsagesPresenter>> _streamingPresenters;
[ImportingConstructor]
private RoslynVisualStudioWorkspace(
public RoslynVisualStudioWorkspace(
ExportProvider exportProvider,
[ImportMany] IEnumerable<Lazy<IStreamingFindUsagesPresenter>> streamingPresenters,
[ImportMany] IEnumerable<IDocumentOptionsProviderFactory> documentOptionsProviderFactories,
......
......@@ -25,7 +25,7 @@ internal class AnalyzerReferenceManager : IVsReferenceManagerUser
private AnalyzerItemsTracker _tracker = null;
[ImportingConstructor]
internal AnalyzerReferenceManager(
public AnalyzerReferenceManager(
[Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
......
......@@ -16,7 +16,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Completion
<ImportingConstructor>
<Obsolete(MefConstruction.ImportingConstructorMessage, True)>
Friend Sub New(threadingContext As IThreadingContext, listenerProvider As IAsynchronousOperationListenerProvider)
Public Sub New(threadingContext As IThreadingContext, listenerProvider As IAsynchronousOperationListenerProvider)
MyBase.New(threadingContext, Nothing, listenerProvider)
End Sub
......
......@@ -16,7 +16,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Completion
<ImportingConstructor>
<Obsolete(MefConstruction.ImportingConstructorMessage, True)>
Friend Sub New(threadingContext As IThreadingContext, listenerProvider As IAsynchronousOperationListenerProvider)
Public Sub New(threadingContext As IThreadingContext, listenerProvider As IAsynchronousOperationListenerProvider)
MyBase.New(threadingContext, Nothing, listenerProvider)
End Sub
......
......@@ -19,7 +19,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.CodeModel
Private ReadOnly _commitBufferManagerFactory As CommitBufferManagerFactory
<ImportingConstructor>
Private Sub New(editorOptionsFactoryService As IEditorOptionsFactoryService,
Public Sub New(editorOptionsFactoryService As IEditorOptionsFactoryService,
<ImportMany> refactorNotifyServices As IEnumerable(Of IRefactorNotifyService),
commitBufferManagerFactory As CommitBufferManagerFactory)
Me._editorOptionsFactoryService = editorOptionsFactoryService
......
......@@ -17,7 +17,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ObjectBrowser
<ImportingConstructor>
<Obsolete(MefConstruction.ImportingConstructorMessage, True)>
Private Sub New(threadingContext As IThreadingContext, serviceProvider As SVsServiceProvider)
Public Sub New(threadingContext As IThreadingContext, serviceProvider As SVsServiceProvider)
MyBase.New(threadingContext, serviceProvider)
End Sub
End Class
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册