Enable CA1012: Abstract types should not have public constructors (#13940)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1012
This commit is contained in:
parent
eafeab554b
commit
60643e27df
|
@ -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
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
/// <summary>
|
||||
/// The constructor.
|
||||
/// </summary>
|
||||
public CimAsyncOperation()
|
||||
protected CimAsyncOperation()
|
||||
{
|
||||
this.moreActionEvent = new ManualResetEventSlim(false);
|
||||
this.actionQueue = new ConcurrentQueue<CimBaseAction>();
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
/// <summary>
|
||||
/// Constructor method.
|
||||
/// </summary>
|
||||
public CimBaseAction()
|
||||
protected CimBaseAction()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
/// <param name="session"></param>
|
||||
/// <param name="observable"></param>
|
||||
/// <param name="resultType"></param>
|
||||
public AsyncResultEventArgsBase(
|
||||
protected AsyncResultEventArgsBase(
|
||||
CimSession session,
|
||||
IObservable<object> observable,
|
||||
AsyncResultType resultType)
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
|||
/// <param name="observable"></param>
|
||||
/// <param name="resultType"></param>
|
||||
/// <param name="context"></param>
|
||||
public AsyncResultEventArgsBase(
|
||||
protected AsyncResultEventArgsBase(
|
||||
CimSession session,
|
||||
IObservable<object> observable,
|
||||
AsyncResultType resultType,
|
||||
|
|
|
@ -4198,7 +4198,7 @@ namespace System.Management.Automation
|
|||
/// <param name="runspace">Runspace.</param>
|
||||
/// <param name="runspaceType">Runspace type.</param>
|
||||
/// <param name="parentDebuggerId">Debugger Id of parent.</param>
|
||||
public NestedRunspaceDebugger(
|
||||
protected NestedRunspaceDebugger(
|
||||
Runspace runspace,
|
||||
PSMonitorRunspaceType runspaceType,
|
||||
Guid parentDebuggerId)
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace System.Management.Automation.Interpreter
|
|||
|
||||
internal readonly int _labelIndex;
|
||||
|
||||
public IndexedBranchInstruction(int labelIndex)
|
||||
protected IndexedBranchInstruction(int labelIndex)
|
||||
{
|
||||
_labelIndex = labelIndex;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace System.Management.Automation.Internal
|
|||
/// </summary>
|
||||
/// <param name="stream">The stream to read.</param>
|
||||
/// <exception cref="ArgumentNullException">Thrown if the specified stream is null.</exception>
|
||||
public ObjectReaderBase([In, Out] ObjectStreamBase stream)
|
||||
protected ObjectReaderBase([In, Out] ObjectStreamBase stream)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue