diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-21 18:18:48 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-21 18:18:48 -0800 |
commit | fc93c242c225f1fed31c9b37ddf80bd38a7b27d4 (patch) | |
tree | 9d3767d91f270cbe7a9ce9762580fd3ffec7ae0a /src | |
parent | b7e82ab5eaf22d52b684a3264a6158d1f7d4a684 (diff) | |
download | DotNetOpenAuth-fc93c242c225f1fed31c9b37ddf80bd38a7b27d4.zip DotNetOpenAuth-fc93c242c225f1fed31c9b37ddf80bd38a7b27d4.tar.gz DotNetOpenAuth-fc93c242c225f1fed31c9b37ddf80bd38a7b27d4.tar.bz2 |
Got rid of extra GUIDs
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/Reporting.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/DotNetOpenAuth/Reporting.cs b/src/DotNetOpenAuth/Reporting.cs index 88556ff..5744cbb 100644 --- a/src/DotNetOpenAuth/Reporting.cs +++ b/src/DotNetOpenAuth/Reporting.cs @@ -286,6 +286,8 @@ namespace DotNetOpenAuth { } } + // Not all event counters may have even loaded in this app instance. + // We flush the ones in memory, and then read all of them off disk. foreach (var counter in events.Values) { counter.Flush(); } @@ -514,7 +516,6 @@ namespace DotNetOpenAuth { this.maximumElements = maximumElements; // Load the file into memory. - bool fileCreated = storage.GetFileNames(fileName).Length == 0; this.fileStream = new IsolatedStorageFileStream(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read, storage); this.reader = new StreamReader(this.fileStream, Encoding.UTF8); while (!this.reader.EndOfStream) { @@ -523,11 +524,6 @@ namespace DotNetOpenAuth { this.writer = new StreamWriter(this.fileStream, Encoding.UTF8); this.lastFlushed = DateTime.Now; - - // Write a unique header to the file so the report collector can match duplicates. - if (fileCreated) { - this.writer.WriteLine(Guid.NewGuid().ToString("B")); - } } /// <summary> @@ -663,7 +659,6 @@ namespace DotNetOpenAuth { this.FileName = fileName; // Load the file into memory. - bool fileCreated = storage.GetFileNames(fileName).Length == 0; this.fileStream = new IsolatedStorageFileStream(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read, storage); this.reader = new StreamReader(this.fileStream, Encoding.UTF8); while (!this.reader.EndOfStream) { @@ -681,12 +676,6 @@ namespace DotNetOpenAuth { this.writer = new StreamWriter(this.fileStream, Encoding.UTF8); this.lastFlushed = DateTime.Now; - - // Write a unique header to the file so the report collector can match duplicates. - if (fileCreated) { - this.writer.WriteLine(Guid.NewGuid().ToString("B")); - this.writer.Flush(); - } } /// <summary> |