From d3cdab262a03d143db892425ea6cfa6d211782af Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Wed, 25 Nov 2020 12:02:36 +0000 Subject: [PATCH] Fix RCS1188: Remove redundant auto-property initialization part 1 `src\Microsoft.Management.Infrastructure.CimCmdlets\Microsoft.Management.Infrastructure.CimCmdlets.csproj` Follow-up #14244. 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 4744e319c3e..0b9ab1250bb 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs @@ -38,12 +38,12 @@ internal ParameterDefinitionEntry(string parameterSetName, bool mandatory) /// /// 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 @@ internal void reset() /// /// Property DefaultParameterSet /// - internal bool IsDefaultParameterSet { get; } = false; + internal bool IsDefaultParameterSet { get; } /// /// Property MandatoryParameterCount @@ -109,12 +109,12 @@ internal void reset() /// /// 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 4badfd387c5..16d5972eced 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs @@ -1457,7 +1457,7 @@ protected virtual void PostOperationDeleteEvent(OperationEventArgs args) /// 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; } @@ -2154,7 +2154,7 @@ protected override bool PreNewActionEvent(CmdletActionEventArgs args) #region private members - internal CimNewCimInstance NewCimInstanceOperation { get; } = null; + internal CimNewCimInstance NewCimInstanceOperation { get; } #endregion }