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 @@ -14,7 +14,7 @@ namespace Microsoft.PowerShell.Cmdletization.Cim
/// </summary>
internal abstract class QueryJobBase : CimChildJobBase<CimInstance>
{
private CimQuery _cimQuery;
private readonly CimQuery _cimQuery;

internal QueryJobBase(CimJobContext jobContext, CimQuery cimQuery)
: base(jobContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public Int16 Delay
/// <summary>
/// The indicator to use when show progress.
/// </summary>
private string[] _indicator = { "|", "/", "-", "\\" };
private readonly string[] _indicator = { "|", "/", "-", "\\" };

/// <summary>
/// The activity id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private class MiscInfoGroup
#endregion Static Data and Constants

#region Instance Data
private string _machineName = localMachineName; // we might need to have cmdlet work on another machine
private readonly string _machineName = localMachineName; // we might need to have cmdlet work on another machine

/// <summary>
/// Collection of property names from the Property parameter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public virtual Process[] InputObject
// We use a Dictionary to optimize the check whether the object
// is already in the list.
private List<Process> _matchingProcesses = new List<Process>();
private Dictionary<int, Process> _keys = new Dictionary<int, Process>();
private readonly Dictionary<int, Process> _keys = new Dictionary<int, Process>();

/// <summary>
/// Retrieve the list of all processes matching the Name, Id
Expand Down Expand Up @@ -956,7 +956,7 @@ private void myProcess_Exited(object sender, System.EventArgs e)

#region Overrides

private List<Process> _processList = new List<Process>();
private readonly List<Process> _processList = new List<Process>();

// Wait handle which is used by thread to sleep.
private ManualResetEvent _waitHandle;
Expand Down Expand Up @@ -2607,7 +2607,7 @@ internal class ProcessCollection
/// JobObjectHandle is a reference to the job object used to track
/// the child processes created by the main process hosted by the Start-Process cmdlet.
/// </summary>
private Microsoft.PowerShell.Commands.SafeJobHandle _jobObjectHandle;
private readonly Microsoft.PowerShell.Commands.SafeJobHandle _jobObjectHandle;

/// <summary>
/// ProcessCollection constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Microsoft.PowerShell.Commands
[Alias("scb")]
public class SetClipboardCommand : PSCmdlet
{
private List<string> _contentList = new List<string>();
private readonly List<string> _contentList = new List<string>();

/// <summary>
/// Property that sets clipboard content.
Expand Down