Share via


VolumeNameGenerator.Generate<T> Method

Definition

Generates a volume name with the form {applicationName}-{sha256 of apphost path}-{resourceName}-{suffix}, e.g. myapplication-a345f2451-postgres-data.

public static string Generate<T>(Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string suffix) where T : Aspire.Hosting.ApplicationModel.IResource;
static member Generate : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> * string -> string (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
Public Shared Function Generate(Of T As IResource) (builder As IResourceBuilder(Of T), suffix As String) As String

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

suffix
String

The suffix to append to the volume name.

Returns

The volume name.

Exceptions

Applies to