@@ -66,9 +66,9 @@ class ProgressRecord
6666 throw PSTraceSource . NewArgumentException ( "activity" , ProgressRecordStrings . ArgMayNotBeNullOrEmpty , "statusDescription" ) ;
6767 }
6868
69- _id = activityId ;
70- _activity = activity ;
71- _status = statusDescription ;
69+ this . id = activityId ;
70+ this . activity = activity ;
71+ this . status = statusDescription ;
7272 }
7373
7474 /// <summary>
@@ -77,14 +77,14 @@ class ProgressRecord
7777 /// <param name="other"></param>
7878 internal ProgressRecord ( ProgressRecord other )
7979 {
80- _activity = other . _activity ;
81- _currentOperation = other . _currentOperation ;
82- _id = other . _id ;
83- _parentId = other . _parentId ;
84- _percent = other . _percent ;
85- _secondsRemaining = other . _secondsRemaining ;
86- _status = other . _status ;
87- _type = other . _type ;
80+ this . activity = other . activity ;
81+ this . currentOperation = other . currentOperation ;
82+ this . id = other . id ;
83+ this . parentId = other . parentId ;
84+ this . percent = other . percent ;
85+ this . secondsRemaining = other . secondsRemaining ;
86+ this . status = other . status ;
87+ this . type = other . type ;
8888 }
8989
9090 /// <summary>
@@ -100,7 +100,7 @@ internal ProgressRecord(ProgressRecord other)
100100 {
101101 get
102102 {
103- return _id ;
103+ return id ;
104104 }
105105 }
106106
@@ -133,15 +133,15 @@ internal ProgressRecord(ProgressRecord other)
133133 {
134134 get
135135 {
136- return _parentId ;
136+ return parentId ;
137137 }
138138 set
139139 {
140140 if ( value == ActivityId )
141141 {
142142 throw PSTraceSource . NewArgumentException ( "value" , ProgressRecordStrings . ParentActivityIdCantBeActivityId ) ;
143143 }
144- _parentId = value ;
144+ parentId = value ;
145145 }
146146 }
147147
@@ -165,15 +165,15 @@ internal ProgressRecord(ProgressRecord other)
165165 {
166166 get
167167 {
168- return _activity ;
168+ return activity ;
169169 }
170170 set
171171 {
172172 if ( String . IsNullOrEmpty ( value ) )
173173 {
174174 throw PSTraceSource . NewArgumentException ( "value" , ProgressRecordStrings . ArgMayNotBeNullOrEmpty , "value" ) ;
175175 }
176- _activity = value ;
176+ activity = value ;
177177 }
178178 }
179179
@@ -191,15 +191,15 @@ internal ProgressRecord(ProgressRecord other)
191191 {
192192 get
193193 {
194- return _status ;
194+ return status ;
195195 }
196196 set
197197 {
198198 if ( String . IsNullOrEmpty ( value ) )
199199 {
200200 throw PSTraceSource . NewArgumentException ( "value" , ProgressRecordStrings . ArgMayNotBeNullOrEmpty , "value" ) ;
201201 }
202- _status = value ;
202+ status = value ;
203203 }
204204 }
205205
@@ -219,13 +219,13 @@ internal ProgressRecord(ProgressRecord other)
219219 {
220220 get
221221 {
222- return _currentOperation ;
222+ return currentOperation ;
223223 }
224224 set
225225 {
226226 // null or empty string is allowed
227227
228- _currentOperation = value ;
228+ currentOperation = value ;
229229 }
230230 }
231231
@@ -244,7 +244,7 @@ internal ProgressRecord(ProgressRecord other)
244244 {
245245 get
246246 {
247- return _percent ;
247+ return percent ;
248248 }
249249 set
250250 {
@@ -257,7 +257,7 @@ internal ProgressRecord(ProgressRecord other)
257257 "value" , value , ProgressRecordStrings . PercentMayNotBeMoreThan100 , "PercentComplete" ) ;
258258 }
259259
260- _percent = value ;
260+ percent = value ;
261261 }
262262 }
263263
@@ -283,13 +283,13 @@ internal ProgressRecord(ProgressRecord other)
283283 {
284284 get
285285 {
286- return _secondsRemaining ;
286+ return secondsRemaining ;
287287 }
288288 set
289289 {
290290 // negative values are allowed
291291
292- _secondsRemaining = value ;
292+ secondsRemaining = value ;
293293 }
294294 }
295295
@@ -307,7 +307,7 @@ internal ProgressRecord(ProgressRecord other)
307307 {
308308 get
309309 {
310- return _type ;
310+ return type ;
311311 }
312312 set
313313 {
@@ -316,7 +316,7 @@ internal ProgressRecord(ProgressRecord other)
316316 throw PSTraceSource . NewArgumentException ( "value" ) ;
317317 }
318318
319- _type = value ;
319+ type = value ;
320320 }
321321 }
322322
@@ -343,14 +343,14 @@ public override
343343 String . Format (
344344 System . Globalization . CultureInfo . CurrentCulture ,
345345 "parent = {0} id = {1} act = {2} stat = {3} cur = {4} pct = {5} sec = {6} type = {7}" ,
346- _parentId ,
347- _id ,
348- _activity ,
349- _status ,
350- _currentOperation ,
351- _percent ,
352- _secondsRemaining ,
353- _type ) ;
346+ parentId ,
347+ id ,
348+ activity ,
349+ status ,
350+ currentOperation ,
351+ percent ,
352+ secondsRemaining ,
353+ type ) ;
354354 }
355355
356356 #endregion
@@ -467,29 +467,33 @@ internal static int GetPercentageComplete(DateTime startTime, TimeSpan expectedD
467467
468468 #endregion
469469
470+ #region DO NOT REMOVE OR RENAME THESE FIELDS - it will break remoting compatibility with Windows PowerShell
471+
470472 [ DataMemberAttribute ( ) ]
471- private int _id ;
473+ private int id ;
472474
473475 [ DataMemberAttribute ( ) ]
474- private int _parentId = - 1 ;
476+ private int parentId = - 1 ;
475477
476478 [ DataMemberAttribute ( ) ]
477- private string _activity ;
479+ private string activity ;
478480
479481 [ DataMemberAttribute ( ) ]
480- private string _status ;
482+ private string status ;
481483
482484 [ DataMemberAttribute ( ) ]
483- private string _currentOperation ;
485+ private string currentOperation ;
484486
485487 [ DataMemberAttribute ( ) ]
486- private int _percent = - 1 ;
488+ private int percent = - 1 ;
487489
488490 [ DataMemberAttribute ( ) ]
489- private int _secondsRemaining = - 1 ;
491+ private int secondsRemaining = - 1 ;
490492
491493 [ DataMemberAttribute ( ) ]
492- private ProgressRecordType _type = ProgressRecordType . Processing ;
494+ private ProgressRecordType type = ProgressRecordType . Processing ;
495+
496+ #endregion
493497
494498 #region Serialization / deserialization for remoting
495499
0 commit comments