diff options
Diffstat (limited to 'src/DotNetOpenAuth.OAuth/OAuthReporting.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth/OAuthReporting.cs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/DotNetOpenAuth.OAuth/OAuthReporting.cs b/src/DotNetOpenAuth.OAuth/OAuthReporting.cs deleted file mode 100644 index e2c0aab..0000000 --- a/src/DotNetOpenAuth.OAuth/OAuthReporting.cs +++ /dev/null @@ -1,56 +0,0 @@ -//----------------------------------------------------------------------- -// <copyright file="OAuthReporting.cs" company="Outercurve Foundation"> -// Copyright (c) Outercurve Foundation. All rights reserved. -// </copyright> -//----------------------------------------------------------------------- - -namespace DotNetOpenAuth { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using DotNetOpenAuth.Messaging.Bindings; - using DotNetOpenAuth.OAuth; - using DotNetOpenAuth.OAuth.ChannelElements; - using Validation; - - /// <summary> - /// Utility methods specific to OAuth feature reporting. - /// </summary> - internal class OAuthReporting : Reporting { - /// <summary> - /// Records the feature and dependency use. - /// </summary> - /// <param name="value">The consumer or service provider.</param> - /// <param name="service">The service.</param> - /// <param name="tokenManager">The token manager.</param> - /// <param name="nonceStore">The nonce store.</param> - internal static void RecordFeatureAndDependencyUse(object value, ServiceProviderDescription service, ITokenManager tokenManager, INonceStore nonceStore) { - Requires.NotNull(value, "value"); - Requires.NotNull(service, "service"); - Requires.NotNull(tokenManager, "tokenManager"); - - // In release builds, just quietly return. - if (value == null || service == null || tokenManager == null) { - return; - } - - if (Reporting.Enabled && Reporting.Configuration.IncludeFeatureUsage) { - StringBuilder builder = new StringBuilder(); - builder.Append(value.GetType().Name); - builder.Append(" "); - builder.Append(tokenManager.GetType().Name); - if (nonceStore != null) { - builder.Append(" "); - builder.Append(nonceStore.GetType().Name); - } - builder.Append(" "); - builder.Append(service.Version); - builder.Append(" "); - builder.Append(service.UserAuthorizationEndpoint); - Reporting.ObservedFeatures.Add(builder.ToString()); - Reporting.Touch(); - } - } - } -} |