Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
Fixed Stylecop message after Reporting change.
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Feb 4, 2010
1 parent e2183b6 commit 5c6ae08
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions src/DotNetOpenAuth/Reporting.cs
Expand Up @@ -115,40 +115,6 @@ public static class Reporting {
Enabled = DotNetOpenAuthSection.Configuration.Reporting.Enabled;
}

/// <summary>
/// Initializes Reporting if it has not been initialized yet.
/// </summary>
private static void Initialize() {
lock(initializationSync) {
if (!broken && !initialized) {
try {
file = GetIsolatedStorage();
reportOriginIdentity = GetOrCreateOriginIdentity();

webRequestHandler = new StandardWebRequestHandler();
observations.Add(observedRequests = new PersistentHashSet(file, "requests.txt", 3));
observations.Add(observedCultures = new PersistentHashSet(file, "cultures.txt", 20));
observations.Add(observedFeatures = new PersistentHashSet(file, "features.txt", int.MaxValue));

// Record site-wide features in use.
if (HttpContext.Current != null && HttpContext.Current.ApplicationInstance != null) {
// MVC or web forms?
// front-end or back end web farm?
// url rewriting?
////RecordFeatureUse(IsMVC ? "ASP.NET MVC" : "ASP.NET Web Forms");
}

initialized = true;
} catch (Exception e) {
// This is supposed to be as low-risk as possible, so if it fails, just disable reporting
// and avoid rethrowing.
broken = true;
Logger.Library.Error("Error while trying to initialize reporting.", e);
}
}
}
}

/// <summary>
/// Gets or sets a value indicating whether this reporting is enabled.
/// </summary>
Expand Down Expand Up @@ -349,6 +315,40 @@ public static class Reporting {
}
}

/// <summary>
/// Initializes Reporting if it has not been initialized yet.
/// </summary>
private static void Initialize() {
lock (initializationSync) {
if (!broken && !initialized) {
try {
file = GetIsolatedStorage();
reportOriginIdentity = GetOrCreateOriginIdentity();

webRequestHandler = new StandardWebRequestHandler();
observations.Add(observedRequests = new PersistentHashSet(file, "requests.txt", 3));
observations.Add(observedCultures = new PersistentHashSet(file, "cultures.txt", 20));
observations.Add(observedFeatures = new PersistentHashSet(file, "features.txt", int.MaxValue));

// Record site-wide features in use.
if (HttpContext.Current != null && HttpContext.Current.ApplicationInstance != null) {
// MVC or web forms?
// front-end or back end web farm?
// url rewriting?
////RecordFeatureUse(IsMVC ? "ASP.NET MVC" : "ASP.NET Web Forms");
}

initialized = true;
} catch (Exception e) {
// This is supposed to be as low-risk as possible, so if it fails, just disable reporting
// and avoid rethrowing.
broken = true;
Logger.Library.Error("Error while trying to initialize reporting.", e);
}
}
}
}

/// <summary>
/// Assembles a report for submission.
/// </summary>
Expand Down

0 comments on commit 5c6ae08

Please sign in to comment.