diff --git a/Directory.Packages.props b/Directory.Packages.props
index e5789ac193..2c5acf39d1 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,7 +7,7 @@
true
true
3.10.0
- 1.0.0-alpha.20241018.6
+ 1.0.0-alpha.20241021.2
@@ -39,15 +39,15 @@
-
+
-
-
+
+
-
+
diff --git a/playground/cdk/CdkSample.AppHost/Program.cs b/playground/cdk/CdkSample.AppHost/Program.cs
index 275b2dabad..db6bc49993 100644
--- a/playground/cdk/CdkSample.AppHost/Program.cs
+++ b/playground/cdk/CdkSample.AppHost/Program.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using Azure.Provisioning.ApplicationInsights;
-using Azure.Provisioning.Expressions;
using Azure.Provisioning.KeyVault;
using Azure.Provisioning.OperationalInsights;
using Azure.Provisioning.ServiceBus;
@@ -57,9 +56,7 @@
{
var queue = infrastructure.GetProvisionableResources().OfType().Single(q => q.BicepIdentifier == "queue1");
queue.MaxDeliveryCount = 5;
- queue.LockDuration = new StringLiteralExpression("PT5M");
- // TODO: this should be
- // queue.LockDuration = TimeSpan.FromMinutes(5);
+ queue.LockDuration = TimeSpan.FromMinutes(5);
})
.AddTopic("topic1")
.ConfigureInfrastructure(infrastructure =>
@@ -72,9 +69,7 @@
.ConfigureInfrastructure(infrastructure =>
{
var subscription = infrastructure.GetProvisionableResources().OfType().Single(q => q.BicepIdentifier == "subscription1");
- subscription.LockDuration = new StringLiteralExpression("PT5M");
- // TODO: this should be
- //subscription.LockDuration = TimeSpan.FromMinutes(5);
+ subscription.LockDuration = TimeSpan.FromMinutes(5);
subscription.RequiresSession = true;
})
.AddSubscription("topic1", "subscription2")
diff --git a/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppsInfrastructure.cs b/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppsInfrastructure.cs
index 64235c95c6..9b79f42063 100644
--- a/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppsInfrastructure.cs
+++ b/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppsInfrastructure.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Globalization;
-using System.Text;
using System.Text.RegularExpressions;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Lifecycle;
@@ -899,8 +898,7 @@ private void AddContainerRegistryParameters(ContainerAppConfiguration app)
// This is a workaround to handle nested formattable strings until the bug is fixed.
private static BicepValue Interpolate(BicepValueFormattableString text)
{
- var formatStringBuilder = new StringBuilder();
- var arguments = new List>();
+ var bicepStringBuilder = new BicepStringBuilder();
void ProcessFormattableString(BicepValueFormattableString formattableString, int argumentIndex)
{
@@ -909,7 +907,7 @@ void ProcessFormattableString(BicepValueFormattableString formattableString, int
foreach (var match in Regex.EnumerateMatches(span, @"{\d+}"))
{
- formatStringBuilder.Append(span[..(match.Index - skip)]);
+ bicepStringBuilder.Append(span[..(match.Index - skip)].ToString());
var argument = formattableString.GetArgument(argumentIndex);
@@ -920,18 +918,17 @@ void ProcessFormattableString(BicepValueFormattableString formattableString, int
}
else
{
- formatStringBuilder.Append(CultureInfo.InvariantCulture, $"{{{arguments.Count}}}");
if (argument is BicepValue bicepValue)
{
- arguments.Add(bicepValue);
+ bicepStringBuilder.Append($"{bicepValue}");
}
else if (argument is string s)
{
- arguments.Add(s);
+ bicepStringBuilder.Append(s);
}
else if (argument is ProvisioningParameter provisioningParameter)
{
- arguments.Add(provisioningParameter);
+ bicepStringBuilder.Append($"{provisioningParameter}");
}
else
{
@@ -944,19 +941,12 @@ void ProcessFormattableString(BicepValueFormattableString formattableString, int
skip = match.Index + match.Length;
}
- formatStringBuilder.Append(span);
+ bicepStringBuilder.Append(span.ToString());
}
ProcessFormattableString(text, 0);
- var formatString = formatStringBuilder.ToString();
-
- if (formatString == "{0}")
- {
- return arguments[0];
- }
-
- return BicepFunction.Interpolate(new BicepValueFormattableString(formatString, [.. arguments]));
+ return bicepStringBuilder.Build();
}
///
diff --git a/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIExtensions.cs b/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIExtensions.cs
index 00061502d7..c10505b380 100644
--- a/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIExtensions.cs
+++ b/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIExtensions.cs
@@ -48,8 +48,8 @@ public static IResourceBuilder AddAzureOpenAI(this IDistrib
infrastructure.Add(new ProvisioningOutput("connectionString", typeof(string))
{
Value = new InterpolatedStringExpression(
- "Endpoint={0}",
[
+ new StringLiteralExpression("Endpoint="),
new MemberExpression(
new MemberExpression(
new IdentifierExpression(cogServicesAccount.BicepIdentifier),