diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-20 07:33:33 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-20 07:33:33 -0700 |
commit | 437d7b39b93416af9fe5f86d0469db7236f4a7db (patch) | |
tree | 7ebe8a61b93eec7c3563e634df2ef127ec489787 | |
parent | 767e676d9239e18447e951b7715284fee256ec49 (diff) | |
download | DotNetOpenAuth-437d7b39b93416af9fe5f86d0469db7236f4a7db.zip DotNetOpenAuth-437d7b39b93416af9fe5f86d0469db7236f4a7db.tar.gz DotNetOpenAuth-437d7b39b93416af9fe5f86d0469db7236f4a7db.tar.bz2 |
StyleCop fixes that only appeared when building at the command line.
6 files changed, 36 insertions, 36 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Util.cs b/samples/DotNetOpenAuth.ApplicationBlock/Util.cs index 65505b6..0bec372 100644 --- a/samples/DotNetOpenAuth.ApplicationBlock/Util.cs +++ b/samples/DotNetOpenAuth.ApplicationBlock/Util.cs @@ -177,7 +177,7 @@ public Stream GetRequestStream(HttpWebRequest request) { this.action(request); - return wrappedHandler.GetRequestStream(request); + return this.wrappedHandler.GetRequestStream(request); } /// <summary> @@ -202,7 +202,7 @@ public Stream GetRequestStream(HttpWebRequest request, DirectWebRequestOptions options) { this.action(request); - return wrappedHandler.GetRequestStream(request, options); + return this.wrappedHandler.GetRequestStream(request, options); } /// <summary> @@ -226,7 +226,7 @@ this.action(request); } - return wrappedHandler.GetResponse(request); + return this.wrappedHandler.GetResponse(request); } /// <summary> @@ -250,7 +250,7 @@ this.action(request); } - return wrappedHandler.GetResponse(request, options); + return this.wrappedHandler.GetResponse(request, options); } #endregion diff --git a/samples/OAuthConsumerWpf/Authorize.xaml.cs b/samples/OAuthConsumerWpf/Authorize.xaml.cs index 2ee4d70..4ed1932 100644 --- a/samples/OAuthConsumerWpf/Authorize.xaml.cs +++ b/samples/OAuthConsumerWpf/Authorize.xaml.cs @@ -24,7 +24,7 @@ private string requestToken; internal Authorize(DesktopConsumer consumer, FetchUri fetchUriCallback) { - InitializeComponent(); + this.InitializeComponent(); this.consumer = consumer; Cursor original = this.Cursor; @@ -44,7 +44,7 @@ internal string AccessToken { get; set; } private void finishButton_Click(object sender, RoutedEventArgs e) { - var grantedAccess = this.consumer.ProcessUserAuthorization(this.requestToken, verifierBox.Text); + var grantedAccess = this.consumer.ProcessUserAuthorization(this.requestToken, this.verifierBox.Text); this.AccessToken = grantedAccess.AccessToken; DialogResult = true; Close(); diff --git a/samples/OAuthConsumerWpf/MainWindow.xaml.cs b/samples/OAuthConsumerWpf/MainWindow.xaml.cs index e70d39a..1914621 100644 --- a/samples/OAuthConsumerWpf/MainWindow.xaml.cs +++ b/samples/OAuthConsumerWpf/MainWindow.xaml.cs @@ -96,28 +96,28 @@ bool? result = auth.ShowDialog(); if (result.HasValue && result.Value) { this.googleAccessToken = auth.AccessToken; - postButton.IsEnabled = true; + this.postButton.IsEnabled = true; XDocument contactsDocument = GoogleConsumer.GetContacts(this.google, this.googleAccessToken, 25, 1); var contacts = from entry in contactsDocument.Root.Elements(XName.Get("entry", "http://www.w3.org/2005/Atom")) select new { Name = entry.Element(XName.Get("title", "http://www.w3.org/2005/Atom")).Value, Email = entry.Element(XName.Get("email", "http://schemas.google.com/g/2005")).Attribute("address").Value }; - contactsGrid.Children.Clear(); + this.contactsGrid.Children.Clear(); foreach (var contact in contacts) { - contactsGrid.RowDefinitions.Add(new RowDefinition()); + this.contactsGrid.RowDefinitions.Add(new RowDefinition()); TextBlock name = new TextBlock { Text = contact.Name }; TextBlock email = new TextBlock { Text = contact.Email }; - Grid.SetRow(name, contactsGrid.RowDefinitions.Count - 1); - Grid.SetRow(email, contactsGrid.RowDefinitions.Count - 1); + Grid.SetRow(name, this.contactsGrid.RowDefinitions.Count - 1); + Grid.SetRow(email, this.contactsGrid.RowDefinitions.Count - 1); Grid.SetColumn(email, 1); - contactsGrid.Children.Add(name); - contactsGrid.Children.Add(email); + this.contactsGrid.Children.Add(name); + this.contactsGrid.Children.Add(email); } } } private void postButton_Click(object sender, RoutedEventArgs e) { - XElement postBodyXml = XElement.Parse(postBodyBox.Text); - GoogleConsumer.PostBlogEntry(this.google, this.googleAccessToken, blogUrlBox.Text, postTitleBox.Text, postBodyXml); + XElement postBodyXml = XElement.Parse(this.postBodyBox.Text); + GoogleConsumer.PostBlogEntry(this.google, this.googleAccessToken, this.blogUrlBox.Text, this.postTitleBox.Text, postBodyXml); } private void beginWcfAuthorizationButton_Click(object sender, RoutedEventArgs e) { @@ -130,9 +130,9 @@ bool? result = auth.ShowDialog(); if (result.HasValue && result.Value) { this.wcfAccessToken = auth.AccessToken; - wcfName.Content = CallService(client => client.GetName()); - wcfAge.Content = CallService(client => client.GetAge()); - wcfFavoriteSites.Content = CallService(client => string.Join(", ", client.GetFavoriteSites())); + this.wcfName.Content = CallService(client => client.GetName()); + this.wcfAge.Content = CallService(client => client.GetAge()); + this.wcfFavoriteSites.Content = CallService(client => string.Join(", ", client.GetFavoriteSites())); } } @@ -155,15 +155,15 @@ private void beginButton_Click(object sender, RoutedEventArgs e) { try { var service = new ServiceProviderDescription { - RequestTokenEndpoint = new MessageReceivingEndpoint(requestTokenUrlBox.Text, requestTokenHttpMethod.SelectedIndex == 0 ? HttpDeliveryMethods.GetRequest : HttpDeliveryMethods.PostRequest), - UserAuthorizationEndpoint = new MessageReceivingEndpoint(authorizeUrlBox.Text, HttpDeliveryMethods.GetRequest), - AccessTokenEndpoint = new MessageReceivingEndpoint(accessTokenUrlBox.Text, accessTokenHttpMethod.SelectedIndex == 0 ? HttpDeliveryMethods.GetRequest : HttpDeliveryMethods.PostRequest), + RequestTokenEndpoint = new MessageReceivingEndpoint(this.requestTokenUrlBox.Text, this.requestTokenHttpMethod.SelectedIndex == 0 ? HttpDeliveryMethods.GetRequest : HttpDeliveryMethods.PostRequest), + UserAuthorizationEndpoint = new MessageReceivingEndpoint(this.authorizeUrlBox.Text, HttpDeliveryMethods.GetRequest), + AccessTokenEndpoint = new MessageReceivingEndpoint(this.accessTokenUrlBox.Text, this.accessTokenHttpMethod.SelectedIndex == 0 ? HttpDeliveryMethods.GetRequest : HttpDeliveryMethods.PostRequest), TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new HmacSha1SigningBindingElement() }, - ProtocolVersion = oauthVersion.SelectedIndex == 0 ? ProtocolVersion.V10 : ProtocolVersion.V10a, + ProtocolVersion = this.oauthVersion.SelectedIndex == 0 ? ProtocolVersion.V10 : ProtocolVersion.V10a, }; var tokenManager = new InMemoryTokenManager(); - tokenManager.ConsumerKey = consumerKeyBox.Text; - tokenManager.ConsumerSecret = consumerSecretBox.Text; + tokenManager.ConsumerKey = this.consumerKeyBox.Text; + tokenManager.ConsumerSecret = this.consumerSecretBox.Text; var consumer = new DesktopConsumer(service, tokenManager); string accessToken; @@ -186,13 +186,13 @@ return; } } - HttpDeliveryMethods resourceHttpMethod = resourceHttpMethodList.SelectedIndex < 2 ? HttpDeliveryMethods.GetRequest : HttpDeliveryMethods.PostRequest; - if (resourceHttpMethodList.SelectedIndex == 1) { + HttpDeliveryMethods resourceHttpMethod = this.resourceHttpMethodList.SelectedIndex < 2 ? HttpDeliveryMethods.GetRequest : HttpDeliveryMethods.PostRequest; + if (this.resourceHttpMethodList.SelectedIndex == 1) { resourceHttpMethod |= HttpDeliveryMethods.AuthorizationHeaderRequest; } - var resourceEndpoint = new MessageReceivingEndpoint(resourceUrlBox.Text, resourceHttpMethod); + var resourceEndpoint = new MessageReceivingEndpoint(this.resourceUrlBox.Text, resourceHttpMethod); using (IncomingWebResponse resourceResponse = consumer.PrepareAuthorizedRequestAndSend(resourceEndpoint, accessToken)) { - resultsBox.Text = resourceResponse.GetResponseReader().ReadToEnd(); + this.resultsBox.Text = resourceResponse.GetResponseReader().ReadToEnd(); } } catch (DotNetOpenAuth.Messaging.ProtocolException ex) { MessageBox.Show(this, ex.Message); diff --git a/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs b/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs index 5b4dd24..c80264d 100644 --- a/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs +++ b/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { private CheckIdWindow(HostedProvider provider, IAuthenticationRequest request) { Contract.Requires(request != null); - InitializeComponent(); + this.InitializeComponent(); // Initialize the window with appropriate values. this.realmLabel.Content = request.Realm; diff --git a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs index 0fcac9c..0983637 100644 --- a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs +++ b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs @@ -53,7 +53,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { this.hostedProvider.ProcessRequest = this.ProcessRequest; TextWriterAppender boxLogger = log4net.LogManager.GetRepository().GetAppenders().OfType<TextWriterAppender>().FirstOrDefault(a => a.Name == "TextBoxAppender"); if (boxLogger != null) { - boxLogger.Writer = new TextBoxTextWriter(logBox); + boxLogger.Writer = new TextBoxTextWriter(this.logBox); } this.startProvider(); @@ -115,15 +115,15 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { if (!request.IsResponseReady) { var authRequest = request as IAuthenticationRequest; if (authRequest != null) { - switch (checkidRequestList.SelectedIndex) { + switch (this.checkidRequestList.SelectedIndex) { case 0: if (authRequest.IsDirectedIdentity) { string userIdentityPageBase = this.hostedProvider.UserIdentityPageBase.AbsoluteUri; - if (capitalizedHostName.IsChecked.Value) { + if (this.capitalizedHostName.IsChecked.Value) { userIdentityPageBase = (this.hostedProvider.UserIdentityPageBase.Scheme + Uri.SchemeDelimiter + this.hostedProvider.UserIdentityPageBase.Authority).ToUpperInvariant() + this.hostedProvider.UserIdentityPageBase.PathAndQuery; } string leafPath = "directedidentity"; - if (directedIdentityTrailingPeriodsCheckbox.IsChecked.Value) { + if (this.directedIdentityTrailingPeriodsCheckbox.IsChecked.Value) { leafPath += "."; } authRequest.ClaimedIdentifier = Identifier.Parse(userIdentityPageBase + leafPath, true); @@ -173,7 +173,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.</param> private void opIdentifierLabel_MouseDown(object sender, MouseButtonEventArgs e) { try { - Clipboard.SetText(opIdentifierLabel.Content.ToString()); + Clipboard.SetText(this.opIdentifierLabel.Content.ToString()); } catch (COMException ex) { MessageBox.Show(this, ex.Message, "Error while copying OP Identifier to the clipboard", MessageBoxButton.OK, MessageBoxImage.Error); } @@ -185,7 +185,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void ClearLogButton_Click(object sender, RoutedEventArgs e) { - logBox.Clear(); + this.logBox.Clear(); } } } diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs index dd6738f..54ed37e 100644 --- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs +++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs @@ -359,7 +359,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements { { "Name", "Andrew" }, { "Location", "http://hostb/pathB" }, { "Timestamp", XmlConvert.ToString(DateTime.UtcNow, XmlDateTimeSerializationMode.Utc) }, - { "realm" , "someValue" }, + { "realm", "someValue" }, }; IProtocolMessage requestMessage = this.channel.ReadFromRequest(CreateHttpRequestInfo(scheme, fields)); Assert.IsNotNull(requestMessage); |