From 15eb2e1a1ee7da51bc3ac83b11102e72d7db021a Mon Sep 17 00:00:00 2001 From: Timothy Coleman Date: Wed, 11 Oct 2023 10:11:34 +0100 Subject: [PATCH] Return an IReadOnlyList for simplicity Otherwise some risk that the subsystem will use an iterator and something will enumerate it twice resulting potentially in parts of the subsystems startup routine unintentionally being run twice --- src/EventStore.Plugins/Subsystems/ISubsystem.cs | 2 +- src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EventStore.Plugins/Subsystems/ISubsystem.cs b/src/EventStore.Plugins/Subsystems/ISubsystem.cs index d591283..d0e287b 100644 --- a/src/EventStore.Plugins/Subsystems/ISubsystem.cs +++ b/src/EventStore.Plugins/Subsystems/ISubsystem.cs @@ -8,6 +8,6 @@ namespace EventStore.Plugins.Subsystems; public interface ISubsystem { IApplicationBuilder Configure(IApplicationBuilder builder); IServiceCollection ConfigureServices(IServiceCollection services); - IEnumerable Start(); + IReadOnlyList Start(); void Stop(); } diff --git a/src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs b/src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs index 62f6a0c..c8d0afe 100644 --- a/src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs +++ b/src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs @@ -8,5 +8,5 @@ public interface ISubsystemsPlugin { string Name { get; } string Version { get; } string CommandLineName { get; } - IEnumerable> GetSubsystemFactories(string configPath); + IReadOnlyList> GetSubsystemFactories(string configPath); }