mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix IDE0044: MakeFieldReadonly part 9 (#13892)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
This commit is contained in:
@@ -43,12 +43,12 @@ namespace Microsoft.WSMan.Management
|
||||
/// <summary>
|
||||
/// Object contains the cache of the enumerate results for the cmdlet to execute.
|
||||
/// </summary>
|
||||
private Dictionary<string, XmlDocument> enumerateMapping = new Dictionary<string, XmlDocument>();
|
||||
private readonly Dictionary<string, XmlDocument> enumerateMapping = new Dictionary<string, XmlDocument>();
|
||||
|
||||
/// <summary>
|
||||
/// Mapping of ResourceURI with the XML returned by the Get call.
|
||||
/// </summary>
|
||||
private Dictionary<string, string> getMapping = new Dictionary<string, string>();
|
||||
private readonly Dictionary<string, string> getMapping = new Dictionary<string, string>();
|
||||
|
||||
#region ICmdletProviderSupportsHelp Members
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// <summary>
|
||||
/// This holds the current configurations XML.
|
||||
/// </summary>
|
||||
private XmlDocument rootDocument;
|
||||
private readonly XmlDocument rootDocument;
|
||||
|
||||
/// <summary>
|
||||
/// Holds the reference to the current document element.
|
||||
@@ -36,7 +36,7 @@ namespace Microsoft.WSMan.Management
|
||||
/// <summary>
|
||||
/// Session of the WsMan sserver.
|
||||
/// </summary>
|
||||
private IWSManSession serverSession;
|
||||
private readonly IWSManSession serverSession;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the server session associated with the configuration.
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace Microsoft.WSMan.Management
|
||||
private Uri resourceuri;
|
||||
|
||||
private WSManHelper helper;
|
||||
private IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
|
||||
private readonly IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
|
||||
private IWSManSession m_session = null;
|
||||
private string connectionStr = string.Empty;
|
||||
|
||||
|
||||
@@ -1465,7 +1465,7 @@ namespace Microsoft.WSMan.Management
|
||||
private Hashtable valueset;
|
||||
|
||||
private WSManHelper helper;
|
||||
private IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
|
||||
private readonly IWSManEx m_wsmanObject = (IWSManEx)new WSManClass();
|
||||
private IWSManSession m_session = null;
|
||||
private string connectionStr = string.Empty;
|
||||
|
||||
|
||||
@@ -78,13 +78,13 @@ namespace Microsoft.WSMan.Management
|
||||
// string for operation
|
||||
internal string WSManOp = null;
|
||||
|
||||
private PSCmdlet cmdletname;
|
||||
private NavigationCmdletProvider _provider;
|
||||
private readonly PSCmdlet cmdletname;
|
||||
private readonly NavigationCmdletProvider _provider;
|
||||
|
||||
private FileStream _fs;
|
||||
private StreamReader _sr;
|
||||
|
||||
private static ResourceManager _resourceMgr = new ResourceManager("Microsoft.WSMan.Management.resources.WsManResources", typeof(WSManHelper).GetTypeInfo().Assembly);
|
||||
private static readonly ResourceManager _resourceMgr = new ResourceManager("Microsoft.WSMan.Management.resources.WsManResources", typeof(WSManHelper).GetTypeInfo().Assembly);
|
||||
|
||||
//
|
||||
//
|
||||
@@ -1135,6 +1135,6 @@ namespace Microsoft.WSMan.Management
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
private static Dictionary<string, string> ResourceValueCache = new Dictionary<string, string>();
|
||||
private static readonly Dictionary<string, string> ResourceValueCache = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user