diff --git a/sample/Api/Program.cs b/sample/Api/Program.cs
index f9cf0c9..040d182 100644
--- a/sample/Api/Program.cs
+++ b/sample/Api/Program.cs
@@ -26,7 +26,7 @@
{
opts.TargetHost = builder.Configuration["ConnectionStrings:temporal"];
opts.Namespace = Constants.Namespace;
- opts.Interceptors = new[] { new TracingInterceptor() };
+ opts.Interceptors = [new TracingInterceptor()];
opts.Runtime = runtime;
});
diff --git a/sample/Worker/Program.cs b/sample/Worker/Program.cs
index 22ba603..beeb5a0 100644
--- a/sample/Worker/Program.cs
+++ b/sample/Worker/Program.cs
@@ -24,7 +24,7 @@
builder.Services
.AddTemporalClient(opts =>
{
- opts.TargetHost = builder.Configuration["ConnectionStrings:temporal"];
+ opts.TargetHost = builder.Configuration.GetConnectionString("temporal");
opts.Namespace = Constants.Namespace;
opts.Interceptors = new[] { new TracingInterceptor() };
opts.Runtime = runtime;
diff --git a/src/InfinityFlow.Aspire.Temporal/InfinityFlow.Aspire.Temporal.csproj b/src/InfinityFlow.Aspire.Temporal/InfinityFlow.Aspire.Temporal.csproj
index 5a25d3b..57fa92d 100644
--- a/src/InfinityFlow.Aspire.Temporal/InfinityFlow.Aspire.Temporal.csproj
+++ b/src/InfinityFlow.Aspire.Temporal/InfinityFlow.Aspire.Temporal.csproj
@@ -7,7 +7,7 @@
true
true
InfinityFlow.Aspire.Temporal
- 0.5.0
+ 0.5.1
true
README.md
LICENSE
diff --git a/src/InfinityFlow.Aspire.Temporal/TemporalServerContainerBuilderExtensions.cs b/src/InfinityFlow.Aspire.Temporal/TemporalServerContainerBuilderExtensions.cs
index 47a1431..60bd61e 100644
--- a/src/InfinityFlow.Aspire.Temporal/TemporalServerContainerBuilderExtensions.cs
+++ b/src/InfinityFlow.Aspire.Temporal/TemporalServerContainerBuilderExtensions.cs
@@ -78,21 +78,21 @@ private static async Task> Add
var resourceBuilder = builder.AddResource(container)
.WithAnnotation(new ContainerImageAnnotation() { Image = "aspire-temporal-server-helper", Tag = "latest" })
.WithArgs(args.GetArgs())
- .WithHttpsEndpoint(name: "server", targetPort: args.Port, port: 7233).AsHttp2Service(); // Internal port is always 7233
+ .WithHttpsEndpoint(name: "server", port: args.Port, targetPort: 7233).AsHttp2Service(); // Internal port is always 7233
if (args.Headless is not true)
{
- resourceBuilder.WithHttpEndpoint(name: "ui", targetPort: args.UiPort, port: 8233); // Internal port is always 8233
+ resourceBuilder.WithHttpEndpoint(name: "ui", port: args.UiPort, targetPort: 8233); // Internal port is always 8233
}
if (args.MetricsPort is not null)
{
- resourceBuilder.WithHttpEndpoint(name: "metrics", targetPort: args.MetricsPort, port: 7235); // Internal port is always 7235
+ resourceBuilder.WithHttpEndpoint(name: "metrics", port: args.MetricsPort, targetPort: 7235); // Internal port is always 7235
}
if (args.HttpPort is not null)
{
- resourceBuilder.WithHttpEndpoint(name: "http", targetPort: args.HttpPort, port: 7234); // Internal port is always 7234
+ resourceBuilder.WithHttpEndpoint(name: "http", port: args.HttpPort, targetPort: 7234); // Internal port is always 7234
}
return resourceBuilder;
diff --git a/src/InfinityFlow.Aspire.Temporal/TemporalServerExecutableResource.cs b/src/InfinityFlow.Aspire.Temporal/TemporalServerExecutableResource.cs
index a4d0038..607b320 100644
--- a/src/InfinityFlow.Aspire.Temporal/TemporalServerExecutableResource.cs
+++ b/src/InfinityFlow.Aspire.Temporal/TemporalServerExecutableResource.cs
@@ -13,7 +13,7 @@ public class TemporalServerExecutableResource(string name, TemporalServerResourc
var endpoints = this.GetEndpoints().Where(e => e.IsAllocated).ToList();
if (endpoints.Count==0)
{
- throw new DistributedApplicationException("Expected allocated endpoints!");
+ return null;
}
var server = endpoints.SingleOrDefault(x => x.EndpointName == "server");
@@ -33,7 +33,7 @@ public class TemporalServerContainerResource(string name, TemporalServerResource
var endpoints = this.GetEndpoints().Where(e => e.IsAllocated).ToList();
if (endpoints.Count == 0)
{
- throw new DistributedApplicationException("Expected allocated endpoints!");
+ return null;
}
var server = endpoints.SingleOrDefault(x => x.EndpointName == "server");