Changeset 2714
- Timestamp:
- 5/25/2012 6:00:42 AM (12 months ago)
- Location:
- trunk/eraser/Eraser.BlackBox
- Files:
-
- 3 edited
-
BlackBoxReport.cs (modified) (5 diffs)
-
BlackBoxReportUploader.cs (modified) (4 diffs)
-
BlackBoxUploadForm.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.BlackBox/BlackBoxReport.cs
r2703 r2714 186 186 /// Gets whether the given report has been uploaded to the server. 187 187 /// </summary> 188 [Obsolete] 188 189 public bool Submitted 189 190 { 190 191 get 191 192 { 192 return Status [0] == 1;193 return Status == BlackBoxReportStatus.Uploaded; 193 194 } 194 195 internal set 195 196 { 196 byte[] status = Status; 197 Status = value ? BlackBoxReportStatus.Uploaded : BlackBoxReportStatus.New; 198 } 199 } 200 201 /// <summary> 202 /// Gets the status of the report. 203 /// </summary> 204 public BlackBoxReportStatus Status 205 { 206 get 207 { 208 return (BlackBoxReportStatus)StatusData[0]; 209 } 210 211 internal set 212 { 213 byte[] status = StatusData; 197 214 status[0] = Convert.ToByte(value); 198 Status = status;215 StatusData = status; 199 216 } 200 217 } … … 208 225 get 209 226 { 210 return BitConverter.ToInt32(Status , 1);227 return BitConverter.ToInt32(StatusData, 1); 211 228 } 212 229 … … 214 231 { 215 232 byte[] bytes = BitConverter.GetBytes(value); 216 byte[] status = Status ;233 byte[] status = StatusData; 217 234 Buffer.BlockCopy(bytes, 0, status, 1, bytes.Length); 218 Status = status;235 StatusData = status; 219 236 } 220 237 } … … 223 240 /// Gets or sets the status of the report. 224 241 /// </summary> 225 private byte[] Status 242 private byte[] StatusData 226 243 { 227 244 get … … 320 337 private List<string> StackTraceCache; 321 338 } 339 340 /// <summary> 341 /// Statuses of reports on the server. 342 /// </summary> 343 public enum BlackBoxReportStatus 344 { 345 /// <summary> 346 /// The report has not been reported before. 347 /// </summary> 348 New, 349 350 /// <summary> 351 /// The report has been reported before and pending a resolution. 352 /// </summary> 353 Uploaded, 354 355 /// <summary> 356 /// The report has been resolved. 357 /// </summary> 358 Resolved 359 } 322 360 } -
trunk/eraser/Eraser.BlackBox/BlackBoxReportUploader.cs
r2713 r2714 98 98 get 99 99 { 100 return Status == ReportStatus.New;100 return Status == BlackBoxReportStatus.New; 101 101 } 102 102 } … … 105 105 /// Gets the status of the report. 106 106 /// </summary> 107 public ReportStatus Status107 public BlackBoxReportStatus Status 108 108 { 109 109 get … … 118 118 try 119 119 { 120 return ( ReportStatus)Enum.Parse(typeof(ReportStatus), reportStatus, true);120 return (BlackBoxReportStatus)Enum.Parse(typeof(BlackBoxReportStatus), reportStatus, true); 121 121 } 122 122 catch (ArgumentException e) … … 364 364 private readonly string ReportBaseName; 365 365 } 366 367 /// <summary>368 /// Statuses of reports on the server.369 /// </summary>370 public enum ReportStatus371 {372 /// <summary>373 /// The report has not been reported before.374 /// </summary>375 New,376 377 /// <summary>378 /// The report has been reported before and pending a resolution.379 /// </summary>380 Exists,381 382 /// <summary>383 /// The report has been resolved.384 /// </summary>385 Resolved386 }387 366 } -
trunk/eraser/Eraser.BlackBox/BlackBoxUploadForm.cs
r2713 r2714 119 119 120 120 BlackBoxReportUploader uploader = new BlackBoxReportUploader(report); 121 if (uploader.Status == ReportStatus.Resolved) 122 ; 121 report.Status = uploader.Status; 123 122 } 124 123
Note: See TracChangeset
for help on using the changeset viewer.
