Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed constructors.

  • Loading branch information...
commit c6ccbd0b47d5c57b435cc4ab8aa55fb9ad0a1aaf 1 parent 9c45502
@jlaanstra authored
Showing with 94 additions and 307 deletions.
  1. BIN  ExchangeLINQ.sln.docstates.suo
  2. BIN  ExchangeLINQ.suo
  3. +9 −16 ExchangeLINQ/AccessTokens/AccessTokensEntry.cs
  4. +3 −14 ExchangeLINQ/AccessTokens/AccessTokensFilteredByTokens.cs
  5. +0 −10 ExchangeLINQ/AccessTokens/AccessTokensFilteredByTokensInvalidate.cs
  6. +20 −12 ExchangeLINQ/Answers/AnswersEntry.cs
  7. +0 −11 ExchangeLINQ/Answers/AnswersFilteredById.cs
  8. +3 −16 ExchangeLINQ/Answers/AnswersFilteredByMe.cs
  9. +0 −12 ExchangeLINQ/Answers/AnswersFilteredByMeTopForTags.cs
  10. +0 −11 ExchangeLINQ/Answers/AnswersFilteredByQuestionId.cs
  11. +4 −15 ExchangeLINQ/Answers/AnswersFilteredByUserId.cs
  12. +0 −12 ExchangeLINQ/Answers/AnswersFilteredByUserIdTopForTags.cs
  13. +2 −10 ExchangeLINQ/Applications/ApplicationsEntry.cs
  14. +4 −14 ExchangeLINQ/Applications/ApplicationsFilteredByTokens.cs
  15. +0 −11 ExchangeLINQ/Applications/ApplicationsFilteredByTokensDeauthenticate.cs
  16. +5 −12 ExchangeLINQ/AssociatedUsers/AssociatedUsersEntry.cs
  17. +0 −11 ExchangeLINQ/AssociatedUsers/AssociatedUsersFilteredByMe.cs
  18. +0 −11 ExchangeLINQ/AssociatedUsers/AssociatedUsersFilteredByUserId.cs
  19. +0 −10 ExchangeLINQ/Badges/BadgesEntry.cs
  20. +0 −12 ExchangeLINQ/Comments/CommentsEntry.cs
  21. +42 −12 ExchangeLINQ/Context/StackExchangeContextImpl.cs
  22. +0 −12 ExchangeLINQ/Errors/ErrorsEntry.cs
  23. +2 −2 ExchangeLINQ/ExchangeLINQ.NET4.csproj
  24. +0 −12 ExchangeLINQ/Inbox/InboxEntry.cs
  25. +0 −12 ExchangeLINQ/Questions/QuestionsEntry.cs
  26. +0 −12 ExchangeLINQ/Search/SearchEntry.cs
  27. +0 −10 ExchangeLINQ/Sites/SitesEntry.cs
  28. +0 −6 ExchangeLINQ/Tags/TagsEntry.cs
  29. +0 −9 ExchangeLINQ/Users/UsersEntry.cs
View
BIN  ExchangeLINQ.sln.docstates.suo
Binary file not shown
View
BIN  ExchangeLINQ.suo
Binary file not shown
View
25 ExchangeLINQ/AccessTokens/AccessTokensEntry.cs
@@ -5,25 +5,18 @@
namespace ExchangeLINQ.AccessTokens
{
- public class AccessTokensEntry : State
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="AccessTokensEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal AccessTokensEntry(ExchangeUrl url)
- {
- this.Url = url;
- }
-
+ public class AccessTokensEntry : State
+ {
/// <summary>
/// Implements the Select query pattern.
/// </summary>
/// <param name="f">The f.</param>
/// <returns></returns>
- public AccessTokensFilteredByTokens Where(Func<InProp<FilterTokens,string>, FilterTokens> f)
- {
- return new AccessTokensFilteredByTokens(this.Url, f(new InProp<FilterTokens,string>()));
- }
- }
+ public AccessTokensFilteredByTokens Where(Func<InProp<FilterTokens,string>, FilterTokens> f)
+ {
+ FilterTokens t = f(new InProp<FilterTokens,string>());
+ this.Url.QueryUrl = string.Format(UrlConstants.AccessTokensByNameUrl, String.Join(";", t.Value));
+ return new AccessTokensFilteredByTokens() { Url = this.Url, Tokens = t };
+ }
+ }
}
View
17 ExchangeLINQ/AccessTokens/AccessTokensFilteredByTokens.cs
@@ -8,19 +8,7 @@ namespace ExchangeLINQ.AccessTokens
{
public class AccessTokensFilteredByTokens : ProcessorState<AccessToken>
{
- private FilterTokens tokens;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AccessTokensFilteredByTokens"/> class.
- /// </summary>
- /// <param name="tokens">The tokens.</param>
- internal AccessTokensFilteredByTokens(ExchangeUrl url, FilterTokens tokens)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.AccessTokensByNameUrl, String.Join(";", tokens.Value));
-
- this.tokens = tokens;
- }
+ public FilterTokens Tokens { get; set; }
/// <summary>
/// Helper function to filter tokens based on a set of ids.
@@ -29,7 +17,8 @@ internal AccessTokensFilteredByTokens(ExchangeUrl url, FilterTokens tokens)
/// <returns></returns>
public AccessTokensFilteredByTokensInvalidate Where(Func<IAccessTokensPageInvalidate, FilterInvalidate> tokenSelector)
{
- return new AccessTokensFilteredByTokensInvalidate(this.Url, this.tokens);
+ this.Url.QueryUrl = string.Format(UrlConstants.InvalidateAccessTokensByNameUrl, String.Join(";", Tokens.Value));
+ return new AccessTokensFilteredByTokensInvalidate() { Url = this.Url };
}
public FilteredByPage<AccessToken> Where(Func<IAccessTokensPageInvalidate, FilterPage> f)
View
10 ExchangeLINQ/AccessTokens/AccessTokensFilteredByTokensInvalidate.cs
@@ -8,16 +8,6 @@ namespace ExchangeLINQ.AccessTokens
{
public class AccessTokensFilteredByTokensInvalidate : ProcessorState<AccessToken>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AccessTokensFilteredByTokens"/> class.
- /// </summary>
- /// <param name="tokens">The tokens.</param>
- internal AccessTokensFilteredByTokensInvalidate(ExchangeUrl url, FilterTokens tokens)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.InvalidateAccessTokensByNameUrl, String.Join(";", tokens.Value));
- }
-
public FilteredByPage<AccessToken> Where(Func<IPage, FilterPage> f)
{
FilterPage filter = f(new InterfacesImpl());
View
32 ExchangeLINQ/Answers/AnswersEntry.cs
@@ -9,23 +9,27 @@ namespace ExchangeLINQ.Answers
public class AnswersEntry : ProcessorState<Answer>
{
/// <summary>
- /// Initializes a new instance of the <see cref="AnswersEntry"/> class.
+ /// Implements the Select query pattern.
/// </summary>
- /// <param name="url">The URL.</param>
- internal AnswersEntry(ExchangeUrl url)
+ /// <param name="f">The f.</param>
+ /// <returns></returns>
+ public AnswersFilteredById Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterIds> f)
{
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.AnswersUrl;
+ FilterIds ids = f(new AnswersInterfacesImpl());
+ this.Url.QueryUrl = string.Format(UrlConstants.AnswersByIdUrl, string.Join(";", ids.Value));
+ return new AnswersFilteredById() { Url = this.Url };
}
/// <summary>
- /// Implements the Select query pattern.
+ /// Wheres the specified f.
/// </summary>
/// <param name="f">The f.</param>
/// <returns></returns>
- public AnswersFilteredById Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterIds> f)
+ public AnswersFilteredByQuestionId Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterQuestionIds> f)
{
- return new AnswersFilteredById(this.Url, f(new AnswersInterfacesImpl()));
+ FilterQuestionIds ids = f(new AnswersInterfacesImpl());
+ this.Url.QueryUrl = string.Format(UrlConstants.AnswersByQuestionIdUrl, string.Join(";", ids.Value));
+ return new AnswersFilteredByQuestionId() { Url = this.Url };
}
/// <summary>
@@ -33,9 +37,11 @@ public AnswersFilteredById Where(Func<IAnswersIdQuestionPostingUserPageFromDateF
/// </summary>
/// <param name="f">The f.</param>
/// <returns></returns>
- public AnswersFilteredByQuestionId Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterQuestionIds> f)
+ public AnswersFilteredByUserId Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterUserIds> f)
{
- return new AnswersFilteredByQuestionId(this.Url, f(new AnswersInterfacesImpl()));
+ FilterUserIds ids = f(new AnswersInterfacesImpl());
+ this.Url.QueryUrl = string.Format(UrlConstants.AnswersByUserIdUrl, string.Join(";", ids.Value));
+ return new AnswersFilteredByUserId() { Url = this.Url, Ids = ids };
}
/// <summary>
@@ -43,9 +49,11 @@ public AnswersFilteredByQuestionId Where(Func<IAnswersIdQuestionPostingUserPageF
/// </summary>
/// <param name="f">The f.</param>
/// <returns></returns>
- public AnswersFilteredByUserId Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterUserIds> f)
+ public AnswersFilteredByMe Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterMe> f)
{
- return new AnswersFilteredByUserId(this.Url, f(new AnswersInterfacesImpl()));
+ FilterMe me = f(new AnswersInterfacesImpl());
+ this.Url.QueryUrl = UrlConstants.AnswersByMeUrl;
+ return new AnswersFilteredByMe() { Url = this.Url };
}
#region Complex
View
11 ExchangeLINQ/Answers/AnswersFilteredById.cs
@@ -8,17 +8,6 @@ namespace ExchangeLINQ.Answers
{
public class AnswersFilteredById : ProcessorState<Answer>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AnswersFilteredById"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="ids">The ids.</param>
- internal AnswersFilteredById(ExchangeUrl url, FilterIds ids)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.AnswersByIdUrl, string.Join(";", ids.Value));
- }
-
#region Complex
public FilteredByPage<Answer> Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterPage> f)
View
19 ExchangeLINQ/Answers/AnswersFilteredByMe.cs
@@ -8,24 +8,11 @@ namespace ExchangeLINQ.Answers
{
public class AnswersFilteredByMe : ProcessorState<Answer>
{
- private FilterMe me;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AnswersFilteredByMe"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="me">Me.</param>
- internal AnswersFilteredByMe(ExchangeUrl url, FilterMe me)
- {
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.AnswersByMeUrl;
-
- this.me = me;
- }
-
public AnswersFilteredByMeTopForTags Where(Func<IAnswersIsTopAnswerForTagPageFromDateFilter, FilterTags> f)
{
- return new AnswersFilteredByMeTopForTags(this.Url, this.me, f(new AnswersInterfacesImpl()));
+ FilterTags tags = f(new AnswersInterfacesImpl());
+ this.Url.QueryUrl = string.Format(UrlConstants.TopAnswersByTagByMeUrl, string.Join(";", tags.Value));
+ return new AnswersFilteredByMeTopForTags() { Url = this.Url };
}
#region Complex
View
12 ExchangeLINQ/Answers/AnswersFilteredByMeTopForTags.cs
@@ -8,18 +8,6 @@ namespace ExchangeLINQ.Answers
{
public class AnswersFilteredByMeTopForTags : ProcessorState<Answer>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AnswersFilteredByMeTopForTags"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="me">Me.</param>
- /// <param name="tags">The tags.</param>
- internal AnswersFilteredByMeTopForTags(ExchangeUrl url, FilterMe me, FilterTags tags)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.TopAnswersByTagByMeUrl, string.Join(";",tags.Value));
- }
-
#region Complex
public FilteredByPage<Answer> Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterPage> f)
View
11 ExchangeLINQ/Answers/AnswersFilteredByQuestionId.cs
@@ -8,17 +8,6 @@ namespace ExchangeLINQ.Answers
{
public class AnswersFilteredByQuestionId : ProcessorState<Answer>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AnswersFilteredByQuestionId"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="ids">The ids.</param>
- internal AnswersFilteredByQuestionId(ExchangeUrl url, FilterIds ids)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.AnswersByQuestionIdUrl, string.Join(";", ids.Value));
- }
-
#region Complex
public FilteredByPage<Answer> Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterPage> f)
View
19 ExchangeLINQ/Answers/AnswersFilteredByUserId.cs
@@ -8,24 +8,13 @@ namespace ExchangeLINQ.Answers
{
public class AnswersFilteredByUserId : ProcessorState<Answer>
{
- private FilterUserIds ids;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AnswersFilteredByUserId"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="ids">The ids.</param>
- internal AnswersFilteredByUserId(ExchangeUrl url, FilterUserIds ids)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.AnswersByUserIdUrl, string.Join(";", ids.Value));
-
- this.ids = ids;
- }
+ public FilterUserIds Ids { get; set; }
public AnswersFilteredByUserIdTopForTags Where(Func<IAnswersIsTopAnswerForTagPageFromDateFilter, FilterTags> f)
{
- return new AnswersFilteredByUserIdTopForTags(this.Url, this.ids, f(new AnswersInterfacesImpl()));
+ FilterTags tags = f(new AnswersInterfacesImpl());
+ this.Url.QueryUrl = string.Format(UrlConstants.TopAnswersByTagByUserIdUrl, string.Join(";", Ids.Value), string.Join(";", tags.Value));
+ return new AnswersFilteredByUserIdTopForTags() { Url = this.Url };
}
#region Complex
View
12 ExchangeLINQ/Answers/AnswersFilteredByUserIdTopForTags.cs
@@ -8,18 +8,6 @@ namespace ExchangeLINQ.Answers
{
public class AnswersFilteredByUserIdTopForTags : ProcessorState<Answer>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AnswersFilteredByUserIdTopForTags"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="ids">The ids.</param>
- /// <param name="tags">The tags.</param>
- internal AnswersFilteredByUserIdTopForTags(ExchangeUrl url, FilterUserIds ids, FilterTags tags)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.TopAnswersByTagByUserIdUrl, string.Join(";", ids.Value), string.Join(";", tags.Value));
- }
-
#region Complex
public FilteredByPage<Answer> Where(Func<IAnswersIdQuestionPostingUserPageFromDateFilter, FilterPage> f)
View
12 ExchangeLINQ/Applications/ApplicationsEntry.cs
@@ -8,22 +8,14 @@ namespace ExchangeLINQ.Applications
public class ApplicationsEntry : State
{
/// <summary>
- /// Initializes a new instance of the <see cref="ApplicationsEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal ApplicationsEntry(ExchangeUrl url)
- {
- this.Url = url;
- }
-
- /// <summary>
/// Helper function to filter tokens based on a set of ids.
/// </summary>
/// <param name="f">The f.</param>
/// <returns></returns>
public ApplicationsFilteredByTokens Where(Func<IApplicationsToken, FilterTokens> f)
{
- return new ApplicationsFilteredByTokens(this.Url, f(new ApplicationsInterfacesImpl()));
+ FilterTokens tokens = f(new ApplicationsInterfacesImpl());
+ return new ApplicationsFilteredByTokens() { Url = this.Url, Tokens = tokens };
}
}
}
View
18 ExchangeLINQ/Applications/ApplicationsFilteredByTokens.cs
@@ -6,19 +6,8 @@ namespace ExchangeLINQ.Applications
{
public class ApplicationsFilteredByTokens : State
{
- private FilterTokens tokens;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ApplicationsFilteredByTokens"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="tokens">The tokens.</param>
- internal ApplicationsFilteredByTokens(ExchangeUrl url, FilterTokens tokens)
- {
- this.Url = url;
- this.tokens = tokens;
- }
-
+ public FilterTokens Tokens { get; set; }
+
/// <summary>
/// Helper function to filter tokens based on a set of ids.
/// </summary>
@@ -26,7 +15,8 @@ internal ApplicationsFilteredByTokens(ExchangeUrl url, FilterTokens tokens)
/// <returns></returns>
public ApplicationsFilteredByTokensDeauthenticate Where(Func<IApplicationsDeauthenticate, FilterDeauthenticate> f)
{
- return new ApplicationsFilteredByTokensDeauthenticate(this.Url, this.tokens);
+ this.Url.QueryUrl = string.Format(UrlConstants.DeauthenticateAppsByAccessTokensUrl, String.Join(";", Tokens));
+ return new ApplicationsFilteredByTokensDeauthenticate() { Url = this.Url };
}
}
}
View
11 ExchangeLINQ/Applications/ApplicationsFilteredByTokensDeauthenticate.cs
@@ -8,17 +8,6 @@ namespace ExchangeLINQ.Applications
{
public class ApplicationsFilteredByTokensDeauthenticate : ProcessorState<AccessToken>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="ApplicationsFilteredByTokensDeauthenticate"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="tokens">The tokens.</param>
- internal ApplicationsFilteredByTokensDeauthenticate(ExchangeUrl url, FilterTokens tokens)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.DeauthenticateAppsByAccessTokensUrl, String.Join(";", tokens));
- }
-
public FilteredByPage<AccessToken> Where(Func<IPage, FilterPage> f)
{
FilterPage filter = f(new InterfacesImpl());
View
17 ExchangeLINQ/AssociatedUsers/AssociatedUsersEntry.cs
@@ -9,23 +9,15 @@ namespace ExchangeLINQ.AssociatedUsers
public class AssociatedUsersEntry : State
{
/// <summary>
- /// Initializes a new instance of the <see cref="AssociatedUsersEntry"/> class.
- /// </summary>
- /// <param name="oAuth">The o auth.</param>
- internal AssociatedUsersEntry(ExchangeUrl url)
- {
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.AssociatedMeUrl;
- }
-
- /// <summary>
/// Implements the Where query pattern.
/// </summary>
/// <param name="f">The f.</param>
/// <returns></returns>
public AssociatedUsersFilteredByUserId Where(Func<IAssociatedUsersUserPage, FilterUserIds> f)
{
- return new AssociatedUsersFilteredByUserId(this.Url, f(new AssociatedUsersInterfacesImpl()));
+ FilterUserIds ids = f(new AssociatedUsersInterfacesImpl());
+ this.Url.QueryUrl = string.Format(UrlConstants.AssociatedUsersByIdUrl, string.Join(";",ids.Value));
+ return new AssociatedUsersFilteredByUserId() { Url = this.Url };
}
/// <summary>
@@ -35,7 +27,8 @@ public AssociatedUsersFilteredByUserId Where(Func<IAssociatedUsersUserPage, Filt
/// <returns></returns>
public AssociatedUsersFilteredByMe Where(Func<IAssociatedUsersUserPage, FilterMe> f)
{
- return new AssociatedUsersFilteredByMe(this.Url);
+ this.Url.QueryUrl = UrlConstants.AssociatedMeUrl;
+ return new AssociatedUsersFilteredByMe() { Url = this.Url };
}
public FilteredByPage<AccessToken> Where(Func<IAssociatedUsersUserPage, FilterPage> f)
View
11 ExchangeLINQ/AssociatedUsers/AssociatedUsersFilteredByMe.cs
@@ -8,17 +8,6 @@ namespace ExchangeLINQ.AssociatedUsers
{
public class AssociatedUsersFilteredByMe : ProcessorState<NetworkUser>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AssociatedUsersFilteredByUserId"/> class.
- /// </summary>
- /// <param name="oauth">The oauth.</param>
- /// <param name="ids">The ids.</param>
- internal AssociatedUsersFilteredByMe(ExchangeUrl url)
- {
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.AssociatedMeUrl;
- }
-
public FilteredByPage<AccessToken> Where(Func<IPage, FilterPage> f)
{
FilterPage filter = f(new InterfacesImpl());
View
11 ExchangeLINQ/AssociatedUsers/AssociatedUsersFilteredByUserId.cs
@@ -8,17 +8,6 @@ namespace ExchangeLINQ.AssociatedUsers
{
public class AssociatedUsersFilteredByUserId : ProcessorState<NetworkUser>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="AssociatedUsersFilteredByUserId"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="ids">The ids.</param>
- internal AssociatedUsersFilteredByUserId(ExchangeUrl url, FilterUserIds ids)
- {
- this.Url = url;
- this.Url.QueryUrl = string.Format(UrlConstants.AssociatedUsersByIdUrl, ids.Value);
- }
-
public FilteredByPage<AccessToken> Where(Func<IPage, FilterPage> f)
{
FilterPage filter = f(new InterfacesImpl());
View
10 ExchangeLINQ/Badges/BadgesEntry.cs
@@ -8,16 +8,6 @@ namespace ExchangeLINQ.Badges
{
public class BadgesEntry : ProcessorState<Badge>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="BadgesEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal BadgesEntry(ExchangeUrl url)
- {
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.BadgesUrl;
- }
-
public BadgesFilteredById Where(Func<IBadgesNameIdsNonTagBasedRecentlyAwardedTagBasedPageFromDateFilter, FilterIds> f)
{
return new BadgesFilteredById(this.Url, f(new BadgesInterfacesImpl()));
View
12 ExchangeLINQ/Comments/CommentsEntry.cs
@@ -10,18 +10,6 @@ namespace ExchangeLINQ.Comments
{
public class CommentsEntry : ProcessorState<Comment>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="CommentsEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal CommentsEntry(ExchangeUrl url)
- {
- Contract.Requires(url != null);
-
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.CommentsUrl;
- }
-
#region Where
public CommentsFilteredById Where(Func<ICommentsIdPostIdQuestionIdAnswerIdUserIdMePageFromDateFilter, FilterIds> f)
View
54 ExchangeLINQ/Context/StackExchangeContextImpl.cs
@@ -11,6 +11,7 @@
using ExchangeLINQ.AssociatedUsers;
using ExchangeLINQ.Inbox;
using ExchangeLINQ.Applications;
+using ExchangeLINQ.Errors;
namespace ExchangeLINQ.Context
{
@@ -44,7 +45,7 @@ internal StackExchangeContextImpl(string key, string accessToken)
/// </summary>
public AccessTokensEntry AccessTokens()
{
- return new AccessTokensEntry(this.CreateUrl());
+ return new AccessTokensEntry() { Url = this.CreateUrl() };
}
/// <summary>
@@ -52,7 +53,18 @@ public AccessTokensEntry AccessTokens()
/// </summary>
public ApplicationsEntry Applications()
{
- return new ApplicationsEntry(this.CreateUrl());
+ return new ApplicationsEntry() { Url = this.CreateUrl() };
+ }
+
+ /// <summary>
+ /// Errorses this instance.
+ /// </summary>
+ /// <returns></returns>
+ public ErrorsEntry Errors()
+ {
+ ExchangeUrl url = this.CreateUrl();
+ url.QueryUrl = UrlConstants.ErrorsUrl;
+ return new ErrorsEntry() { Url = url };
}
/// <summary>
@@ -60,7 +72,9 @@ public ApplicationsEntry Applications()
/// </summary>
public InboxEntry Inbox()
{
- return new InboxEntry(this.CreateUrl());
+ ExchangeUrl url = this.CreateUrl();
+ url.QueryUrl = UrlConstants.InboxUrl;
+ return new InboxEntry() { Url = url };
}
/// <summary>
@@ -68,7 +82,9 @@ public InboxEntry Inbox()
/// </summary>
public AssociatedUsersEntry AssociatedUsers()
{
- return new AssociatedUsersEntry(this.CreateUrl());
+ ExchangeUrl url = this.CreateUrl();
+ url.QueryUrl = UrlConstants.AssociatedMeUrl;
+ return new AssociatedUsersEntry() { Url = url };
}
/// <summary>
@@ -76,7 +92,9 @@ public AssociatedUsersEntry AssociatedUsers()
/// </summary>
public SitesEntry Sites()
{
- return new SitesEntry(this.CreateUrl());
+ ExchangeUrl url = this.CreateUrl();
+ url.QueryUrl = UrlConstants.SitesUrl;
+ return new SitesEntry() { Url = url };
}
#endregion
@@ -85,37 +103,49 @@ public SitesEntry Sites()
public AnswersEntry Answers(string apiSiteParameter)
{
- return new AnswersEntry(this.CreateUrl(apiSiteParameter));
+ ExchangeUrl url = this.CreateUrl(apiSiteParameter);
+ url.QueryUrl = UrlConstants.AnswersUrl;
+ return new AnswersEntry() { Url = url };
}
public BadgesEntry Badges(string apiSiteParameter)
{
- return new BadgesEntry(this.CreateUrl(apiSiteParameter));
+ ExchangeUrl url = this.CreateUrl(apiSiteParameter);
+ url.QueryUrl = UrlConstants.BadgesUrl;
+ return new BadgesEntry() { Url = this.CreateUrl(apiSiteParameter) };
}
public CommentsEntry Comments(string apiSiteParameter)
{
- return new CommentsEntry(this.CreateUrl(apiSiteParameter));
+ ExchangeUrl url = this.CreateUrl(apiSiteParameter);
+ url.QueryUrl = UrlConstants.CommentsUrl;
+ return new CommentsEntry() { Url = this.CreateUrl(apiSiteParameter) };
}
public QuestionsEntry Questions(string apiSiteParameter)
{
- return new QuestionsEntry(this.CreateUrl(apiSiteParameter));
+ ExchangeUrl url = this.CreateUrl(apiSiteParameter);
+ url.QueryUrl = UrlConstants.QuestionsUrl;
+ return new QuestionsEntry() { Url = url };
}
public SearchEntry Search(string apiSiteParameter)
{
- return new SearchEntry(this.CreateUrl(apiSiteParameter));
+ ExchangeUrl url = this.CreateUrl(apiSiteParameter);
+ url.QueryUrl = UrlConstants.SearchUrl;
+ return new SearchEntry() { Url = url };
}
public TagsEntry Tags(string apiSiteParameter)
{
- return new TagsEntry(this.CreateUrl(apiSiteParameter));
+ ExchangeUrl url = this.CreateUrl(apiSiteParameter);
+ url.QueryUrl = UrlConstants.TagsUrl;
+ return new TagsEntry() { Url = url };
}
public UsersEntry Users(string apiSiteParameter)
{
- return new UsersEntry(this.CreateUrl(apiSiteParameter));
+ return new UsersEntry() { Url = this.CreateUrl(apiSiteParameter) };
}
#endregion
View
12 ExchangeLINQ/Errors/ErrorsEntry.cs
@@ -9,18 +9,6 @@ namespace ExchangeLINQ.Errors
{
public class ErrorsEntry : ProcessorState<Error>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="ErrorsEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal ErrorsEntry(ExchangeUrl url)
- {
- Contract.Requires(url != null);
-
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.ErrorsUrl;
- }
-
public ErrorsFilteredById Where(Func<IdProp<FilterId>, FilterId> f)
{
return new ErrorsFilteredById(this.Url, f(new IdProp<FilterId>()));
View
4 ExchangeLINQ/ExchangeLINQ.NET4.csproj
@@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExchangeLINQ</RootNamespace>
- <AssemblyName>ExchangeLINQ.NET4</AssemblyName>
+ <AssemblyName>ExchangeLINQ</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<CodeContractsAssemblyMode>1</CodeContractsAssemblyMode>
@@ -64,7 +64,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <DocumentationFile>..\bin\Release\ExchangeLINQ.NET4.XML</DocumentationFile>
+ <DocumentationFile>..\bin\Release\ExchangeLINQ.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>ExtendedCorrectnessRules.ruleset</CodeAnalysisRuleSet>
<CodeContractsEnableRuntimeChecking>False</CodeContractsEnableRuntimeChecking>
View
12 ExchangeLINQ/Inbox/InboxEntry.cs
@@ -9,18 +9,6 @@ namespace ExchangeLINQ.Inbox
{
public class InboxEntry : ProcessorState<InboxItem>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="InboxEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal InboxEntry(ExchangeUrl url)
- {
- Contract.Requires(url != null);
-
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.InboxUrl;
- }
-
public InboxFilteredByUnread Where(Func<IInboxUnreadPageFilter, FilterUnread> f)
{
return new InboxFilteredByUnread(this.Url);
View
12 ExchangeLINQ/Questions/QuestionsEntry.cs
@@ -9,18 +9,6 @@ namespace ExchangeLINQ.Questions
{
public class QuestionsEntry : ProcessorState<Question>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="QuestionsEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal QuestionsEntry(ExchangeUrl url)
- {
- Contract.Requires(url != null);
-
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.QuestionsUrl;
- }
-
#region Questions
public QuestionsFilteredById Where(Func<IQuestionIdTagsLinksToIsRelatedToPostingUserIsFeaturedIsUnansweredHasNoAnswersPageFromDateFilter, FilterIds> f)
View
12 ExchangeLINQ/Search/SearchEntry.cs
@@ -7,18 +7,6 @@ namespace ExchangeLINQ.Search
{
public class SearchEntry : State
{
- /// <summary>
- /// Initializes a new instance of the <see cref="SearchEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal SearchEntry(ExchangeUrl url)
- {
- Contract.Requires(url != null);
-
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.SearchUrl;
- }
-
#region Questions
public SearchFilteredByTagged Where(Func<ISearchTaggedInTitle, FilterTags> f)
View
10 ExchangeLINQ/Sites/SitesEntry.cs
@@ -8,16 +8,6 @@ namespace ExchangeLINQ.Sites
{
public class SitesEntry : ProcessorState<Site>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="SitesEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal SitesEntry(ExchangeUrl url)
- {
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.SitesUrl;
- }
-
#region Complex
public FilteredByPage<Site> Where(Func<IPageFilter, FilterPage> f)
View
6 ExchangeLINQ/Tags/TagsEntry.cs
@@ -11,12 +11,6 @@ namespace ExchangeLINQ.Tags
{
public class TagsEntry : ProcessorState<Tag>
{
- internal TagsEntry(ExchangeUrl url)
- {
- this.Url = url;
- this.Url.QueryUrl = UrlConstants.TagsUrl;
- }
-
public TagsFilteredByModeratorOnly Where(Func<ITagsModeratorOnlyRequiredNamesUserPageFromDateFilter, FilterModeratorOnly> f)
{
return new TagsFilteredByModeratorOnly(this.Url, f(new TagsInterfacesImpl()));
View
9 ExchangeLINQ/Users/UsersEntry.cs
@@ -9,15 +9,6 @@ namespace ExchangeLINQ.Users
{
public class UsersEntry : ProcessorState<User>
{
- /// <summary>
- /// Initializes a new instance of the <see cref="UsersEntry"/> class.
- /// </summary>
- /// <param name="url">The URL.</param>
- internal UsersEntry(ExchangeUrl url)
- {
- this.Url = url;
- }
-
public UsersFilteredByName Where(Func<IUsersNameIdMeIsModeratorPageFromDateFilter, FilterName> f)
{
return new UsersFilteredByName(this.Url, f(new UsersInterfacesImpl()));
Please sign in to comment.
Something went wrong with that request. Please try again.