mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix IDE0044: MakeFieldReadonly part 10 (#13893)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
This commit is contained in:
@@ -969,7 +969,7 @@ namespace PSTests.Parallel
|
||||
|
||||
public class TestDataSettingsFile : IEnumerable<object[]>
|
||||
{
|
||||
private string _fileName = Path.GetTempFileName();
|
||||
private readonly string _fileName = Path.GetTempFileName();
|
||||
|
||||
public IEnumerator<object[]> GetEnumerator()
|
||||
{
|
||||
@@ -1162,7 +1162,7 @@ namespace PSTests.Parallel
|
||||
|
||||
public class TestDataLastFile : IEnumerable<object[]>
|
||||
{
|
||||
private string _fileName = Path.GetTempFileName();
|
||||
private readonly string _fileName = Path.GetTempFileName();
|
||||
|
||||
public IEnumerator<object[]> GetEnumerator()
|
||||
{
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace PSTests.Parallel
|
||||
{
|
||||
public class FileSystemProviderTests : IDisposable
|
||||
{
|
||||
private string testPath;
|
||||
private string testContent;
|
||||
private readonly string testPath;
|
||||
private readonly string testContent;
|
||||
|
||||
public FileSystemProviderTests()
|
||||
{
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace PSTests.Sequential
|
||||
|
||||
public class PowerShellPolicyTests : IClassFixture<PowerShellPolicyFixture>
|
||||
{
|
||||
private PowerShellPolicyFixture fixture;
|
||||
private readonly PowerShellPolicyFixture fixture;
|
||||
|
||||
public PowerShellPolicyTests(PowerShellPolicyFixture fixture)
|
||||
{
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace PSTests.Sequential
|
||||
// otherwise Invoke will not return any objects
|
||||
public class RunspaceTests
|
||||
{
|
||||
private static int count = 1;
|
||||
private static string script = string.Format($"get-command get-command");
|
||||
private static readonly int count = 1;
|
||||
private static readonly string script = string.Format($"get-command get-command");
|
||||
|
||||
[Fact]
|
||||
public void TestRunspaceWithPipeline()
|
||||
|
||||
Reference in New Issue
Block a user