# GenerateParameterDefault Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [GenerateParameterDefault](/reference/api/csharp/aspire.hosting/generateparameterdefault.md)
- Kind: `Methods`
- Members: `2`

Represents that a default value should be generated.

## GetDefaultValue

- Name: `GetDefaultValue`
- Modifiers: `override`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ParameterDefault.cs#L164)

Generates a value for the parameter.

```csharp
public sealed class GenerateParameterDefault
{
    public override string GetDefaultValue()
    {
        // ...
    }
}
```

## Returns

`string` -- The generated string value.

## WriteToManifest(ManifestPublishingContext)

- Name: `WriteToManifest(ManifestPublishingContext)`
- Modifiers: `override`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ParameterDefault.cs#L130-L160)

Writes the current [ParameterDefault](/reference/api/csharp/aspire.hosting/parameterdefault.md) to the manifest context.

```csharp
public sealed class GenerateParameterDefault
{
    public override void WriteToManifest(
        ManifestPublishingContext context)
    {
        // ...
    }
}
```

## Parameters

- `context` ([ManifestPublishingContext](/reference/api/csharp/aspire.hosting/manifestpublishingcontext.md))
  The context for the manifest publishing operation.
