summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-07-19 17:24:07 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-07-19 17:24:07 -0700
commitcdfbd61ee254d396066eea9fcfaf578df2b773d0 (patch)
treec95757c653b3493e38d9ba379bd853acc23fb92c
parent71d363716853191028cd2b750d52197290428734 (diff)
downloadDotNetOpenAuth-cdfbd61ee254d396066eea9fcfaf578df2b773d0.zip
DotNetOpenAuth-cdfbd61ee254d396066eea9fcfaf578df2b773d0.tar.gz
DotNetOpenAuth-cdfbd61ee254d396066eea9fcfaf578df2b773d0.tar.bz2
Removed C# 4 usage from samples so they build under VS2008.
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs4
-rw-r--r--samples/OAuthConsumer/GoogleAddressBook.aspx.cs2
-rw-r--r--samples/OAuthConsumerWpf/MainWindow.xaml.cs2
-rw-r--r--samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs2
4 files changed, 5 insertions, 5 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
index 2add642..558d4bc 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
@@ -207,12 +207,12 @@ namespace DotNetOpenAuth.ApplicationBlock {
/// <summary>
/// Gets the Gmail address book's contents.
/// </summary>
- /// <param name="consumer">The Google consumer previously constructed using <see cref="CreateWebConsumer"/> or <see cref="CreateDesktopConsumer"/>.</param>
+ /// <param name="consumer">The Google consumer.</param>
/// <param name="accessToken">The access token previously retrieved.</param>
/// <param name="maxResults">The maximum number of entries to return. If you want to receive all of the contacts, rather than only the default maximum, you can specify a very large number here.</param>
/// <param name="startIndex">The 1-based index of the first result to be retrieved (for paging).</param>
/// <returns>An XML document returned by Google.</returns>
- public static XDocument GetContacts(ConsumerBase consumer, string accessToken, int maxResults = 25, int startIndex = 1) {
+ public static XDocument GetContacts(ConsumerBase consumer, string accessToken, int maxResults/* = 25*/, int startIndex/* = 1*/) {
if (consumer == null) {
throw new ArgumentNullException("consumer");
}
diff --git a/samples/OAuthConsumer/GoogleAddressBook.aspx.cs b/samples/OAuthConsumer/GoogleAddressBook.aspx.cs
index 1ca3abe..ddca7e4 100644
--- a/samples/OAuthConsumer/GoogleAddressBook.aspx.cs
+++ b/samples/OAuthConsumer/GoogleAddressBook.aspx.cs
@@ -57,7 +57,7 @@
protected void getAddressBookButton_Click(object sender, EventArgs e) {
var google = new WebConsumer(GoogleConsumer.ServiceDescription, this.TokenManager);
- XDocument contactsDocument = GoogleConsumer.GetContacts(google, this.AccessToken, 5);
+ XDocument contactsDocument = GoogleConsumer.GetContacts(google, this.AccessToken, 5, 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 };
StringBuilder tableBuilder = new StringBuilder();
diff --git a/samples/OAuthConsumerWpf/MainWindow.xaml.cs b/samples/OAuthConsumerWpf/MainWindow.xaml.cs
index 5bf157b..e70d39a 100644
--- a/samples/OAuthConsumerWpf/MainWindow.xaml.cs
+++ b/samples/OAuthConsumerWpf/MainWindow.xaml.cs
@@ -98,7 +98,7 @@
this.googleAccessToken = auth.AccessToken;
postButton.IsEnabled = true;
- XDocument contactsDocument = GoogleConsumer.GetContacts(this.google, this.googleAccessToken);
+ 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();
diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs
index b14aba1..c95fc7c 100644
--- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs
+++ b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs
@@ -18,7 +18,7 @@
this.emailLabel.Text = "unavailable";
}
this.claimedIdLabel.Text = this.User.Identity.Name;
- var contactsDocument = GoogleConsumer.GetContacts(Global.GoogleWebConsumer, State.GoogleAccessToken);
+ var contactsDocument = GoogleConsumer.GetContacts(Global.GoogleWebConsumer, State.GoogleAccessToken, 25, 1);
this.RenderContacts(contactsDocument);
}
}