diff --git a/.globalconfig b/.globalconfig index 87b3774db1..f6683fcab6 100644 --- a/.globalconfig +++ b/.globalconfig @@ -24,7 +24,8 @@ dotnet_diagnostic.CA1008.severity = none dotnet_diagnostic.CA1010.severity = silent # CA1012: Abstract types should not have public constructors -dotnet_diagnostic.CA1012.severity = none +dotnet_diagnostic.CA1012.severity = warning +dotnet_code_quality.ca1012.api_surface = all # CA1014: Mark assemblies with CLSCompliant dotnet_diagnostic.CA1014.severity = none diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs index e59367df0b..b0ee500989 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimAsyncOperation.cs @@ -28,7 +28,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// /// The constructor. /// - public CimAsyncOperation() + protected CimAsyncOperation() { this.moreActionEvent = new ManualResetEventSlim(false); this.actionQueue = new ConcurrentQueue(); diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimBaseAction.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimBaseAction.cs index 256130f0d3..939f6c047a 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimBaseAction.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimBaseAction.cs @@ -19,7 +19,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// /// Constructor method. /// - public CimBaseAction() + protected CimBaseAction() { } diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimResultObserver.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimResultObserver.cs index ed0de7c368..19040bfa3e 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimResultObserver.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimResultObserver.cs @@ -69,7 +69,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// /// /// - public AsyncResultEventArgsBase( + protected AsyncResultEventArgsBase( CimSession session, IObservable observable, AsyncResultType resultType) @@ -86,7 +86,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets /// /// /// - public AsyncResultEventArgsBase( + protected AsyncResultEventArgsBase( CimSession session, IObservable observable, AsyncResultType resultType, diff --git a/src/System.Management.Automation/engine/debugger/debugger.cs b/src/System.Management.Automation/engine/debugger/debugger.cs index d3e4a45879..331629f086 100644 --- a/src/System.Management.Automation/engine/debugger/debugger.cs +++ b/src/System.Management.Automation/engine/debugger/debugger.cs @@ -4198,7 +4198,7 @@ namespace System.Management.Automation /// Runspace. /// Runspace type. /// Debugger Id of parent. - public NestedRunspaceDebugger( + protected NestedRunspaceDebugger( Runspace runspace, PSMonitorRunspaceType runspaceType, Guid parentDebuggerId) diff --git a/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs b/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs index 6408a800b9..1b8ee9d93c 100644 --- a/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs +++ b/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs @@ -204,7 +204,7 @@ namespace System.Management.Automation.Interpreter internal readonly int _labelIndex; - public IndexedBranchInstruction(int labelIndex) + protected IndexedBranchInstruction(int labelIndex) { _labelIndex = labelIndex; } diff --git a/src/System.Management.Automation/utils/ObjectReader.cs b/src/System.Management.Automation/utils/ObjectReader.cs index 5b5e588f6e..ccbc176406 100644 --- a/src/System.Management.Automation/utils/ObjectReader.cs +++ b/src/System.Management.Automation/utils/ObjectReader.cs @@ -21,7 +21,7 @@ namespace System.Management.Automation.Internal /// /// The stream to read. /// Thrown if the specified stream is null. - public ObjectReaderBase([In, Out] ObjectStreamBase stream) + protected ObjectReaderBase([In, Out] ObjectStreamBase stream) { if (stream == null) {