Diagrid.Aspire.Hosting.Catalyst
1.0.0
dotnet add package Diagrid.Aspire.Hosting.Catalyst --version 1.0.0
NuGet\Install-Package Diagrid.Aspire.Hosting.Catalyst -Version 1.0.0
<PackageReference Include="Diagrid.Aspire.Hosting.Catalyst" Version="1.0.0" />
<PackageVersion Include="Diagrid.Aspire.Hosting.Catalyst" Version="1.0.0" />
<PackageReference Include="Diagrid.Aspire.Hosting.Catalyst" />
paket add Diagrid.Aspire.Hosting.Catalyst --version 1.0.0
#r "nuget: Diagrid.Aspire.Hosting.Catalyst, 1.0.0"
#:package Diagrid.Aspire.Hosting.Catalyst@1.0.0
#addin nuget:?package=Diagrid.Aspire.Hosting.Catalyst&version=1.0.0
#tool nuget:?package=Diagrid.Aspire.Hosting.Catalyst&version=1.0.0
Diagrid Catalyst Aspire Integration
This integration allows you to seamlessly connect your locally running Aspire projects to live Diagrid Catalyst infrastructure.
Getting Started
1 - Get a Catalyst Account
Sign up for a Diagrid Catalyst account.
2 - Install the Diagrid CLI
This project requires that you have the Diagrid CLI installed.
After installing the CLI, please be sure to log in to your Diagrid account by running:
diagrid login
3 - Add the integration to your AppHost project
You can find the package on NuGet.
Add the package by running:
dotnet add package Diagrid.Aspire.Hosting.Catalyst
4 - Configure your AppHost
At a minimum, you must always add the following to your project to enable the integration:
builder.AddCatalystProject("your-desired-project-name");
This will ensure that a Catalyst project exists or that you are connected to an existing one.
After that, you can start defining your Catalyst appids by annotating your project resources and containers:
builder
.AddProject<MyProject>("my-project")
.WithCatalyst();
Each resource that you tag in this way will automatically have an application entry created in the Catalyst UI.
5 - Configuring Managed Services and Components
Outside your Catalyst project and appids, you are also going to want to configure components and optionally managed services.
Managed Services
Catalyst offers easy-to-use managed services for state storage and pubsub messaging components.
To ensure these services are available in your project, add the following to your AppHost:
builder
.AddCatalystProject("your-desired-project-name")
.WithCatalystKvStore("your-desired-kv-name")
.WithCatalystPubSub("your-desired-pubsub-name");
Components
Catalyst supports a variety of components that you can use when building your applications.
For example, to add a Catalyst backed state store component, you'll want to create both the service and then the component:
builder
.AddCatalystProject("your-desired-project-name")
.WithCatalystKvStore("your-desired-kv-name")
.WithComponent("your-desired-kv-component", new DiagridStateStore
{
Metadata = new()
{
State = "your-desired-kv-name",
},
});
Custom Components
Work is ongoing to get all supported components added!
If you need a component that does not have strong typing yet, you can always fall back on the IDictionary<string, object> overload of WithComponent:
.WithComponent(
"diagrid-homepage",
"bindings.http",
new Dictionary<string, object?>
{
["url"] = "https://diagrid.io",
},
[ "test-api" ]
)
The example above will create an http binding with the url property set to https://diagrid.io. The final array parameter with ["test-api"] is where you can provide which appids to scope the component to.
Additional Resources
See an example of this integration being used in the Diagrid Catalyst Workflows demo.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Aspire.Hosting.AppHost (>= 13.1.0)
-
net8.0
- Aspire.Hosting.AppHost (>= 13.1.0)
-
net9.0
- Aspire.Hosting.AppHost (>= 13.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.