@@ -20,15 +20,15 @@ internal class TestActions : IBuildActions
20
20
/// <summary>
21
21
/// List of strings passed to FileDelete.
22
22
/// </summary>
23
- public readonly IList < string > FileDeleteIn = new List < string > ( ) ;
23
+ public IList < string > FileDeleteIn { get ; } = new List < string > ( ) ;
24
24
25
25
void IBuildActions . FileDelete ( string file )
26
26
{
27
27
FileDeleteIn . Add ( file ) ;
28
28
}
29
29
30
- public readonly IList < string > FileExistsIn = new List < string > ( ) ;
31
- public readonly IDictionary < string , bool > FileExists = new Dictionary < string , bool > ( ) ;
30
+ public IList < string > FileExistsIn { get ; } = new List < string > ( ) ;
31
+ public IDictionary < string , bool > FileExists { get ; } = new Dictionary < string , bool > ( ) ;
32
32
33
33
bool IBuildActions . FileExists ( string file )
34
34
{
@@ -42,12 +42,12 @@ bool IBuildActions.FileExists(string file)
42
42
throw new ArgumentException ( "Missing FileExists " + file ) ;
43
43
}
44
44
45
- public readonly IList < string > RunProcessIn = new List < string > ( ) ;
46
- public readonly IDictionary < string , int > RunProcess = new Dictionary < string , int > ( ) ;
47
- public readonly IDictionary < string , string > RunProcessOut = new Dictionary < string , string > ( ) ;
48
- public readonly IDictionary < string , string > RunProcessWorkingDirectory = new Dictionary < string , string > ( ) ;
49
- public readonly HashSet < string > CreateDirectories = new HashSet < string > ( ) ;
50
- public readonly HashSet < ( string , string ) > DownloadFiles = new HashSet < ( string , string ) > ( ) ;
45
+ public IList < string > RunProcessIn { get ; } = new List < string > ( ) ;
46
+ public IDictionary < string , int > RunProcess { get ; } = new Dictionary < string , int > ( ) ;
47
+ public IDictionary < string , string > RunProcessOut { get ; } = new Dictionary < string , string > ( ) ;
48
+ public IDictionary < string , string > RunProcessWorkingDirectory { get ; } = new Dictionary < string , string > ( ) ;
49
+ public HashSet < string > CreateDirectories { get ; } = new HashSet < string > ( ) ;
50
+ public HashSet < ( string , string ) > DownloadFiles { get ; } = new HashSet < ( string , string ) > ( ) ;
51
51
52
52
int IBuildActions . RunProcess ( string cmd , string args , string ? workingDirectory , IDictionary < string , string > ? env , out IList < string > stdOut )
53
53
{
@@ -85,14 +85,14 @@ int IBuildActions.RunProcess(string cmd, string args, string? workingDirectory,
85
85
return ret ;
86
86
}
87
87
88
- public readonly IList < string > DirectoryDeleteIn = new List < string > ( ) ;
88
+ public IList < string > DirectoryDeleteIn { get ; } = new List < string > ( ) ;
89
89
90
90
void IBuildActions . DirectoryDelete ( string dir , bool recursive )
91
91
{
92
92
DirectoryDeleteIn . Add ( dir ) ;
93
93
}
94
94
95
- public readonly IDictionary < string , bool > DirectoryExists = new Dictionary < string , bool > ( ) ;
95
+ public IDictionary < string , bool > DirectoryExists { get ; } = new Dictionary < string , bool > ( ) ;
96
96
97
97
bool IBuildActions . DirectoryExists ( string dir )
98
98
{
@@ -102,7 +102,7 @@ bool IBuildActions.DirectoryExists(string dir)
102
102
return ret ;
103
103
}
104
104
105
- public readonly IDictionary < string , string ? > GetEnvironmentVariable = new Dictionary < string , string ? > ( ) ;
105
+ public IDictionary < string , string ? > GetEnvironmentVariable { get ; } = new Dictionary < string , string ? > ( ) ;
106
106
107
107
string ? IBuildActions . GetEnvironmentVariable ( string name )
108
108
{
@@ -112,14 +112,14 @@ bool IBuildActions.DirectoryExists(string dir)
112
112
return ret ;
113
113
}
114
114
115
- public string GetCurrentDirectory = "" ;
115
+ public string GetCurrentDirectory { get ; set ; } = "" ;
116
116
117
117
string IBuildActions . GetCurrentDirectory ( )
118
118
{
119
119
return GetCurrentDirectory ;
120
120
}
121
121
122
- public readonly IDictionary < string , string > EnumerateFiles = new Dictionary < string , string > ( ) ;
122
+ public IDictionary < string , string > EnumerateFiles { get ; } = new Dictionary < string , string > ( ) ;
123
123
124
124
IEnumerable < string > IBuildActions . EnumerateFiles ( string dir )
125
125
{
@@ -129,7 +129,7 @@ IEnumerable<string> IBuildActions.EnumerateFiles(string dir)
129
129
return str . Split ( "\n " ) . Select ( p => PathCombine ( dir , p ) ) ;
130
130
}
131
131
132
- public readonly IDictionary < string , string > EnumerateDirectories = new Dictionary < string , string > ( ) ;
132
+ public IDictionary < string , string > EnumerateDirectories { get ; } = new Dictionary < string , string > ( ) ;
133
133
134
134
IEnumerable < string > IBuildActions . EnumerateDirectories ( string dir )
135
135
{
@@ -141,7 +141,7 @@ IEnumerable<string> IBuildActions.EnumerateDirectories(string dir)
141
141
: str . Split ( "\n " ) . Select ( p => PathCombine ( dir , p ) ) ;
142
142
}
143
143
144
- public bool IsWindows ;
144
+ public bool IsWindows { get ; set ; }
145
145
146
146
bool IBuildActions . IsWindows ( ) => IsWindows ;
147
147
@@ -164,7 +164,7 @@ void IBuildActions.WriteAllText(string filename, string contents)
164
164
{
165
165
}
166
166
167
- public readonly IDictionary < string , XmlDocument > LoadXml = new Dictionary < string , XmlDocument > ( ) ;
167
+ public IDictionary < string , XmlDocument > LoadXml { get ; } = new Dictionary < string , XmlDocument > ( ) ;
168
168
169
169
XmlDocument IBuildActions . LoadXml ( string filename )
170
170
{
0 commit comments