Skip to content

Commit c4f6bfe

Browse files
authored
1 parent 604ce99 commit c4f6bfe

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/Microsoft.WSMan.Management/ConfigProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ public sealed class WSManConfigProvider : NavigationCmdletProvider, ICmdletProvi
4343
/// <summary>
4444
/// Object contains the cache of the enumerate results for the cmdlet to execute.
4545
/// </summary>
46-
private Dictionary<string, XmlDocument> enumerateMapping = new Dictionary<string, XmlDocument>();
46+
private readonly Dictionary<string, XmlDocument> enumerateMapping = new Dictionary<string, XmlDocument>();
4747

4848
/// <summary>
4949
/// Mapping of ResourceURI with the XML returned by the Get call.
5050
/// </summary>
51-
private Dictionary<string, string> getMapping = new Dictionary<string, string>();
51+
private readonly Dictionary<string, string> getMapping = new Dictionary<string, string>();
5252

5353
#region ICmdletProviderSupportsHelp Members
5454

src/Microsoft.WSMan.Management/CurrentConfigurations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal class CurrentConfigurations
2121
/// <summary>
2222
/// This holds the current configurations XML.
2323
/// </summary>
24-
private XmlDocument rootDocument;
24+
private readonly XmlDocument rootDocument;
2525

2626
/// <summary>
2727
/// Holds the reference to the current document element.
@@ -36,7 +36,7 @@ internal class CurrentConfigurations
3636
/// <summary>
3737
/// Session of the WsMan sserver.
3838
/// </summary>
39-
private IWSManSession serverSession;
39+
private readonly IWSManSession serverSession;
4040

4141
/// <summary>
4242
/// Gets the server session associated with the configuration.

src/Microsoft.WSMan.Management/InvokeWSManAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public Uri ResourceURI
244244
private Uri resourceuri;
245245

246246
private WSManHelper helper;
247-
private IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
247+
private readonly IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
248248
private IWSManSession m_session = null;
249249
private string connectionStr = string.Empty;
250250

src/Microsoft.WSMan.Management/WSManInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ public Hashtable ValueSet
14651465
private Hashtable valueset;
14661466

14671467
private WSManHelper helper;
1468-
private IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
1468+
private readonly IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
14691469
private IWSManSession m_session = null;
14701470
private string connectionStr = string.Empty;
14711471

src/Microsoft.WSMan.Management/WsManHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ internal class WSManHelper
7878
// string for operation
7979
internal string WSManOp = null;
8080

81-
private PSCmdlet cmdletname;
82-
private NavigationCmdletProvider _provider;
81+
private readonly PSCmdlet cmdletname;
82+
private readonly NavigationCmdletProvider _provider;
8383

8484
private FileStream _fs;
8585
private StreamReader _sr;
8686

87-
private static ResourceManager _resourceMgr = new ResourceManager("Microsoft.WSMan.Management.resources.WsManResources", typeof(WSManHelper).GetTypeInfo().Assembly);
87+
private static readonly ResourceManager _resourceMgr = new ResourceManager("Microsoft.WSMan.Management.resources.WsManResources", typeof(WSManHelper).GetTypeInfo().Assembly);
8888

8989
//
9090
//
@@ -1135,6 +1135,6 @@ internal static string GetResourceString(string Key)
11351135

11361136
/// <summary>
11371137
/// </summary>
1138-
private static Dictionary<string, string> ResourceValueCache = new Dictionary<string, string>();
1138+
private static readonly Dictionary<string, string> ResourceValueCache = new Dictionary<string, string>();
11391139
}
11401140
}

0 commit comments

Comments
 (0)