summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-10 12:54:00 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-10 12:54:00 -0800
commitdf82269fed216fa978c499f21d38a118ff41a746 (patch)
treedf98166c3b79b305cccd67f38bdde40985680566 /src
parent75049ff3ca3ed8a7da062769bb55de0cd60fa54e (diff)
downloadDotNetOpenAuth-df82269fed216fa978c499f21d38a118ff41a746.zip
DotNetOpenAuth-df82269fed216fa978c499f21d38a118ff41a746.tar.gz
DotNetOpenAuth-df82269fed216fa978c499f21d38a118ff41a746.tar.bz2
Fixed StyleCop issues.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Configuration/ReportingElement.cs2
-rw-r--r--src/DotNetOpenAuth/Reporting.cs47
2 files changed, 35 insertions, 14 deletions
diff --git a/src/DotNetOpenAuth/Configuration/ReportingElement.cs b/src/DotNetOpenAuth/Configuration/ReportingElement.cs
index 68bee74..85eee55 100644
--- a/src/DotNetOpenAuth/Configuration/ReportingElement.cs
+++ b/src/DotNetOpenAuth/Configuration/ReportingElement.cs
@@ -7,9 +7,9 @@
namespace DotNetOpenAuth.Configuration {
using System;
using System.Collections.Generic;
+ using System.Configuration;
using System.Linq;
using System.Text;
- using System.Configuration;
/// <summary>
/// Represents the &lt;reporting&gt; element in the host's .config file.
diff --git a/src/DotNetOpenAuth/Reporting.cs b/src/DotNetOpenAuth/Reporting.cs
index f0c0015..209a128 100644
--- a/src/DotNetOpenAuth/Reporting.cs
+++ b/src/DotNetOpenAuth/Reporting.cs
@@ -7,17 +7,27 @@
namespace DotNetOpenAuth {
using System;
using System.Collections.Generic;
+ using System.Diagnostics;
+ using System.IO;
+ using System.IO.IsolatedStorage;
using System.Linq;
+ using System.Reflection;
using System.Text;
using DotNetOpenAuth.Configuration;
- using System.IO;
- using System.Reflection;
- using System.Diagnostics;
- using System.IO.IsolatedStorage;
+ /// <summary>
+ /// The statistical reporting mechanism used so this library's project authors
+ /// know what versions and features are in use.
+ /// </summary>
internal static class Reporting {
+ /// <summary>
+ /// The writer to use to log statistics.
+ /// </summary>
private static StreamWriter writer;
+ /// <summary>
+ /// Initializes static members of the <see cref="Reporting"/> class.
+ /// </summary>
static Reporting() {
Enabled = DotNetOpenAuthSection.Configuration.Reporting.Enabled;
if (Enabled) {
@@ -32,17 +42,15 @@ namespace DotNetOpenAuth {
}
}
- private static StreamWriter OpenReport() {
- IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForDomain();
- var assemblyName = new AssemblyName(Assembly.GetExecutingAssembly().FullName);
- var fileStream = new IsolatedStorageFileStream("reporting.txt", FileMode.Append, FileAccess.Write, FileShare.Read);
- var writer = new StreamWriter(fileStream, Encoding.UTF8);
- writer.AutoFlush = true;
- return writer;
- }
-
+ /// <summary>
+ /// Gets or sets a value indicating whether this reporting is enabled.
+ /// </summary>
+ /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
private static bool Enabled { get; set; }
+ /// <summary>
+ /// Called when an OpenID RP successfully authenticates someone.
+ /// </summary>
internal static void OnAuthenticated() {
if (!Enabled) {
return;
@@ -50,5 +58,18 @@ namespace DotNetOpenAuth {
writer.Write("L");
}
+
+ /// <summary>
+ /// Opens the report file for append.
+ /// </summary>
+ /// <returns>The writer to use.</returns>
+ private static StreamWriter OpenReport() {
+ IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForDomain();
+ var assemblyName = new AssemblyName(Assembly.GetExecutingAssembly().FullName);
+ var fileStream = new IsolatedStorageFileStream("reporting.txt", FileMode.Append, FileAccess.Write, FileShare.Read);
+ var writer = new StreamWriter(fileStream, Encoding.UTF8);
+ writer.AutoFlush = true;
+ return writer;
+ }
}
}