# Configuration provider

### Overview

[**Configuration provider**](https://github.com/vostok/configuration.abstractions/blob/master/Vostok.Configuration.Abstractions/IConfigurationProvider.cs) is responsible for the [binding process](/configuration/concepts-and-basics/binding-nodes-to-models.md) and offers methods to obtain final settings models. It's also responsible for [caching](/configuration/concepts-and-basics/caching-and-performance.md) and [error handling](/configuration/concepts-and-basics/error-handling.md). Providers are used directly by the application code to either [obtain settings on demand](/configuration/basic-scenarios/obtain-settings-from-provider.md) or [subscribe to updates](/configuration/basic-scenarios/observe-settings-via-provider.md).&#x20;

### Methods

#### Get method

Fetches the newest version of settings of given type:

```
var settings = provider.Get<MySettings>();
```

#### Observe method

Allows to subscribe for updates of settings of given type:

```
provider.Observe<MySettings>.Subscribe(newSettings => {});
```

#### Overloads

Both **Get** and **Observe** methods have 2 variations:

* The one without any parameters requires a prior [assignment](/configuration/basic-scenarios/assign-sources-to-types.md) of a source to the requested type;
* The one with a [source](/configuration/concepts-and-basics/configuration-sources.md) parameter requires no such assignment (check out [caching](/configuration/concepts-and-basics/caching-and-performance.md) for gotchas);

### Related pages

{% content-ref url="/pages/-M6UVVWxjimC0yLfXc\_P" %}
[Obtain settings from provider](/configuration/basic-scenarios/obtain-settings-from-provider.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UVXzWRFlbId1t7QdO" %}
[Observe settings via provider](/configuration/basic-scenarios/observe-settings-via-provider.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UQlGKGPuVt1P3lsHf" %}
[Binding nodes to models](/configuration/concepts-and-basics/binding-nodes-to-models.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UQMklC2EtQ\_nAUDjI" %}
[Configuration sources](/configuration/concepts-and-basics/configuration-sources.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UVN1ntnmh0ltnCI5I" %}
[Assign sources to types](/configuration/basic-scenarios/assign-sources-to-types.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6URAB0ITAnAJKMQJ6y" %}
[Caching and performance](/configuration/concepts-and-basics/caching-and-performance.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UR6uAo\_v35e9-OcDC" %}
[Error handling](/configuration/concepts-and-basics/error-handling.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vostok.gitbook.io/configuration/concepts-and-basics/configuration-provider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
