diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs index 2488490c514..3a26ca04d41 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimCommandBase.cs @@ -727,6 +727,11 @@ internal bool AtBeginProcess /// internal CimAsyncOperation AsyncOperation { + get + { + return this.operation; + } + set { lock (this.myLock) @@ -735,11 +740,6 @@ internal CimAsyncOperation AsyncOperation this.operation = value; } } - - get - { - return this.operation; - } } /// diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimRegisterCimIndication.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimRegisterCimIndication.cs index 559c58b8a11..372c60af0ca 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimRegisterCimIndication.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimRegisterCimIndication.cs @@ -309,8 +309,8 @@ private void WaitForAckMessage() /// internal Cmdlet Cmdlet { - set; get; + set; } /// @@ -318,8 +318,8 @@ internal Cmdlet Cmdlet /// internal string TargetComputerName { - set; get; + set; } #endregion diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs index 56e90ad6f8b..1e99f4cda2d 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionProxy.cs @@ -540,17 +540,17 @@ private void CreateSetSession( /// public UInt32 OperationTimeout { + get + { + return (UInt32)this.options.Timeout.TotalSeconds; + } + set { DebugHelper.WriteLogEx("OperationTimeout {0},", 0, value); this.options.Timeout = TimeSpan.FromSeconds((double)value); } - - get - { - return (UInt32)this.options.Timeout.TotalSeconds; - } } /// @@ -558,17 +558,17 @@ public UInt32 OperationTimeout /// public Uri ResourceUri { + get + { + return this.options.ResourceUri; + } + set { DebugHelper.WriteLogEx("ResourceUri {0},", 0, value); this.options.ResourceUri = value; } - - get - { - return this.options.ResourceUri; - } } /// @@ -1595,17 +1595,17 @@ private void DisposeCancelOperation() /// private IDisposable CancelOperation { + get + { + return this._cancelOperation; + } + set { DebugHelper.WriteLogEx(); this._cancelOperation = value; Interlocked.Exchange(ref this._cancelOperationDisposed, 0); } - - get - { - return this._cancelOperation; - } } /// @@ -1627,14 +1627,14 @@ internal ProtocolType Protocol /// internal XOperationContextBase ContextObject { - set + get { - this.contextObject = value; + return this.contextObject; } - get + set { - return this.contextObject; + this.contextObject = value; } } @@ -1651,14 +1651,14 @@ internal XOperationContextBase ContextObject /// internal IObjectPreProcess ObjectPreProcess { - set + get { - this.objectPreprocess = value; + return this.objectPreprocess; } - get + set { - return this.objectPreprocess; + this.objectPreprocess = value; } } diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/SetCimInstanceCommand.cs b/src/Microsoft.Management.Infrastructure.CimCmdlets/SetCimInstanceCommand.cs index 7237352b61a..dde2ad53f02 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/SetCimInstanceCommand.cs +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/SetCimInstanceCommand.cs @@ -279,14 +279,14 @@ public IDictionary Property [ValidateNotNull] public SwitchParameter PassThru { - set + get { - this.passThru = value; + return this.passThru; } - get + set { - return this.passThru; + this.passThru = value; } } diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs index 86f252fb8fc..36af765eeb8 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs @@ -59,13 +59,13 @@ public long TotalCount [Alias("Last")] public int Tail { + get { return _backCount; } + set { _backCount = value; _tailSpecified = true; } - - get { return _backCount; } } private int _backCount = -1; diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddMember.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddMember.cs index 2ea6d6e20ae..8b3c283fa12 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddMember.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddMember.cs @@ -37,9 +37,9 @@ private static bool HasBeenSpecified(object obj) [Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = NotePropertyMultiMemberSet)] public PSObject InputObject { - set { _inputObject = value; } - get { return _inputObject; } + + set { _inputObject = value; } } private PSMemberTypes _memberType; @@ -50,9 +50,9 @@ public PSObject InputObject [Alias("Type")] public PSMemberTypes MemberType { - set { _memberType = value; } - get { return _memberType; } + + set { _memberType = value; } } private string _memberName; @@ -62,9 +62,9 @@ public PSMemberTypes MemberType [Parameter(Mandatory = true, Position = 1, ParameterSetName = "MemberSet")] public string Name { - set { _memberName = value; } - get { return _memberName; } + + set { _memberName = value; } } private object _value1 = s_notSpecified; @@ -74,9 +74,9 @@ public string Name [Parameter(Position = 2, ParameterSetName = "MemberSet")] public object Value { - set { _value1 = value; } - get { return _value1; } + + set { _value1 = value; } } private object _value2 = s_notSpecified; @@ -86,9 +86,9 @@ public object Value [Parameter(Position = 3, ParameterSetName = "MemberSet")] public object SecondValue { - set { _value2 = value; } - get { return _value2; } + + set { _value2 = value; } } private string _typeName; @@ -102,9 +102,9 @@ public object SecondValue [ValidateNotNullOrEmpty] public string TypeName { - set { _typeName = value; } - get { return _typeName; } + + set { _typeName = value; } } private bool _force; @@ -116,9 +116,9 @@ public string TypeName [Parameter(ParameterSetName = NotePropertyMultiMemberSet)] public SwitchParameter Force { - set { _force = value; } - get { return _force; } + + set { _force = value; } } private bool _passThru /* = false */; @@ -132,9 +132,9 @@ public SwitchParameter Force [Parameter(ParameterSetName = NotePropertyMultiMemberSet)] public SwitchParameter PassThru { - set { _passThru = value; } - get { return _passThru; } + + set { _passThru = value; } } #region Simplifying NoteProperty Declaration @@ -152,9 +152,9 @@ public SwitchParameter PassThru [ValidateNotNullOrEmpty] public string NotePropertyName { - set { _notePropertyName = value; } - get { return _notePropertyName; } + + set { _notePropertyName = value; } } private object _notePropertyValue; @@ -165,9 +165,9 @@ public string NotePropertyName [AllowNull] public object NotePropertyValue { - set { _notePropertyValue = value; } - get { return _notePropertyValue; } + + set { _notePropertyValue = value; } } // Use IDictionary to support both Hashtable and OrderedHashtable diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs index b95e9968c5c..f8010cfb6b0 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs @@ -88,7 +88,7 @@ public OutGridViewCommand() /// and if it should be possible to select multiple or single list items. /// [Parameter(ParameterSetName = "OutputMode")] - public OutputModeOption OutputMode { set; get; } + public OutputModeOption OutputMode { get; set; } /// /// Gets or sets a value indicating whether the selected items should be written to the pipeline. @@ -97,9 +97,9 @@ public OutGridViewCommand() [Parameter(ParameterSetName = "PassThru")] public SwitchParameter PassThru { - set { this.OutputMode = value.IsPresent ? OutputModeOption.Multiple : OutputModeOption.None; } - get { return OutputMode == OutputModeOption.Multiple ? new SwitchParameter(true) : new SwitchParameter(false); } + + set { this.OutputMode = value.IsPresent ? OutputModeOption.Multiple : OutputModeOption.None; } } #endregion Input Parameters diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs index daa870d9b1a..dc93637e86c 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs @@ -65,21 +65,21 @@ public class GetMemberCommand : PSCmdlet /// The object to retrieve properties from. /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } + public PSObject InputObject { get; set; } /// /// The member names to be retrieved. /// [Parameter(Position = 0)] [ValidateNotNullOrEmpty] - public string[] Name { set; get; } = new string[] { "*" }; + public string[] Name { get; set; } = new string[] { "*" }; /// /// The member types to be retrieved. /// [Parameter] [Alias("Type")] - public PSMemberTypes MemberType { set; get; } = PSMemberTypes.All; + public PSMemberTypes MemberType { get; set; } = PSMemberTypes.All; /// /// View from which the members are retrieved. @@ -94,9 +94,9 @@ public class GetMemberCommand : PSCmdlet [Parameter] public SwitchParameter Static { - set { _staticParameter = value; } - get { return _staticParameter; } + + set { _staticParameter = value; } } /// diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetUnique.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetUnique.cs index ea33f7c28d7..e72061468fd 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetUnique.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetUnique.cs @@ -19,7 +19,7 @@ public sealed class GetUniqueCommand : PSCmdlet /// /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// This parameter specifies that objects should be converted to diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs index 2171dd66aec..710a5f32a11 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs @@ -257,9 +257,9 @@ private PSModuleInfo CreateModule(string manifestFile) [ValidateNotNullOrEmpty] public new string Prefix { - set { base.Prefix = value; } - get { return base.Prefix; } + + set { base.Prefix = value; } } /// @@ -521,7 +521,7 @@ public string[] FormatTypeName /// /// This parameter specified a prefix used to modify names of imported commands. /// - internal string Prefix { set; get; } = string.Empty; + internal string Prefix { get; set; } = string.Empty; /// /// Gets or sets the certificate with which to sign the format file and psm1 file. diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs index 230f985c19e..28e544c553c 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs @@ -234,7 +234,7 @@ public MeasureObjectCommand() /// /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// Properties to be examined. diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/OrderObjectBase.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/OrderObjectBase.cs index c2ebc9261a1..fb7d79f4af3 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/OrderObjectBase.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/OrderObjectBase.cs @@ -117,7 +117,7 @@ public abstract class ObjectBase : ObjectCmdletBase /// /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// Gets or Sets the Properties that would be used for Grouping, Sorting and Comparison. diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Select-Object.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Select-Object.cs index bba2ac2873d..8e90235196b 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Select-Object.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Select-Object.cs @@ -76,7 +76,7 @@ public sealed class SelectObjectCommand : PSCmdlet /// /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TimeExpressionCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TimeExpressionCommand.cs index d7071a06605..9ad21d5e84d 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TimeExpressionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TimeExpressionCommand.cs @@ -25,13 +25,13 @@ public sealed class MeasureCommandCommand : PSCmdlet /// This parameter specifies the current pipeline object. /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// The script block to apply. /// [Parameter(Position = 0, Mandatory = true)] - public ScriptBlock Expression { set; get; } + public ScriptBlock Expression { get; set; } #endregion diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs index d19810522d0..0565d6d7d41 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs @@ -24,14 +24,14 @@ public class UpdateData : PSCmdlet ParameterSetName = FileParameterSet)] [Alias("PSPath", "Path")] [ValidateNotNull] - public string[] AppendPath { set; get; } = Array.Empty(); + public string[] AppendPath { get; set; } = Array.Empty(); /// /// Files to prepend to the existing set. /// [Parameter(ParameterSetName = FileParameterSet)] [ValidateNotNull] - public string[] PrependPath { set; get; } = Array.Empty(); + public string[] PrependPath { get; set; } = Array.Empty(); private static void ReportWrongExtension(string file, string errorId, PSCmdlet cmdlet) { diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs index de7d2590176..a791ff2ed84 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs @@ -50,13 +50,13 @@ private static bool HasBeenSpecified(object obj) System.Management.Automation.Runspaces.TypeData.CodeMethod, IgnoreCase = true)] public PSMemberTypes MemberType { + get { return _memberType; } + set { _memberType = value; _isMemberTypeSet = true; } - - get { return _memberType; } } private string _memberName; @@ -67,9 +67,9 @@ public PSMemberTypes MemberType [ValidateNotNullOrEmpty] public string MemberName { - set { _memberName = value; } - get { return _memberName; } + + set { _memberName = value; } } private object _value1 = s_notSpecified; @@ -80,9 +80,9 @@ public string MemberName [Parameter(ParameterSetName = DynamicTypeSet)] public object Value { - set { _value1 = value; } - get { return _value1; } + + set { _value1 = value; } } private object _value2; @@ -94,9 +94,9 @@ public object Value [ValidateNotNull] public object SecondValue { - set { _value2 = value; } - get { return _value2; } + + set { _value2 = value; } } private Type _typeConverter; @@ -107,9 +107,9 @@ public object SecondValue [ValidateNotNull] public Type TypeConverter { - set { _typeConverter = value; } - get { return _typeConverter; } + + set { _typeConverter = value; } } private Type _typeAdapter; @@ -120,9 +120,9 @@ public Type TypeConverter [ValidateNotNull] public Type TypeAdapter { - set { _typeAdapter = value; } - get { return _typeAdapter; } + + set { _typeAdapter = value; } } /// @@ -132,9 +132,9 @@ public Type TypeAdapter [ValidateNotNullOrEmpty] public string SerializationMethod { - set { _serializationMethod = value; } - get { return _serializationMethod; } + + set { _serializationMethod = value; } } /// @@ -144,9 +144,9 @@ public string SerializationMethod [ValidateNotNull] public Type TargetTypeForDeserialization { - set { _targetTypeForDeserialization = value; } - get { return _targetTypeForDeserialization; } + + set { _targetTypeForDeserialization = value; } } /// @@ -157,9 +157,9 @@ public Type TargetTypeForDeserialization [ValidateRange(0, int.MaxValue)] public int SerializationDepth { - set { _serializationDepth = value; } - get { return _serializationDepth; } + + set { _serializationDepth = value; } } /// @@ -169,9 +169,9 @@ public int SerializationDepth [ValidateNotNullOrEmpty] public string DefaultDisplayProperty { - set { _defaultDisplayProperty = value; } - get { return _defaultDisplayProperty; } + + set { _defaultDisplayProperty = value; } } /// @@ -181,9 +181,9 @@ public string DefaultDisplayProperty [ValidateNotNull] public bool? InheritPropertySerializationSet { - set { _inheritPropertySerializationSet = value; } - get { return _inheritPropertySerializationSet; } + + set { _inheritPropertySerializationSet = value; } } /// @@ -193,9 +193,9 @@ public bool? InheritPropertySerializationSet [ValidateNotNullOrEmpty] public string StringSerializationSource { - set { _stringSerializationSource = value; } - get { return _stringSerializationSource; } + + set { _stringSerializationSource = value; } } /// @@ -206,9 +206,9 @@ public string StringSerializationSource [ValidateNotNullOrEmpty] public string[] DefaultDisplayPropertySet { - set { _defaultDisplayPropertySet = value; } - get { return _defaultDisplayPropertySet; } + + set { _defaultDisplayPropertySet = value; } } /// @@ -219,9 +219,9 @@ public string[] DefaultDisplayPropertySet [ValidateNotNullOrEmpty] public string[] DefaultKeyPropertySet { - set { _defaultKeyPropertySet = value; } - get { return _defaultKeyPropertySet; } + + set { _defaultKeyPropertySet = value; } } /// @@ -232,9 +232,9 @@ public string[] DefaultKeyPropertySet [ValidateNotNullOrEmpty] public string[] PropertySerializationSet { - set { _propertySerializationSet = value; } - get { return _propertySerializationSet; } + + set { _propertySerializationSet = value; } } // These members are represented as NoteProperty in types.ps1xml @@ -261,9 +261,9 @@ public string[] PropertySerializationSet [ValidateNotNullOrEmpty] public string TypeName { - set { _typeName = value; } - get { return _typeName; } + + set { _typeName = value; } } private bool _force = false; @@ -274,9 +274,9 @@ public string TypeName [Parameter(ParameterSetName = TypeDataSet)] public SwitchParameter Force { - set { _force = value; } - get { return _force; } + + set { _force = value; } } #endregion dynamic type set @@ -291,9 +291,9 @@ public SwitchParameter Force [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = TypeDataSet)] public TypeData[] TypeData { - set { _typeData = value; } - get { return _typeData; } + + set { _typeData = value; } } #endregion strong type data set diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs index 04e35a9018d..9fe7553193e 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs @@ -27,7 +27,7 @@ public class TraceCommandCommand : TraceListenerCommandBase, IDisposable /// This parameter specifies the current pipeline object. /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// The TraceSource parameter determines which TraceSource categories the diff --git a/src/Microsoft.WSMan.Management/Interop.cs b/src/Microsoft.WSMan.Management/Interop.cs index 6e813ef17e1..7084a111f2d 100644 --- a/src/Microsoft.WSMan.Management/Interop.cs +++ b/src/Microsoft.WSMan.Management/Interop.cs @@ -734,19 +734,18 @@ public interface IWSManResourceLocator [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] string ResourceUri { - // IDL: HRESULT resourceUri (BSTR value); + // IDL: HRESULT resourceUri ([out, retval] BSTR* ReturnValue); [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "resource")] [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] [DispId(1)] - set; - - // IDL: HRESULT resourceUri ([out, retval] BSTR* ReturnValue); + [return: MarshalAs(UnmanagedType.BStr)] + get; + // IDL: HRESULT resourceUri (BSTR value); [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "resource")] [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")] [DispId(1)] - [return: MarshalAs(UnmanagedType.BStr)] - get; + set; } /// AddSelector method of IWSManResourceLocator interface. Add selector to resource locator diff --git a/src/System.Management.Automation/FormatAndOutput/common/BaseCommand.cs b/src/System.Management.Automation/FormatAndOutput/common/BaseCommand.cs index e03b4ae61eb..3733b0cf310 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/BaseCommand.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/BaseCommand.cs @@ -150,7 +150,7 @@ public abstract class FrontEndCommandBase : PSCmdlet, IDisposable /// This parameter specifies the current pipeline object. /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; #endregion diff --git a/src/System.Management.Automation/FormatAndOutput/common/BaseOutputtingCommand.cs b/src/System.Management.Automation/FormatAndOutput/common/BaseOutputtingCommand.cs index bb8305b2fdc..41d1d2d6d59 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/BaseOutputtingCommand.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/BaseOutputtingCommand.cs @@ -596,9 +596,9 @@ private void ProcessOutOfBandPayload(FormatEntryData fed) internal LineOutput LineOutput { - set { _lo = value; } - get { return _lo; } + + set { _lo = value; } } private ShapeInfo ShapeInfoOnFormatContext diff --git a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/displayDescriptionData.cs b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/displayDescriptionData.cs index 64d59dbc83e..717ea07bdcd 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/displayDescriptionData.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/displayDescriptionData.cs @@ -102,6 +102,13 @@ internal sealed class DefaultSettingsSection { internal bool MultilineTables { + get + { + if (_multilineTables.HasValue) + return _multilineTables.Value; + return false; + } + set { if (!_multilineTables.HasValue) @@ -109,13 +116,6 @@ internal bool MultilineTables _multilineTables = value; } } - - get - { - if (_multilineTables.HasValue) - return _multilineTables.Value; - return false; - } } private bool? _multilineTables; @@ -132,6 +132,13 @@ internal sealed class FormatErrorPolicy /// internal bool ShowErrorsAsMessages { + get + { + if (_showErrorsAsMessages.HasValue) + return _showErrorsAsMessages.Value; + return false; + } + set { if (!_showErrorsAsMessages.HasValue) @@ -139,13 +146,6 @@ internal bool ShowErrorsAsMessages _showErrorsAsMessages = value; } } - - get - { - if (_showErrorsAsMessages.HasValue) - return _showErrorsAsMessages.Value; - return false; - } } private bool? _showErrorsAsMessages; @@ -156,6 +156,13 @@ internal bool ShowErrorsAsMessages /// internal bool ShowErrorsInFormattedOutput { + get + { + if (_showErrorsInFormattedOutput.HasValue) + return _showErrorsInFormattedOutput.Value; + return false; + } + set { if (!_showErrorsInFormattedOutput.HasValue) @@ -163,13 +170,6 @@ internal bool ShowErrorsInFormattedOutput _showErrorsInFormattedOutput = value; } } - - get - { - if (_showErrorsInFormattedOutput.HasValue) - return _showErrorsInFormattedOutput.Value; - return false; - } } private bool? _showErrorsInFormattedOutput; @@ -191,6 +191,13 @@ internal sealed class ShapeSelectionDirectives { internal int PropertyCountForTable { + get + { + if (_propertyCountForTable.HasValue) + return _propertyCountForTable.Value; + return 4; + } + set { if (!_propertyCountForTable.HasValue) @@ -198,13 +205,6 @@ internal int PropertyCountForTable _propertyCountForTable = value; } } - - get - { - if (_propertyCountForTable.HasValue) - return _propertyCountForTable.Value; - return 4; - } } private int? _propertyCountForTable; diff --git a/src/System.Management.Automation/FormatAndOutput/out-console/OutConsole.cs b/src/System.Management.Automation/FormatAndOutput/out-console/OutConsole.cs index edf9e5ef8f1..2582a1e68db 100644 --- a/src/System.Management.Automation/FormatAndOutput/out-console/OutConsole.cs +++ b/src/System.Management.Automation/FormatAndOutput/out-console/OutConsole.cs @@ -22,7 +22,7 @@ public class OutNullCommand : PSCmdlet /// This parameter specifies the current pipeline object. /// [Parameter(ValueFromPipeline = true)] - public PSObject InputObject { set; get; } = AutomationNull.Value; + public PSObject InputObject { get; set; } = AutomationNull.Value; /// /// Do nothing. diff --git a/src/System.Management.Automation/engine/Attributes.cs b/src/System.Management.Automation/engine/Attributes.cs index 16445703030..a43ab1d9411 100644 --- a/src/System.Management.Automation/engine/Attributes.cs +++ b/src/System.Management.Automation/engine/Attributes.cs @@ -1265,7 +1265,7 @@ public sealed class ValidatePatternAttribute : ValidateEnumeratedArgumentsAttrib /// /// Gets or sets the Regex options to be used in the validation. /// - public RegexOptions Options { set; get; } = RegexOptions.IgnoreCase; + public RegexOptions Options { get; set; } = RegexOptions.IgnoreCase; /// /// Gets or sets the custom error message pattern that is displayed to the user. diff --git a/src/System.Management.Automation/engine/DefaultCommandRuntime.cs b/src/System.Management.Automation/engine/DefaultCommandRuntime.cs index 09a933eaad2..c4f03ead600 100644 --- a/src/System.Management.Automation/engine/DefaultCommandRuntime.cs +++ b/src/System.Management.Automation/engine/DefaultCommandRuntime.cs @@ -30,7 +30,7 @@ public DefaultCommandRuntime(List outputList) /// /// Return the instance of PSHost - null by default. /// - public PSHost Host { set; get; } + public PSHost Host { get; set; } #region Write /// diff --git a/src/System.Management.Automation/engine/ExecutionContext.cs b/src/System.Management.Automation/engine/ExecutionContext.cs index 98f0b3deb5a..8dfc9185c3b 100644 --- a/src/System.Management.Automation/engine/ExecutionContext.cs +++ b/src/System.Management.Automation/engine/ExecutionContext.cs @@ -172,7 +172,7 @@ internal bool ShouldTraceStatement /// trace flag. /// /// The current state of the IgnoreScriptDebug flag. - internal bool IgnoreScriptDebug { set; get; } = true; + internal bool IgnoreScriptDebug { get; set; } = true; /// /// Gets the automation engine instance. diff --git a/src/System.Management.Automation/engine/InternalCommands.cs b/src/System.Management.Automation/engine/InternalCommands.cs index 7c37cc4f0eb..c3d68424cca 100644 --- a/src/System.Management.Automation/engine/InternalCommands.cs +++ b/src/System.Management.Automation/engine/InternalCommands.cs @@ -80,9 +80,9 @@ public sealed class ForEachObjectCommand : PSCmdlet, IDisposable [Parameter(ValueFromPipeline = true, ParameterSetName = ForEachObjectCommand.ParallelParameterSet)] public PSObject InputObject { - set { _inputObject = value; } - get { return _inputObject; } + + set { _inputObject = value; } } private PSObject _inputObject = AutomationNull.Value; @@ -220,9 +220,9 @@ public string MemberName [Alias("Args")] public object[] ArgumentList { - set { _arguments = value; } - get { return _arguments; } + + set { _arguments = value; } } private object[] _arguments; diff --git a/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs b/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs index 7dc91d76776..20eaf0baabe 100644 --- a/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs +++ b/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs @@ -28,6 +28,8 @@ public sealed class ExportModuleMemberCommand : PSCmdlet [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Function { + get { return _functionList; } + set { _functionList = value; @@ -42,8 +44,6 @@ public string[] Function } } } - - get { return _functionList; } } private string[] _functionList; @@ -57,6 +57,8 @@ public string[] Function [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Cmdlet { + get { return _cmdletList; } + set { _cmdletList = value; @@ -71,8 +73,6 @@ public string[] Cmdlet } } } - - get { return _cmdletList; } } private string[] _cmdletList; @@ -86,6 +86,8 @@ public string[] Cmdlet [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Variable { + get { return _variableExportList; } + set { _variableExportList = value; @@ -100,8 +102,6 @@ public string[] Variable } } } - - get { return _variableExportList; } } private string[] _variableExportList; @@ -115,6 +115,8 @@ public string[] Variable [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Alias { + get { return _aliasExportList; } + set { _aliasExportList = value; @@ -129,8 +131,6 @@ public string[] Alias } } } - - get { return _aliasExportList; } } private string[] _aliasExportList; diff --git a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs index f6641930bf7..8c221518433 100644 --- a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs @@ -63,9 +63,9 @@ public sealed class ImportModuleCommand : ModuleCmdletBase, IDisposable [Parameter] public SwitchParameter Global { - set { base.BaseGlobal = value; } - get { return base.BaseGlobal; } + + set { base.BaseGlobal = value; } } /// @@ -75,9 +75,9 @@ public SwitchParameter Global [ValidateNotNull] public string Prefix { - set { BasePrefix = value; } - get { return BasePrefix; } + + set { BasePrefix = value; } } /// @@ -89,7 +89,7 @@ public string Prefix [Parameter(ParameterSetName = ParameterSet_ViaWinCompat, Mandatory = true, ValueFromPipeline = true, Position = 0)] [ValidateTrustedData] [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] - public string[] Name { set; get; } = Array.Empty(); + public string[] Name { get; set; } = Array.Empty(); /// /// This parameter specifies the current pipeline object. @@ -117,6 +117,8 @@ public string Prefix [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Function { + get { return _functionImportList; } + set { if (value == null) @@ -130,8 +132,6 @@ public string[] Function BaseFunctionPatterns.Add(WildcardPattern.Get(pattern, WildcardOptions.IgnoreCase)); } } - - get { return _functionImportList; } } private string[] _functionImportList = Array.Empty(); @@ -144,6 +144,8 @@ public string[] Function [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Cmdlet { + get { return _cmdletImportList; } + set { if (value == null) @@ -158,8 +160,6 @@ public string[] Cmdlet BaseCmdletPatterns.Add(WildcardPattern.Get(pattern, WildcardOptions.IgnoreCase)); } } - - get { return _cmdletImportList; } } private string[] _cmdletImportList = Array.Empty(); @@ -172,6 +172,8 @@ public string[] Cmdlet [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Variable { + get { return _variableExportList; } + set { if (value == null) @@ -185,8 +187,6 @@ public string[] Variable BaseVariablePatterns.Add(WildcardPattern.Get(pattern, WildcardOptions.IgnoreCase)); } } - - get { return _variableExportList; } } private string[] _variableExportList; @@ -199,6 +199,8 @@ public string[] Variable [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Alias { + get { return _aliasExportList; } + set { if (value == null) @@ -213,8 +215,6 @@ public string[] Alias BaseAliasPatterns.Add(WildcardPattern.Get(pattern, WildcardOptions.IgnoreCase)); } } - - get { return _aliasExportList; } } private string[] _aliasExportList; @@ -335,7 +335,7 @@ public Version RequiredVersion [Parameter(ParameterSetName = ParameterSet_ModuleInfo, Mandatory = true, ValueFromPipeline = true, Position = 0)] [ValidateTrustedData] [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] - public PSModuleInfo[] ModuleInfo { set; get; } = Array.Empty(); + public PSModuleInfo[] ModuleInfo { get; set; } = Array.Empty(); /// /// The arguments to pass to the module script. diff --git a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs index 29cc066324f..9d34fd5de4b 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs @@ -110,7 +110,7 @@ protected internal struct ImportModuleOptions /// /// This parameter specified a prefix used to modify names of imported commands. /// - internal string BasePrefix { set; get; } = string.Empty; + internal string BasePrefix { get; set; } = string.Empty; /// /// Flags -force operations. diff --git a/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs b/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs index f61d3bb39bb..b661df41de1 100644 --- a/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs @@ -27,9 +27,9 @@ public sealed class NewModuleCommand : ModuleCmdletBase [Parameter(ParameterSetName = "Name", Mandatory = true, ValueFromPipeline = true, Position = 0)] public string Name { - set { _name = value; } - get { return _name; } + + set { _name = value; } } private string _name; @@ -60,6 +60,8 @@ public ScriptBlock ScriptBlock [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Function { + get { return _functionImportList; } + set { if (value == null) @@ -74,8 +76,6 @@ public string[] Function BaseFunctionPatterns.Add(WildcardPattern.Get(pattern, WildcardOptions.IgnoreCase)); } } - - get { return _functionImportList; } } private string[] _functionImportList = Array.Empty(); @@ -88,6 +88,8 @@ public string[] Function [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Cmdlet { + get { return _cmdletImportList; } + set { if (value == null) @@ -102,8 +104,6 @@ public string[] Cmdlet BaseCmdletPatterns.Add(WildcardPattern.Get(pattern, WildcardOptions.IgnoreCase)); } } - - get { return _cmdletImportList; } } private string[] _cmdletImportList = Array.Empty(); diff --git a/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs b/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs index 033382a565b..50f852ba082 100644 --- a/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs +++ b/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs @@ -28,7 +28,7 @@ public sealed class PSModuleInfo new ReadOnlyDictionary(new Dictionary(StringComparer.OrdinalIgnoreCase)); // This dictionary doesn't include ExportedTypes from nested modules. - private ReadOnlyDictionary _exportedTypeDefinitionsNoNested { set; get; } + private ReadOnlyDictionary _exportedTypeDefinitionsNoNested { get; set; } private static readonly HashSet s_scriptModuleExtensions = new HashSet(StringComparer.OrdinalIgnoreCase) { diff --git a/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs b/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs index 64958c9fde6..182e535604c 100644 --- a/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs @@ -32,9 +32,9 @@ public sealed class RemoveModuleCommand : ModuleCmdletBase [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public string[] Name { - set { _name = value; } - get { return _name; } + + set { _name = value; } } private string[] _name = Array.Empty(); @@ -53,9 +53,9 @@ public string[] Name [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")] public PSModuleInfo[] ModuleInfo { - set { _moduleInfo = value; } - get { return _moduleInfo; } + + set { _moduleInfo = value; } } private PSModuleInfo[] _moduleInfo = Array.Empty(); diff --git a/src/System.Management.Automation/engine/ParameterBinderBase.cs b/src/System.Management.Automation/engine/ParameterBinderBase.cs index ddf8072b941..31563fbf531 100644 --- a/src/System.Management.Automation/engine/ParameterBinderBase.cs +++ b/src/System.Management.Automation/engine/ParameterBinderBase.cs @@ -172,10 +172,10 @@ internal object Target /// internal CommandLineParameters CommandLineParameters { + get { return _commandLineParameters ?? (_commandLineParameters = new CommandLineParameters()); } + // Setter is needed to pass into RuntimeParameterBinder instances set { _commandLineParameters = value; } - - get { return _commandLineParameters ?? (_commandLineParameters = new CommandLineParameters()); } } private CommandLineParameters _commandLineParameters; diff --git a/src/System.Management.Automation/engine/hostifaces/History.cs b/src/System.Management.Automation/engine/hostifaces/History.cs index 26496f74ef7..4480d312613 100644 --- a/src/System.Management.Automation/engine/hostifaces/History.cs +++ b/src/System.Management.Automation/engine/hostifaces/History.cs @@ -1338,7 +1338,7 @@ public class AddHistoryCommand : PSCmdlet /// This parameter specifies the current pipeline object. /// [Parameter(Position = 0, ValueFromPipeline = true)] - public PSObject[] InputObject { set; get; } + public PSObject[] InputObject { get; set; } private bool _passthru; /// diff --git a/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs b/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs index 17b07b0f148..d46324349dd 100644 --- a/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs +++ b/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs @@ -271,8 +271,8 @@ public override RunspacePoolAvailability RunspacePoolAvailability /// internal bool IsRemoteDebugStop { - set; get; + set; } #endregion diff --git a/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs b/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs index a927b49481f..5771fc2d484 100644 --- a/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs +++ b/src/System.Management.Automation/engine/remoting/client/remoterunspace.cs @@ -2491,8 +2491,8 @@ internal void CheckStateAndRaiseStopEvent() /// internal bool IsRemoteDebug { - private set; get; + private set; } /// diff --git a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs index daef292017f..3f5baaa2eb0 100644 --- a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs @@ -347,14 +347,14 @@ public override string ApplicationName [Parameter(ParameterSetName = InvokeCommandCommand.FilePathContainerIdParameterSet)] public override int ThrottleLimit { - set + get { - base.ThrottleLimit = value; + return base.ThrottleLimit; } - get + set { - return base.ThrottleLimit; + base.ThrottleLimit = value; } } diff --git a/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs b/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs index de046236536..b85dd823558 100644 --- a/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs +++ b/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs @@ -620,7 +620,7 @@ public virtual string ApplicationName [Parameter(ParameterSetName = PSRemotingBaseCmdlet.ContainerIdParameterSet)] [Parameter(ParameterSetName = PSRemotingBaseCmdlet.VMIdParameterSet)] [Parameter(ParameterSetName = PSRemotingBaseCmdlet.VMNameParameterSet)] - public virtual int ThrottleLimit { set; get; } = 0; + public virtual int ThrottleLimit { get; set; } = 0; /// /// A complete URI(s) specified for the remote computer and shell to @@ -3257,8 +3257,8 @@ internal Exception InternalException /// internal Runspace PipelineRunspace { - set; get; + set; } #region Runspace Debug diff --git a/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs b/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs index a7751e0138d..2dbf08c34f3 100644 --- a/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs @@ -39,7 +39,7 @@ public class EnterPSSessionCommand : PSRemotingBaseCmdlet /// /// Disable ThrottleLimit parameter inherited from base class. /// - public new int ThrottleLimit { set { } get { return 0; } } + public new int ThrottleLimit { get { return 0; } set { } } private ObjectStream _stream; private RemoteRunspace _tempRunspace; diff --git a/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs b/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs index 9fa2233153f..e536dff883c 100644 --- a/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs +++ b/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs @@ -204,6 +204,11 @@ internal class ThrottleManager : IDisposable /// internal int ThrottleLimit { + get + { + return _throttleLimit; + } + set { if (value > 0 && value <= s_THROTTLE_LIMIT_MAX) @@ -211,11 +216,6 @@ internal int ThrottleLimit _throttleLimit = value; } } - - get - { - return _throttleLimit; - } } private int _throttleLimit = s_DEFAULT_THROTTLE_LIMIT; diff --git a/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs b/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs index f441a84470c..2a5f36b76ea 100644 --- a/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs +++ b/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs @@ -833,7 +833,7 @@ internal bool SkipLogging set { _scriptBlockData.SkipLogging = value; } } - internal Assembly AssemblyDefiningPSTypes { set; get; } + internal Assembly AssemblyDefiningPSTypes { get; set; } internal HelpInfo GetHelpInfo( ExecutionContext context, diff --git a/src/System.Management.Automation/engine/serialization.cs b/src/System.Management.Automation/engine/serialization.cs index de5d107404c..ceeb0e64e26 100644 --- a/src/System.Management.Automation/engine/serialization.cs +++ b/src/System.Management.Automation/engine/serialization.cs @@ -322,7 +322,7 @@ internal DeserializationContext(DeserializationOptions options, PSRemotingCrypto /// is used by PriorityReceivedDataCollection (remoting) to process incoming data from the /// remote end. A value of Null means that the max memory is unlimited. /// - internal int? MaximumAllowedMemory { set; get; } + internal int? MaximumAllowedMemory { get; set; } /// /// Logs that memory used by deserialized objects is not related to the size of input xml. diff --git a/src/System.Management.Automation/help/HelpCommands.cs b/src/System.Management.Automation/help/HelpCommands.cs index 852db86c267..7e2e9cee439 100644 --- a/src/System.Management.Automation/help/HelpCommands.cs +++ b/src/System.Management.Automation/help/HelpCommands.cs @@ -185,6 +185,11 @@ public SwitchParameter Examples [Parameter(ParameterSetName = "Online", Mandatory = true)] public SwitchParameter Online { + get + { + return _showOnlineHelp; + } + set { _showOnlineHelp = value; @@ -193,11 +198,6 @@ public SwitchParameter Online VerifyParameterForbiddenInRemoteRunspace(this, "Online"); } } - - get - { - return _showOnlineHelp; - } } private bool _showOnlineHelp;