/// <summary>
 /// Creates a new person children state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonChildrenState"/> instance containing the REST API response.
 /// </returns>
 protected override PersonChildrenState NewPersonChildrenState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new FamilyTreePersonChildrenState(request, response, client, accessToken, this);
 }
Exemple #2
0
 /// <summary>
 /// Clones the current state instance.
 /// </summary>
 /// <param name="request">The REST API request used to create this state instance.</param>
 /// <param name="response">The REST API response used to create this state instance.</param>
 /// <param name="client">The REST API client used to create this state instance.</param>
 /// <returns>A cloned instance of the current state instance.</returns>
 protected override GedcomxApplicationState Clone(IRestRequest request, IRestResponse response, IFilterableRestClient client)
 {
     return(new FamilySearchPlaces(request, response, client, this.CurrentAccessToken, (FamilySearchStateFactory)this.stateFactory));
 }
 /// <summary>
 /// Clones the current state instance.
 /// </summary>
 /// <param name="request">The REST API request used to create this state instance.</param>
 /// <param name="response">The REST API response used to create this state instance.</param>
 /// <param name="client">The REST API client used to create this state instance.</param>
 /// <returns>A cloned instance of the current state instance.</returns>
 protected override GedcomxApplicationState Clone(IRestRequest request, IRestResponse response, IFilterableRestClient client)
 {
     return new FamilySearchMemories(request, response, this.Client, this.CurrentAccessToken, (FamilySearchStateFactory)this.stateFactory);
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilyTreePersonState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 private FamilyTreePersonState(IRestRequest request, IFilterableRestClient client, FamilyTreeStateFactory stateFactory)
     : this(request, client.Handle(request), client, null, stateFactory)
 {
 }
 /// <summary>
 /// Clones the current state instance.
 /// </summary>
 /// <param name="request">The REST API request used to create this state instance.</param>
 /// <param name="response">The REST API response used to create this state instance.</param>
 /// <param name="client">The REST API client used to create this state instance.</param>
 /// <returns>A cloned instance of the current state instance.</returns>
 protected override GedcomxApplicationState Clone(IRestRequest request, IRestResponse response, IFilterableRestClient client)
 {
     return new PersonNonMatchesState(request, response, client, this.CurrentAccessToken, this.stateFactory);
 }
Exemple #6
0
 /// <summary>
 /// Creates a new person children state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonChildrenState"/> instance containing the REST API response.
 /// </returns>
 protected override PersonChildrenState NewPersonChildrenState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new FamilyTreePersonChildrenState(request, response, client, accessToken, this));
 }
Exemple #7
0
 /// <summary>
 /// Creates a new relationships state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="RelationshipsState"/> instance containing the REST API response.
 /// </returns>
 protected override RelationshipsState NewRelationshipsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new FamilyTreeRelationshipsState(request, response, client, accessToken, this));
 }
 /// <summary>
 /// Creates a new person state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonState"/> instance containing the REST API response.
 /// </returns>
 internal virtual PersonState NewPersonStateInt(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return this.NewPersonState(request, response, client, accessToken);
 }
 /// <summary>
 /// Creates a new place description state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PlaceDescriptionState"/> instance containing the REST API response.
 /// </returns>
 protected override PlaceDescriptionState NewPlaceDescriptionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new FamilySearchPlaceDescriptionState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Creates a new FamilySearch places state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="FamilySearchPlaces"/> instance containing the REST API response.
 /// </returns>
 protected internal FamilySearchPlaces NewPlacesState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new FamilySearchPlaces(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Creates a new person state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonState"/> instance containing the REST API response.
 /// </returns>
 protected override PersonState NewPersonState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return base.NewPersonState(request, response, client, accessToken);
 }
 /// <summary>
 /// Returns a new FamilySearch places state by invoking the specified URI using the specified client.
 /// </summary>
 /// <param name="discoveryUri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <returns>
 /// A <see cref="FamilySearchPlaces"/> instance containing the REST API response.
 /// </returns>
 public FamilySearchPlaces NewPlacesState(Uri discoveryUri, IFilterableRestClient client)
 {
     return NewPlacesState(discoveryUri, client, Method.GET);
 }
 /// <summary>
 /// Creates a new relationships state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="RelationshipsState"/> instance containing the REST API response.
 /// </returns>
 protected override RelationshipsState NewRelationshipsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new FamilyTreeRelationshipsState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Creates a new source descriptions state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="SourceDescriptionsState"/> instance containing the REST API response.
 /// </returns>
 internal virtual SourceDescriptionsState NewSourceDescriptionsStateInt(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return this.NewSourceDescriptionsState(request, response, client, accessToken);
 }
 /// <summary>
 /// Returns a new person state by invoking the specified URI using the specified client.
 /// </summary>
 /// <param name="discoveryUri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <returns>
 /// A <see cref="PersonState"/> instance containing the REST API response.
 /// </returns>
 public PersonState NewPersonState(Uri discoveryUri, IFilterableRestClient client)
 {
     return NewPersonState(discoveryUri, client, Method.GET);
 }
 /// <summary>
 /// Creates a new user state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="UserState"/> instance containing the REST API response.
 /// </returns>
 protected internal UserState NewUserState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new UserState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchCollectionState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected internal FamilySearchCollectionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilySearchStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilyTreePersonParentsState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected internal FamilyTreePersonParentsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilyTreeStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
Exemple #19
0
 /// <summary>
 /// Creates a new source descriptions state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="SourceDescriptionsState"/> instance containing the REST API response.
 /// </returns>
 internal virtual SourceDescriptionsState NewSourceDescriptionsStateInt(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(this.NewSourceDescriptionsState(request, response, client, accessToken));
 }
 /// <summary>
 /// Clones the current state instance.
 /// </summary>
 /// <param name="request">The REST API request used to create this state instance.</param>
 /// <param name="response">The REST API response used to create this state instance.</param>
 /// <param name="client">The REST API client used to create this state instance.</param>
 /// <returns>A cloned instance of the current state instance.</returns>
 protected override GedcomxApplicationState Clone(IRestRequest request, IRestResponse response, IFilterableRestClient client)
 {
     return new FamilyTreePersonParentsState(request, response, client, this.CurrentAccessToken, (FamilyTreeStateFactory)this.stateFactory);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GedcomxApplicationState{T}"/> class.
 /// </summary>
 protected GedcomxApplicationState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, StateFactory stateFactory)
 {
     linkFactory             = new Tavis.LinkFactory();
     linkHeaderParser        = new Tavis.LinkHeaderParser(linkFactory);
     this.Request            = request;
     this.Response           = response;
     this.Client             = client;
     this.CurrentAccessToken = accessToken;
     this.stateFactory       = stateFactory;
 }
Exemple #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RecordState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 public RecordState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, StateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DiscussionState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 public DiscussionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilySearchStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilyTreePersonState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 private FamilyTreePersonState(IRestRequest request, IFilterableRestClient client, FamilyTreeStateFactory stateFactory)
     : this(request, client.Handle(request), client, null, stateFactory)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonSpousesState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 internal PersonSpousesState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, StateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
Exemple #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlaceDescriptionsState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 internal PlaceDescriptionsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, StateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
Exemple #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchPlaces"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 private FamilySearchPlaces(IRestRequest request, IFilterableRestClient client, FamilySearchStateFactory stateFactory)
     : this(request, client.Handle(request), client, null, stateFactory)
 {
 }
 /// <summary>
 /// Returns a new FamilySearch places state by invoking the specified URI using the specified client.
 /// </summary>
 /// <param name="discoveryUri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <returns>
 /// A <see cref="FamilySearchPlaces"/> instance containing the REST API response.
 /// </returns>
 public FamilySearchPlaces NewPlacesState(Uri discoveryUri, IFilterableRestClient client)
 {
     return(NewPlacesState(discoveryUri, client, Method.GET));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchMemories"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 private FamilySearchMemories(IRestRequest request, IFilterableRestClient client, FamilySearchStateFactory stateFactory)
     : this(request, client.Handle(request), client, null, stateFactory)
 {
 }
        /// <summary>
        /// Returns a new FamilySearch places state by invoking the specified URI using the specified client and forcing the specific HTTP verb.
        /// </summary>
        /// <param name="discoveryUri">The URI where the target resides.</param>
        /// <param name="client">The REST API client to use for API calls.</param>
        /// <param name="method">The HTTP verb to use for invoking the discovery URI.</param>
        /// <returns>
        /// A <see cref="FamilySearchPlaces"/> instance containing the REST API response.
        /// </returns>
        public FamilySearchPlaces NewPlacesState(Uri discoveryUri, IFilterableRestClient client, Method method)
        {
            IRestRequest request = new RestRequest().Accept(MediaTypes.GEDCOMX_JSON_MEDIA_TYPE).Build(discoveryUri, method);

            return(NewPlacesState(request, client.Handle(request), client, null));
        }
 /// <summary>
 /// Creates a new source description state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="SourceDescriptionState"/> instance containing the REST API response.
 /// </returns>
 protected internal virtual SourceDescriptionState NewSourceDescriptionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new SourceDescriptionState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Creates a new person state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonState"/> instance containing the REST API response.
 /// </returns>
 protected override PersonState NewPersonState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(base.NewPersonState(request, response, client, accessToken));
 }
 /// <summary>
 /// Returns a new person state by invoking the specified URI using the specified client and forcing the specific HTTP verb.
 /// </summary>
 /// <param name="discoveryUri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="method">The HTTP verb to use for invoking the discovery URI.</param>
 /// <returns>
 /// A <see cref="PersonState"/> instance containing the REST API response.
 /// </returns>
 public PersonState NewPersonState(Uri discoveryUri, IFilterableRestClient client, Method method)
 {
     IRestRequest request = new RedirectableRestRequest().Accept(MediaTypes.GEDCOMX_JSON_MEDIA_TYPE).Build(discoveryUri, method);
     return NewPersonState(request, client.Handle(request), client, null);
 }
 /// <summary>
 /// Creates a new FamilySearch place state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="FamilySearchPlaceState"/> instance containing the REST API response.
 /// </returns>
 protected internal FamilySearchPlaceState NewPlaceState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new FamilySearchPlaceState(request, response, client, accessToken, this));
 }
Exemple #35
0
 /// <summary>
 /// Creates a new collection state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="CollectionState"/> instance containing the REST API response.
 /// </returns>
 protected override CollectionState NewCollectionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new FamilySearchFamilyTree(request, response, client, accessToken, this));
 }
 /// <summary>
 /// Creates a new place description state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PlaceDescriptionState"/> instance containing the REST API response.
 /// </returns>
 protected override PlaceDescriptionState NewPlaceDescriptionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new FamilySearchPlaceDescriptionState(request, response, client, accessToken, this));
 }
Exemple #37
0
 /// <summary>
 /// Creates a new change history state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="ChangeHistoryState"/> instance containing the REST API response.
 /// </returns>
 protected internal ChangeHistoryState NewChangeHistoryState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new ChangeHistoryState(request, response, client, accessToken, this));
 }
 /// <summary>
 /// Creates a new discussion state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="DiscussionState"/> instance containing the REST API response.
 /// </returns>
 protected internal DiscussionState NewDiscussionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new DiscussionState(request, response, client, accessToken, this));
 }
Exemple #39
0
 /// <summary>
 /// Creates a new child and parents relationship state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="ChildAndParentsRelationshipState"/> instance containing the REST API response.
 /// </returns>
 protected internal ChildAndParentsRelationshipState NewChildAndParentsRelationshipState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new ChildAndParentsRelationshipState(request, response, client, accessToken, this));
 }
 /// <summary>
 /// Creates a new person match results state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonMatchResultsState"/> instance containing the REST API response.
 /// </returns>
 protected internal PersonMatchResultsState NewPersonMatchResultsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(new PersonMatchResultsState(request, response, client, accessToken, this));
 }
Exemple #41
0
 /// <summary>
 /// Creates a new relationships state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="RelationshipsState"/> instance containing the REST API response.
 /// </returns>
 internal virtual RelationshipsState NewRelationshipsStateInt(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return(this.NewRelationshipsState(request, response, client, accessToken));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchFamilyTree"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 internal FamilySearchFamilyTree(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilyTreeStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Clones the current state instance.
 /// </summary>
 /// <param name="request">The REST API request used to create this state instance.</param>
 /// <param name="response">The REST API response used to create this state instance.</param>
 /// <param name="client">The REST API client used to create this state instance.</param>
 /// <returns>A cloned instance of the current state instance.</returns>
 protected abstract GedcomxApplicationState Clone(IRestRequest request, IRestResponse response, IFilterableRestClient client);
Exemple #44
0
 /**
  *
  *
  * @param client t
  * @return a
  */
 /// <summary>
 /// Sets the <see cref="IFilterableRestClient"/> to use to get paged feed documents.
 /// </summary>
 /// <param name="client">The <see cref="IFilterableRestClient"/> to use to get paged feed documents.</param>
 /// <returns>A reference to this <see cref="PagedFeedEnumerator"/> for fluent configuration chaining.</returns>
 public PagedFeedEnumerator WithClient(IFilterableRestClient client)
 {
     Client = client;
     return(this);
 }
Exemple #45
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilyTreePersonState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected internal FamilyTreePersonState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilyTreeStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
Exemple #46
0
 /// <summary>
 /// Provide the WebResourceProviderImpl to use for fetching a paged feed document.
 /// </summary>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="uri">The specified URI for the first, last, previous, and/or next paged feed document.</param>
 /// <returns>
 /// A <see cref="WebResourceProviderImpl" /> for acquiring the desired paged feed document.
 /// </returns>
 public IRestRequest Provide(IFilterableRestClient client, String uri)
 {
     client.BaseUrl = new Uri(uri).GetBaseUrl();
     return(new RestRequest(uri));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonNonMatchesState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected internal PersonNonMatchesState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, StateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Returns a new record state by invoking the specified URI using the specified client.
 /// </summary>
 /// <param name="discoveryUri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <returns>
 /// A <see cref="RecordState"/> instance containing the REST API response.
 /// </returns>
 public RecordState NewRecordState(Uri discoveryUri, IFilterableRestClient client)
 {
     return NewRecordState(discoveryUri, client, Method.GET);
 }
Exemple #49
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationshipsState"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected internal RelationshipsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, StateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Creates a new place search results state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PlaceSearchResultsState"/> instance containing the REST API response.
 /// </returns>
 protected internal virtual PlaceSearchResultsState NewPlaceSearchResultsState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new PlaceSearchResultsState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Clones the current state instance.
 /// </summary>
 /// <param name="request">The REST API request used to create this state instance.</param>
 /// <param name="response">The REST API response used to create this state instance.</param>
 /// <param name="client">The REST API client used to create this state instance.</param>
 /// <returns>A cloned instance of the current state instance.</returns>
 protected override GedcomxApplicationState Clone(IRestRequest request, IRestResponse response, IFilterableRestClient client)
 {
     return(new PersonSpousesState(request, response, client, this.CurrentAccessToken, this.stateFactory));
 }
 /// <summary>
 /// Creates a new place group state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PlaceGroupState"/> instance containing the REST API response.
 /// </returns>
 public PlaceGroupState NewPlaceGroupState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new PlaceGroupState(request, response, client, accessToken, this);
 }
Exemple #53
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchPlaces"/> class.
 /// </summary>
 /// <param name="uri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 private FamilySearchPlaces(Uri uri, IFilterableRestClient client, FamilySearchStateFactory stateFactory)
     : this(new RedirectableRestRequest().Accept(MediaTypes.GEDCOMX_JSON_MEDIA_TYPE).Build(uri, Method.GET), client, stateFactory)
 {
 }
 /// <summary>
 /// Creates a new vocab element list state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="VocabElementListState"/> instance containing the REST API response.
 /// </returns>
 public VocabElementListState NewVocabElementListState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new VocabElementListState(request, response, client, accessToken, this);
 }
Exemple #55
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchPlaces"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected internal FamilySearchPlaces(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilySearchStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Creates a new person spouses state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="PersonSpousesState"/> instance containing the REST API response.
 /// </returns>
 protected internal virtual PersonSpousesState NewPersonSpousesState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new PersonSpousesState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchMemories"/> class.
 /// </summary>
 /// <param name="uri">The URI where the target resides.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 private FamilySearchMemories(Uri uri, IFilterableRestClient client, FamilySearchStateFactory stateFactory)
     : this(new RedirectableRestRequest().Accept(MediaTypes.GEDCOMX_JSON_MEDIA_TYPE).Build(uri, Method.GET), client, stateFactory)
 {
 }
 /// <summary>
 /// Creates a new relationship state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="RelationshipState"/> instance containing the REST API response.
 /// </returns>
 protected internal virtual RelationshipState NewRelationshipState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new RelationshipState(request, response, client, accessToken, this);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FamilySearchMemories"/> class.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <param name="stateFactory">The state factory to use for state instantiation.</param>
 protected FamilySearchMemories(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken, FamilySearchStateFactory stateFactory)
     : base(request, response, client, accessToken, stateFactory)
 {
 }
 /// <summary>
 /// Creates a new collection state from the specified parameters. Since a response is provided as a parameter, a REST API request will not be invoked.
 /// </summary>
 /// <param name="request">The REST API request that will be used to instantiate this state instance.</param>
 /// <param name="response">The REST API response that was produced from the REST API request.</param>
 /// <param name="client">The REST API client to use for API calls.</param>
 /// <param name="accessToken">The access token to use for subsequent invocations of the REST API client.</param>
 /// <returns>
 /// A <see cref="CollectionState"/> instance containing the REST API response.
 /// </returns>
 protected override CollectionState NewCollectionState(IRestRequest request, IRestResponse response, IFilterableRestClient client, String accessToken)
 {
     return new FamilySearchFamilyTree(request, response, client, accessToken, this);
 }