Changeset 1417 for branches/eraser6/BlackBox/Eraser.Util/BlackBox.cs
- Timestamp:
- 12/23/2009 3:17:17 AM (3 years ago)
- File:
-
- 1 edited
-
branches/eraser6/BlackBox/Eraser.Util/BlackBox.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/BlackBox/Eraser.Util/BlackBox.cs
r1414 r1417 530 530 DirectoryInfo directory = new DirectoryInfo(Path); 531 531 foreach (FileInfo file in directory.GetFiles()) 532 if ( file.Name != BlackBox.StackTraceFileName)532 if (!InternalFiles.Contains(file.Name)) 533 533 result.Add(file); 534 534 … … 560 560 } 561 561 562 /// <summary> 563 /// Gets or sets whether the given report has been uploaded to the server. 564 /// </summary> 565 public bool Submitted 566 { 567 get 568 { 569 byte[] buffer = new byte[1]; 570 using (FileStream stream = new FileStream(System.IO.Path.Combine(Path, StatusFileName), 571 FileMode.OpenOrCreate, FileAccess.Read, FileShare.Read)) 572 { 573 stream.Read(buffer, 0, buffer.Length); 574 } 575 576 return buffer[0] == 1; 577 } 578 579 set 580 { 581 byte[] buffer = { Convert.ToByte(value) }; 582 using (FileStream stream = new FileStream(System.IO.Path.Combine(Path, StatusFileName), 583 FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read)) 584 { 585 stream.Write(buffer, 0, buffer.Length); 586 } 587 } 588 } 589 562 590 public override string ToString() 563 591 { … … 574 602 /// </summary> 575 603 private List<BlackBoxExceptionEntry> StackTraceCache; 604 605 /// <summary> 606 /// The file name for the status file. 607 /// </summary> 608 private static readonly string StatusFileName = "Status.txt"; 609 610 /// <summary> 611 /// The list of files internal to the report. 612 /// </summary> 613 private static readonly List<string> InternalFiles = new List<string>( 614 new string[] { 615 BlackBox.StackTraceFileName, 616 "Status.txt" 617 } 618 ); 576 619 } 577 620
Note: See TracChangeset
for help on using the changeset viewer.
