Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,11 @@ internal bool AtBeginProcess
/// </summary>
internal CimAsyncOperation AsyncOperation
{
get
{
return this.operation;
}

set
{
lock (this.myLock)
Expand All @@ -735,11 +740,6 @@ internal CimAsyncOperation AsyncOperation
this.operation = value;
}
}

get
{
return this.operation;
}
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,17 @@ private void WaitForAckMessage()
/// <param name="cmdlet"></param>
internal Cmdlet Cmdlet
{
set;
get;
set;
}

/// <summary>
/// Target computername.
/// </summary>
internal string TargetComputerName
{
set;
get;
set;
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,35 +540,35 @@ private void CreateSetSession(
/// </summary>
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;
}
}

/// <summary>
/// Set resource URI of the operation.
/// </summary>
public Uri ResourceUri
{
get
{
return this.options.ResourceUri;
}

set
{
DebugHelper.WriteLogEx("ResourceUri {0},", 0, value);

this.options.ResourceUri = value;
}

get
{
return this.options.ResourceUri;
}
}

/// <summary>
Expand Down Expand Up @@ -1595,17 +1595,17 @@ private void DisposeCancelOperation()
/// </summary>
private IDisposable CancelOperation
{
get
{
return this._cancelOperation;
}

set
{
DebugHelper.WriteLogEx();
this._cancelOperation = value;
Interlocked.Exchange(ref this._cancelOperationDisposed, 0);
}

get
{
return this._cancelOperation;
}
}

/// <summary>
Expand All @@ -1627,14 +1627,14 @@ internal ProtocolType Protocol
/// </summary>
internal XOperationContextBase ContextObject
{
set
get
{
this.contextObject = value;
return this.contextObject;
}

get
set
{
return this.contextObject;
this.contextObject = value;
}
}

Expand All @@ -1651,14 +1651,14 @@ internal XOperationContextBase ContextObject
/// </summary>
internal IObjectPreProcess ObjectPreProcess
{
set
get
{
this.objectPreprocess = value;
return this.objectPreprocess;
}

get
set
{
return this.objectPreprocess;
this.objectPreprocess = value;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -50,9 +50,9 @@ public PSObject InputObject
[Alias("Type")]
public PSMemberTypes MemberType
{
set { _memberType = value; }

get { return _memberType; }

set { _memberType = value; }
}

private string _memberName;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -102,9 +102,9 @@ public object SecondValue
[ValidateNotNullOrEmpty]
public string TypeName
{
set { _typeName = value; }

get { return _typeName; }

set { _typeName = value; }
}

private bool _force;
Expand All @@ -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 */;
Expand All @@ -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
Expand All @@ -152,9 +152,9 @@ public SwitchParameter PassThru
[ValidateNotNullOrEmpty]
public string NotePropertyName
{
set { _notePropertyName = value; }

get { return _notePropertyName; }

set { _notePropertyName = value; }
}

private object _notePropertyValue;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public OutGridViewCommand()
/// and if it should be possible to select multiple or single list items.
/// </summary>
[Parameter(ParameterSetName = "OutputMode")]
public OutputModeOption OutputMode { set; get; }
public OutputModeOption OutputMode { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the selected items should be written to the pipeline.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ public class GetMemberCommand : PSCmdlet
/// The object to retrieve properties from.
/// </summary>
[Parameter(ValueFromPipeline = true)]
public PSObject InputObject { set; get; }
public PSObject InputObject { get; set; }

/// <summary>
/// The member names to be retrieved.
/// </summary>
[Parameter(Position = 0)]
[ValidateNotNullOrEmpty]
public string[] Name { set; get; } = new string[] { "*" };
public string[] Name { get; set; } = new string[] { "*" };

/// <summary>
/// The member types to be retrieved.
/// </summary>
[Parameter]
[Alias("Type")]
public PSMemberTypes MemberType { set; get; } = PSMemberTypes.All;
public PSMemberTypes MemberType { get; set; } = PSMemberTypes.All;

/// <summary>
/// View from which the members are retrieved.
Expand All @@ -94,9 +94,9 @@ public class GetMemberCommand : PSCmdlet
[Parameter]
public SwitchParameter Static
{
set { _staticParameter = value; }

get { return _staticParameter; }

set { _staticParameter = value; }
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed class GetUniqueCommand : PSCmdlet
/// </summary>
/// <value></value>
[Parameter(ValueFromPipeline = true)]
public PSObject InputObject { set; get; } = AutomationNull.Value;
public PSObject InputObject { get; set; } = AutomationNull.Value;

/// <summary>
/// This parameter specifies that objects should be converted to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}

/// <summary>
Expand Down Expand Up @@ -521,7 +521,7 @@ public string[] FormatTypeName
/// <summary>
/// This parameter specified a prefix used to modify names of imported commands.
/// </summary>
internal string Prefix { set; get; } = string.Empty;
internal string Prefix { get; set; } = string.Empty;

/// <summary>
/// Gets or sets the certificate with which to sign the format file and psm1 file.
Expand Down
Loading