summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-03-01 23:06:06 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-03-01 23:19:28 -0800
commit8b88373edc300ba26f260dc80d4ebdf1b4aca2fb (patch)
treedc3afd50446d9872a56792cd55e7873b83efa7db /src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
parent198bffe042a3650095b27bed29d0f8c98bc5c926 (diff)
downloadDotNetOpenAuth-8b88373edc300ba26f260dc80d4ebdf1b4aca2fb.zip
DotNetOpenAuth-8b88373edc300ba26f260dc80d4ebdf1b4aca2fb.tar.gz
DotNetOpenAuth-8b88373edc300ba26f260dc80d4ebdf1b4aca2fb.tar.bz2
Replaced manual argument validation with helper methods.
Diffstat (limited to 'src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs')
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
index 5745bad..54661b2 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
@@ -7,10 +7,8 @@
namespace DotNetOpenAuth.AspNet.Clients {
using System;
using System.Collections.Generic;
- using System.Globalization;
using System.Net;
using System.Web;
- using DotNetOpenAuth.AspNet.Resources;
using DotNetOpenAuth.Messaging;
/// <summary>
@@ -58,15 +56,8 @@ namespace DotNetOpenAuth.AspNet.Clients {
/// </exception>
public FacebookClient(string appId, string appSecret)
: base("facebook") {
- if (string.IsNullOrEmpty(appId)) {
- throw new ArgumentException(
- string.Format(CultureInfo.CurrentCulture, WebResources.Argument_Cannot_Be_Null_Or_Empty, "appId"), "appId");
- }
-
- if (string.IsNullOrEmpty("appSecret")) {
- throw new ArgumentException(
- string.Format(CultureInfo.CurrentCulture, WebResources.Argument_Cannot_Be_Null_Or_Empty, "appSecret"), "appSecret");
- }
+ Requires.NotNullOrEmpty(appId, "appId");
+ Requires.NotNullOrEmpty(appSecret, "appSecret");
this._appId = appId;
this._appSecret = appSecret;