Fix IDE0044: MakeFieldReadonly part 10 (#13893)

https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
This commit is contained in:
xtqqczze
2020-10-30 12:20:06 +05:00
committed by GitHub
parent 2c1546cd47
commit a2a938e964
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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()
{
+2 -2
View File
@@ -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()
{
+1 -1
View File
@@ -376,7 +376,7 @@ namespace PSTests.Sequential
public class PowerShellPolicyTests : IClassFixture<PowerShellPolicyFixture>
{
private PowerShellPolicyFixture fixture;
private readonly PowerShellPolicyFixture fixture;
public PowerShellPolicyTests(PowerShellPolicyFixture fixture)
{
+2 -2
View File
@@ -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()