# StaticValueProvider<T>

- Kind: `class`
- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.Hosting.Foundry`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/AzureHostedAgentResource.cs)
- Implements: `IManifestExpressionProvider`, `IValueProvider`

A static value provider that returns a fixed value once it's been set.

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

public class StaticValueProvider<T>
    : Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IValueProvider
{
    // ...
}
```

## Constructors

- [StaticValueProvider](/reference/api/csharp/aspire.hosting.foundry/staticvalueprovider-1/constructors.md#constructor) -- Creates a new instance of the `Foundry.StaticValueProvider`1` class.
- [StaticValueProvider(T)](/reference/api/csharp/aspire.hosting.foundry/staticvalueprovider-1/constructors.md#constructor-t) -- Creates a new instance of the `Foundry.StaticValueProvider`1` class.

## Properties

- [ValueExpression](/reference/api/csharp/aspire.hosting.foundry/staticvalueprovider-1/properties.md#valueexpression) : `string` `get`

## Methods

- [GetValueAsync(CancellationToken)](/reference/api/csharp/aspire.hosting.foundry/staticvalueprovider-1/methods.md#getvalueasync-cancellationtoken) : `ValueTask<string?>`
- [Set(T)](/reference/api/csharp/aspire.hosting.foundry/staticvalueprovider-1/methods.md#set-t) -- Sets the value of the provider.
