summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookGraph.cs2
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs4
-rw-r--r--samples/OAuthAuthorizationServer/Code/Client.cs2
-rw-r--r--samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs10
-rw-r--r--samples/OAuthAuthorizationServer/Web.config2
-rw-r--r--samples/OAuthClient/SampleWcf2.aspx.cs6
-rw-r--r--samples/OAuthClient/WindowsLive.aspx.cs2
-rw-r--r--samples/OAuthConsumer/SampleWcf.aspx.cs6
-rw-r--r--samples/OAuthConsumerWpf/MainWindow.xaml.cs6
-rw-r--r--samples/OAuthServiceProvider/Code/DataClasses.designer.cs10
-rw-r--r--samples/OAuthServiceProvider/Code/DatabaseTokenManager.cs2
-rw-r--r--samples/OpenIdProviderMvc/Controllers/AccountController.cs20
-rw-r--r--samples/OpenIdProviderMvc/Models/User.cs2
13 files changed, 37 insertions, 37 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookGraph.cs b/samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookGraph.cs
index 5b1591d..909ae9a 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookGraph.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookGraph.cs
@@ -36,7 +36,7 @@ namespace DotNetOpenAuth.ApplicationBlock.Facebook {
public string Birthday { get; set; }
public static FacebookGraph Deserialize(string json) {
- if (String.IsNullOrEmpty(json)) {
+ if (string.IsNullOrEmpty(json)) {
throw new ArgumentNullException("json");
}
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs b/samples/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs
index a4f6154..35f6c08 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/InMemoryTokenManager.cs
@@ -31,7 +31,7 @@ namespace DotNetOpenAuth.ApplicationBlock {
/// <param name="consumerKey">The consumer key.</param>
/// <param name="consumerSecret">The consumer secret.</param>
public InMemoryTokenManager(string consumerKey, string consumerSecret) {
- if (String.IsNullOrEmpty(consumerKey)) {
+ if (string.IsNullOrEmpty(consumerKey)) {
throw new ArgumentNullException("consumerKey");
}
@@ -136,7 +136,7 @@ namespace DotNetOpenAuth.ApplicationBlock {
/// send a follow-up request for the access token.</para>
/// </remarks>
public void StoreOpenIdAuthorizedRequestToken(string consumerKey, AuthorizationApprovedResponse authorization) {
- this.tokensAndSecrets[authorization.RequestToken] = String.Empty;
+ this.tokensAndSecrets[authorization.RequestToken] = string.Empty;
}
#endregion
diff --git a/samples/OAuthAuthorizationServer/Code/Client.cs b/samples/OAuthAuthorizationServer/Code/Client.cs
index d33dc3f..0013f27 100644
--- a/samples/OAuthAuthorizationServer/Code/Client.cs
+++ b/samples/OAuthAuthorizationServer/Code/Client.cs
@@ -52,7 +52,7 @@
// In this sample, it's enough of a callback URL match if the scheme and host match.
// In a production app, it is advisable to require a match on the path as well.
Uri acceptableCallbackPattern = new Uri(this.Callback);
- if (String.Equals(acceptableCallbackPattern.GetLeftPart(UriPartial.Authority), callback.GetLeftPart(UriPartial.Authority), StringComparison.Ordinal)) {
+ if (string.Equals(acceptableCallbackPattern.GetLeftPart(UriPartial.Authority), callback.GetLeftPart(UriPartial.Authority), StringComparison.Ordinal)) {
return true;
}
diff --git a/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs b/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs
index a1e4b83..c7af82a 100644
--- a/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs
+++ b/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs
@@ -122,7 +122,7 @@ namespace OAuthAuthorizationServer.Code
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _UserId;
@@ -260,7 +260,7 @@ namespace OAuthAuthorizationServer.Code
public partial class Client : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _ClientId;
@@ -470,7 +470,7 @@ namespace OAuthAuthorizationServer.Code
public partial class ClientAuthorization : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _AuthorizationId;
@@ -734,7 +734,7 @@ namespace OAuthAuthorizationServer.Code
public partial class Nonce : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private string _Context;
@@ -844,7 +844,7 @@ namespace OAuthAuthorizationServer.Code
public partial class SymmetricCryptoKey : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private string _Bucket;
diff --git a/samples/OAuthAuthorizationServer/Web.config b/samples/OAuthAuthorizationServer/Web.config
index 3d13e5a..20b2bbd 100644
--- a/samples/OAuthAuthorizationServer/Web.config
+++ b/samples/OAuthAuthorizationServer/Web.config
@@ -65,7 +65,7 @@
</log4net>
<connectionStrings>
- <add name="DatabaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"
+ <add name="DatabaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database2.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
diff --git a/samples/OAuthClient/SampleWcf2.aspx.cs b/samples/OAuthClient/SampleWcf2.aspx.cs
index 64a58e7..f4d2dd5 100644
--- a/samples/OAuthClient/SampleWcf2.aspx.cs
+++ b/samples/OAuthClient/SampleWcf2.aspx.cs
@@ -84,7 +84,7 @@
protected void getNameButton_Click(object sender, EventArgs e) {
try {
- this.nameLabel.Text = CallService(client => client.GetName());
+ this.nameLabel.Text = this.CallService(client => client.GetName());
} catch (SecurityAccessDeniedException) {
this.nameLabel.Text = "Access denied!";
}
@@ -92,7 +92,7 @@
protected void getAgeButton_Click(object sender, EventArgs e) {
try {
- int? age = CallService(client => client.GetAge());
+ int? age = this.CallService(client => client.GetAge());
this.ageLabel.Text = age.HasValue ? age.Value.ToString(CultureInfo.CurrentCulture) : "not available";
} catch (SecurityAccessDeniedException) {
this.ageLabel.Text = "Access denied!";
@@ -101,7 +101,7 @@
protected void getFavoriteSites_Click(object sender, EventArgs e) {
try {
- string[] favoriteSites = CallService(client => client.GetFavoriteSites());
+ string[] favoriteSites = this.CallService(client => client.GetFavoriteSites());
this.favoriteSitesLabel.Text = string.Join(", ", favoriteSites);
} catch (SecurityAccessDeniedException) {
this.favoriteSitesLabel.Text = "Access denied!";
diff --git a/samples/OAuthClient/WindowsLive.aspx.cs b/samples/OAuthClient/WindowsLive.aspx.cs
index f70147c..b550e17 100644
--- a/samples/OAuthClient/WindowsLive.aspx.cs
+++ b/samples/OAuthClient/WindowsLive.aspx.cs
@@ -18,7 +18,7 @@
};
protected void Page_Load(object sender, EventArgs e) {
- if (String.Equals("localhost", this.Request.Headers["Host"].Split(':')[0], StringComparison.OrdinalIgnoreCase)) {
+ if (string.Equals("localhost", this.Request.Headers["Host"].Split(':')[0], StringComparison.OrdinalIgnoreCase)) {
this.localhostDoesNotWorkPanel.Visible = true;
var builder = new UriBuilder(this.publicLink.NavigateUrl);
builder.Port = this.Request.Url.Port;
diff --git a/samples/OAuthConsumer/SampleWcf.aspx.cs b/samples/OAuthConsumer/SampleWcf.aspx.cs
index 489e294..d56a161 100644
--- a/samples/OAuthConsumer/SampleWcf.aspx.cs
+++ b/samples/OAuthConsumer/SampleWcf.aspx.cs
@@ -49,7 +49,7 @@
protected void getNameButton_Click(object sender, EventArgs e) {
try {
- this.nameLabel.Text = CallService(client => client.GetName());
+ this.nameLabel.Text = this.CallService(client => client.GetName());
} catch (SecurityAccessDeniedException) {
this.nameLabel.Text = "Access denied!";
}
@@ -57,7 +57,7 @@
protected void getAgeButton_Click(object sender, EventArgs e) {
try {
- int? age = CallService(client => client.GetAge());
+ int? age = this.CallService(client => client.GetAge());
this.ageLabel.Text = age.HasValue ? age.Value.ToString(CultureInfo.CurrentCulture) : "not available";
} catch (SecurityAccessDeniedException) {
this.ageLabel.Text = "Access denied!";
@@ -66,7 +66,7 @@
protected void getFavoriteSites_Click(object sender, EventArgs e) {
try {
- string[] favoriteSites = CallService(client => client.GetFavoriteSites());
+ string[] favoriteSites = this.CallService(client => client.GetFavoriteSites());
this.favoriteSitesLabel.Text = string.Join(", ", favoriteSites);
} catch (SecurityAccessDeniedException) {
this.favoriteSitesLabel.Text = "Access denied!";
diff --git a/samples/OAuthConsumerWpf/MainWindow.xaml.cs b/samples/OAuthConsumerWpf/MainWindow.xaml.cs
index eac6353..310c2c6 100644
--- a/samples/OAuthConsumerWpf/MainWindow.xaml.cs
+++ b/samples/OAuthConsumerWpf/MainWindow.xaml.cs
@@ -112,9 +112,9 @@
bool? result = auth.ShowDialog();
if (result.HasValue && result.Value) {
this.wcfAccessToken = auth.Authorization;
- this.wcfName.Content = CallService(client => client.GetName());
- this.wcfAge.Content = CallService(client => client.GetAge());
- this.wcfFavoriteSites.Content = CallService(client => string.Join(", ", client.GetFavoriteSites()));
+ this.wcfName.Content = this.CallService(client => client.GetName());
+ this.wcfAge.Content = this.CallService(client => client.GetAge());
+ this.wcfFavoriteSites.Content = this.CallService(client => string.Join(", ", client.GetFavoriteSites()));
}
}
diff --git a/samples/OAuthServiceProvider/Code/DataClasses.designer.cs b/samples/OAuthServiceProvider/Code/DataClasses.designer.cs
index 3c0d936..b7d291c 100644
--- a/samples/OAuthServiceProvider/Code/DataClasses.designer.cs
+++ b/samples/OAuthServiceProvider/Code/DataClasses.designer.cs
@@ -122,7 +122,7 @@ namespace OAuthServiceProvider.Code
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _UserId;
@@ -336,7 +336,7 @@ namespace OAuthServiceProvider.Code
public partial class FavoriteSite : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _FavoriteSiteId;
@@ -487,7 +487,7 @@ namespace OAuthServiceProvider.Code
public partial class OAuthConsumer : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _ConsumerId;
@@ -697,7 +697,7 @@ namespace OAuthServiceProvider.Code
public partial class OAuthToken : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private int _TokenId;
@@ -1081,7 +1081,7 @@ namespace OAuthServiceProvider.Code
public partial class Nonce : INotifyPropertyChanging, INotifyPropertyChanged
{
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
private string _Context;
diff --git a/samples/OAuthServiceProvider/Code/DatabaseTokenManager.cs b/samples/OAuthServiceProvider/Code/DatabaseTokenManager.cs
index 29e568b..49da45d 100644
--- a/samples/OAuthServiceProvider/Code/DatabaseTokenManager.cs
+++ b/samples/OAuthServiceProvider/Code/DatabaseTokenManager.cs
@@ -147,7 +147,7 @@ namespace OAuthServiceProvider.Code {
}
public OAuthConsumer GetConsumerForToken(string token) {
- if (String.IsNullOrEmpty(token)) {
+ if (string.IsNullOrEmpty(token)) {
throw new ArgumentNullException("requestToken");
}
diff --git a/samples/OpenIdProviderMvc/Controllers/AccountController.cs b/samples/OpenIdProviderMvc/Controllers/AccountController.cs
index cbc6561..7cb4b62 100644
--- a/samples/OpenIdProviderMvc/Controllers/AccountController.cs
+++ b/samples/OpenIdProviderMvc/Controllers/AccountController.cs
@@ -55,7 +55,7 @@
}
this.FormsAuth.SignIn(userName, rememberMe);
- if (!String.IsNullOrEmpty(returnUrl)) {
+ if (!string.IsNullOrEmpty(returnUrl)) {
return Redirect(returnUrl);
} else {
return RedirectToAction("Index", "Home");
@@ -173,16 +173,16 @@
}
private bool ValidateChangePassword(string currentPassword, string newPassword, string confirmPassword) {
- if (String.IsNullOrEmpty(currentPassword)) {
+ if (string.IsNullOrEmpty(currentPassword)) {
ModelState.AddModelError("currentPassword", "You must specify a current password.");
}
if (newPassword == null || newPassword.Length < this.MembershipService.MinPasswordLength) {
ModelState.AddModelError(
"newPassword",
- String.Format(CultureInfo.CurrentCulture, "You must specify a new password of {0} or more characters.", this.MembershipService.MinPasswordLength));
+ string.Format(CultureInfo.CurrentCulture, "You must specify a new password of {0} or more characters.", this.MembershipService.MinPasswordLength));
}
- if (!String.Equals(newPassword, confirmPassword, StringComparison.Ordinal)) {
+ if (!string.Equals(newPassword, confirmPassword, StringComparison.Ordinal)) {
ModelState.AddModelError("_FORM", "The new password and confirmation password do not match.");
}
@@ -190,10 +190,10 @@
}
private bool ValidateLogOn(string userName, string password) {
- if (String.IsNullOrEmpty(userName)) {
+ if (string.IsNullOrEmpty(userName)) {
ModelState.AddModelError("username", "You must specify a username.");
}
- if (String.IsNullOrEmpty(password)) {
+ if (string.IsNullOrEmpty(password)) {
ModelState.AddModelError("password", "You must specify a password.");
}
if (!this.MembershipService.ValidateUser(userName, password)) {
@@ -204,18 +204,18 @@
}
private bool ValidateRegistration(string userName, string email, string password, string confirmPassword) {
- if (String.IsNullOrEmpty(userName)) {
+ if (string.IsNullOrEmpty(userName)) {
ModelState.AddModelError("username", "You must specify a username.");
}
- if (String.IsNullOrEmpty(email)) {
+ if (string.IsNullOrEmpty(email)) {
ModelState.AddModelError("email", "You must specify an email address.");
}
if (password == null || password.Length < this.MembershipService.MinPasswordLength) {
ModelState.AddModelError(
"password",
- String.Format(CultureInfo.CurrentCulture, "You must specify a password of {0} or more characters.", this.MembershipService.MinPasswordLength));
+ string.Format(CultureInfo.CurrentCulture, "You must specify a password of {0} or more characters.", this.MembershipService.MinPasswordLength));
}
- if (!String.Equals(password, confirmPassword, StringComparison.Ordinal)) {
+ if (!string.Equals(password, confirmPassword, StringComparison.Ordinal)) {
ModelState.AddModelError("_FORM", "The new password and confirmation password do not match.");
}
return ModelState.IsValid;
diff --git a/samples/OpenIdProviderMvc/Models/User.cs b/samples/OpenIdProviderMvc/Models/User.cs
index 198b8fa..c89d74d 100644
--- a/samples/OpenIdProviderMvc/Models/User.cs
+++ b/samples/OpenIdProviderMvc/Models/User.cs
@@ -13,7 +13,7 @@
}
internal static Uri GetClaimedIdentifierForUser(string username) {
- if (String.IsNullOrEmpty(username)) {
+ if (string.IsNullOrEmpty(username)) {
throw new ArgumentNullException("username");
}