From 9743c5aa121fd0b1e7cb18d2500954bf31be7c77 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Sat, 13 Jan 2018 23:54:29 +0100 Subject: [PATCH] Code cleanup. --- .../EventSourcing/ProjectionClient.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Squidex.Infrastructure.GetEventStore/EventSourcing/ProjectionClient.cs b/src/Squidex.Infrastructure.GetEventStore/EventSourcing/ProjectionClient.cs index 13dbc1558..6bf4f004d 100644 --- a/src/Squidex.Infrastructure.GetEventStore/EventSourcing/ProjectionClient.cs +++ b/src/Squidex.Infrastructure.GetEventStore/EventSourcing/ProjectionClient.cs @@ -20,8 +20,6 @@ namespace Squidex.Infrastructure.EventSourcing { public sealed class ProjectionClient { - private const string StreamByFilter = "by-{0}-{1}"; - private const string StreamByProperty = "by-{0}-{1}-property"; private readonly ConcurrentDictionary projections = new ConcurrentDictionary(); private readonly IEventStoreConnection connection; private readonly string prefix; @@ -38,12 +36,12 @@ namespace Squidex.Infrastructure.EventSourcing private string CreateFilterStreamName(string filter) { - return string.Format(CultureInfo.InvariantCulture, StreamByFilter, prefix.Simplify(), filter.Simplify()); + return $"by-{StreamByFilter}-{prefix.Simplify()}-{filter.Simplify()}"; } private string CreatePropertyStreamName(string property) { - return string.Format(CultureInfo.InvariantCulture, StreamByFilter, prefix.Simplify(), property.Simplify()); + return $"by-{StreamByFilter}-{prefix.Simplify()}-{property.Simplify()}-property"; } public async Task CreateProjectionAsync(string property, object value) @@ -77,7 +75,7 @@ namespace Squidex.Infrastructure.EventSourcing } } - return streamName + "-" + value; + return $"{streamName}-{value}"; } public async Task CreateProjectionAsync(string streamFilter = null)