/// <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="client">The REST API client to use for API calls.</param> /// <param name="stateFactory">The state factory to use for state instantiation.</param> private FamilySearchFamilyTree(IRestRequest request, IFilterableRestClient client, FamilyTreeStateFactory stateFactory) : this(request, client.Handle(request), client, null, stateFactory) { }
/// <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> /// Initializes a new instance of the <see cref="CollectionState"/> class. /// </summary> /// <param name="request">The REST API request that will be used to instantiate this CollectionState.</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 CollectionState(IRestRequest request, IFilterableRestClient client, StateFactory stateFactory) : this(request, client.Handle(request), client, null, stateFactory) { }
/// <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> /// 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> /// 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> /// Returns a new collection 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="CollectionState"/> instance containing the REST API response. /// </returns> public CollectionState NewCollectionState(Uri discoveryUri, IFilterableRestClient client, Method method) { IRestRequest request = new RedirectableRestRequest().Accept(MediaTypes.GEDCOMX_JSON_MEDIA_TYPE).Build(discoveryUri, method); return(NewCollectionState(request, client.Handle(request), client, null)); }