/// <summary> /// Instantiates the model. /// </summary> /// <param name="manager">The class that manages the Contentful configuration for the application.</param> /// <param name="client">The client used to communicate with the Contentful API.</param> public SettingsModel(IContentfulOptionsManager manager, IContentfulClient client) { Options = manager.Options; _client = client; _manager = manager; AppOptions = new SelectedOptions { SpaceId = Options.SpaceId, UsePreviewApi = Options.UsePreviewApi, AccessToken = Options.DeliveryApiKey, PreviewToken = Options.PreviewApiKey }; }
/// <summary> /// Instantiate the view component. /// </summary> /// <param name="httpClient">The httpclient to use for a separate call to the Contentful API.</param> /// <param name="optionsManager">The class that manages the Contentful configuration for the application.</param> public EntryStateViewComponent(HttpClient httpClient, IContentfulOptionsManager optionsManager) { _httpClient = httpClient; _options = optionsManager.Options; }
/// <summary> /// Instantiates the view component. /// </summary> /// <param name="optionsManager">The class that manages the Contentful configuration for the application.</param> public EditorialFeaturesViewComponent(IContentfulOptionsManager optionsManager) { _options = optionsManager.Options; }
/// <summary> /// Initializes a new <see cref="Deeplinker"/>. /// </summary> /// <param name="next">The next request delegate in the chain of middleware.</param> /// <param name="manager">The <see cref="IContentfulOptionsManager"/> used to read the current options.</param> public Deeplinker(RequestDelegate next, IContentfulOptionsManager manager) { _next = next; _manager = manager; }