diff --git a/Directory.Packages.props b/Directory.Packages.props
index 84e5fef63..7a342288d 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -13,10 +13,10 @@
-
-
-
-
+
+
+
+
@@ -27,7 +27,7 @@
-
+
diff --git a/global.json b/global.json
index 4c8324bd1..442b2e334 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "8.0.100-preview.6.23330.14",
+ "version": "8.0.100-preview.7.23376.3",
"allowPrerelease": false,
"rollForward": "latestMajor"
}
diff --git a/src/LondonTravel.Skill/Intents/CommuteIntent.cs b/src/LondonTravel.Skill/Intents/CommuteIntent.cs
index 1a7e7cab8..61e96ffeb 100644
--- a/src/LondonTravel.Skill/Intents/CommuteIntent.cs
+++ b/src/LondonTravel.Skill/Intents/CommuteIntent.cs
@@ -15,6 +15,8 @@ namespace MartinCostello.LondonTravel.Skill.Intents;
///
internal sealed class CommuteIntent : IIntent
{
+ private static readonly CompositeFormat CommuteIntentPrefixFormat = CompositeFormat.Parse(Strings.CommuteIntentPrefixFormat);
+
///
/// Initializes a new instance of the class.
///
@@ -96,7 +98,7 @@ private async Task CommuteAsync(ICollection favoriteLines
if (hasMultipleStatuses)
{
string displayName = Verbalizer.LineName(line.Name, asTitleCase: true);
- text = string.Format(CultureInfo.CurrentCulture, Strings.CommuteIntentPrefixFormat, displayName, text);
+ text = string.Format(CultureInfo.CurrentCulture, CommuteIntentPrefixFormat, displayName, text);
}
paragraphs.Add(text);
diff --git a/src/LondonTravel.Skill/Lines.cs b/src/LondonTravel.Skill/Lines.cs
index 4912f000c..85bb3153c 100644
--- a/src/LondonTravel.Skill/Lines.cs
+++ b/src/LondonTravel.Skill/Lines.cs
@@ -8,6 +8,8 @@ namespace MartinCostello.LondonTravel.Skill;
///
internal static class Lines
{
+ private static readonly CompositeFormat StatusIntentCardTitleFormat = CompositeFormat.Parse(Strings.StatusIntentCardTitleFormat);
+
///
/// Returns whether the specified line name refers to the Docklands Light Railway.
///
@@ -148,6 +150,6 @@ public static string ToCardTitle(string name)
suffix = Strings.LineSuffixUpper;
}
- return string.Format(CultureInfo.CurrentCulture, Strings.StatusIntentCardTitleFormat, name, suffix);
+ return string.Format(CultureInfo.CurrentCulture, StatusIntentCardTitleFormat, name, suffix);
}
}
diff --git a/src/LondonTravel.Skill/Verbalizer.cs b/src/LondonTravel.Skill/Verbalizer.cs
index dc1a3084f..2fd9d7257 100644
--- a/src/LondonTravel.Skill/Verbalizer.cs
+++ b/src/LondonTravel.Skill/Verbalizer.cs
@@ -8,6 +8,9 @@ namespace MartinCostello.LondonTravel.Skill;
///
internal static class Verbalizer
{
+ private static readonly CompositeFormat LineNameWithoutPrefixFormat = CompositeFormat.Parse(Strings.LineNameWithoutPrefixFormat);
+ private static readonly CompositeFormat LineNameWithPrefixFormat = CompositeFormat.Parse(Strings.LineNameWithPrefixFormat);
+
///
/// Returns the spoken version of the specified line name.
///
@@ -49,8 +52,8 @@ internal static string LineName(string name, bool asTitleCase = false)
return
asTitleCase ?
- string.Format(CultureInfo.CurrentCulture, Strings.LineNameWithoutPrefixFormat, spokenName, suffix) :
- string.Format(CultureInfo.CurrentCulture, Strings.LineNameWithPrefixFormat, prefix, spokenName, suffix);
+ string.Format(CultureInfo.CurrentCulture, LineNameWithoutPrefixFormat, spokenName, suffix) :
+ string.Format(CultureInfo.CurrentCulture, LineNameWithPrefixFormat, prefix, spokenName, suffix);
}
///