From 0fd914fee16ae3eb7a4c5e9bd24629f7c2e2c482 Mon Sep 17 00:00:00 2001
From: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Date: Fri, 27 Nov 2020 08:17:38 +0000
Subject: [PATCH] Fix RCS1188: Remove redundant auto-property initialization
part 1 (#14261)
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1188.md
---
.../CimCommandBase.cs | 10 +++++-----
.../CimSessionProxy.cs | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs
index 2690c209f8..059f58a97b 100644
--- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs
+++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs
@@ -38,12 +38,12 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
///
/// Property ParameterSetName.
///
- internal string ParameterSetName { get; } = null;
+ internal string ParameterSetName { get; }
///
/// Whether the parameter is mandatory to the set.
///
- internal bool IsMandatory { get; } = false;
+ internal bool IsMandatory { get; }
}
///
@@ -99,7 +99,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
///
/// Property DefaultParameterSet
///
- internal bool IsDefaultParameterSet { get; } = false;
+ internal bool IsDefaultParameterSet { get; }
///
/// Property MandatoryParameterCount
@@ -109,12 +109,12 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
///
/// Property IsValueSet
///
- internal bool IsValueSet { get; set; } = false;
+ internal bool IsValueSet { get; set; }
///
/// Property IsValueSetAtBeginProcess
///
- internal bool IsValueSetAtBeginProcess { get; set; } = false;
+ internal bool IsValueSetAtBeginProcess { get; set; }
///
/// Property SetMandatoryParameterCount
diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs
index a442d354f4..40a1f390b0 100644
--- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs
+++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs
@@ -1481,7 +1481,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
/// The current CimInstance object, against which issued
/// current operation, it could be null.
///
- internal CimInstance TargetCimInstance { get; private set; } = null;
+ internal CimInstance TargetCimInstance { get; private set; }
internal bool IsTemporaryCimSession { get; private set; }
@@ -2193,7 +2193,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
#region private members
- internal CimNewCimInstance NewCimInstanceOperation { get; } = null;
+ internal CimNewCimInstance NewCimInstanceOperation { get; }
#endregion
}