Skip to content

Fix IDE0044: MakeFieldReadonly part 9 #13892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2020
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
4 changes: 2 additions & 2 deletions src/Microsoft.WSMan.Management/ConfigProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public sealed class WSManConfigProvider : NavigationCmdletProvider, ICmdletProvi
/// <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

Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.WSMan.Management/CurrentConfigurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class CurrentConfigurations
/// <summary>
/// This holds the current configurations XML.
/// </summary>
private XmlDocument rootDocument;
private readonly XmlDocument rootDocument;

/// <summary>
/// Holds the reference to the current document element.
Expand All @@ -36,7 +36,7 @@ internal class CurrentConfigurations
/// <summary>
/// Session of the WsMan sserver.
/// </summary>
private IWSManSession serverSession;
private readonly IWSManSession serverSession;

/// <summary>
/// Gets the server session associated with the configuration.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.WSMan.Management/InvokeWSManAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public Uri ResourceURI
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;

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.WSMan.Management/WSManInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ public Hashtable ValueSet
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;

Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.WSMan.Management/WsManHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ internal class WSManHelper
// 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);

//
//
Expand Down Expand Up @@ -1135,6 +1135,6 @@ internal static string GetResourceString(string Key)

/// <summary>
/// </summary>
private static Dictionary<string, string> ResourceValueCache = new Dictionary<string, string>();
private static readonly Dictionary<string, string> ResourceValueCache = new Dictionary<string, string>();
}
}