Skip to content

Commit

Permalink
Remove IList usage in Public API
Browse files Browse the repository at this point in the history
  • Loading branch information
Hawxy authored and jeremydmiller committed Jul 17, 2024
1 parent cc1ac8b commit 7a15137
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Marten/AdvancedOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task AdvanceHighWaterMarkToLatestAsync(CancellationToken token)
/// Mostly for testing support. Register a new IInitialData object
/// that would be called from ResetAllData() later.
/// </summary>
public IList<IInitialData> InitialDataCollection => _store.Options.InitialData;
public List<IInitialData> InitialDataCollection => _store.Options.InitialData;

/// <summary>
/// Deletes all current document and event data, then (re)applies the configured
Expand Down
4 changes: 2 additions & 2 deletions src/Marten/Events/Daemon/AsyncOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Marten.Events.Daemon;
/// </summary>
public class AsyncOptions
{
private readonly IList<Action<IDocumentOperations>> _actions = new List<Action<IDocumentOperations>>();
private readonly List<Action<IDocumentOperations>> _actions = new();

/// <summary>
/// The maximum range of events fetched at one time
Expand All @@ -36,7 +36,7 @@ public class AsyncOptions
/// writes. This is used by Marten to help build out schema objects if the
/// async daemon is started before the rest of the application.
/// </summary>
public IList<Type> StorageTypes { get; } = new List<Type>();
public List<Type> StorageTypes { get; } = new();

/// <summary>
/// Enable the identity map mechanics to reuse documents within the session by their identity
Expand Down
2 changes: 1 addition & 1 deletion src/Marten/Storage/StorageFeatures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal StorageFeatures(StoreOptions options)
/// <summary>
/// Additional Postgresql tables, functions, or sequences to be managed by this DocumentStore
/// </summary>
public IList<ISchemaObject> ExtendedSchemaObjects { get; } = new List<ISchemaObject>();
public List<ISchemaObject> ExtendedSchemaObjects { get; } = new();

internal SystemFunctions SystemFunctions { get; }

Expand Down
2 changes: 1 addition & 1 deletion src/Marten/StoreOptions.Registration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Marten;

public partial class StoreOptions
{
internal IList<Type> CompiledQueryTypes => _compiledQueryTypes;
internal List<Type> CompiledQueryTypes => _compiledQueryTypes;

/// <summary>
/// Force Marten to create document mappings for type T
Expand Down
8 changes: 4 additions & 4 deletions src/Marten/StoreOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ internal INpgsqlDataSourceFactory NpgsqlDataSourceFactory

internal readonly List<Action<ISerializer>> SerializationConfigurations = new();

private readonly IList<IDocumentPolicy> _policies = new List<IDocumentPolicy>
private readonly List<IDocumentPolicy> _policies = new List<IDocumentPolicy>
{
new VersionedPolicy(), new SoftDeletedPolicy(), new TrackedPolicy(), new TenancyPolicy(), new ProjectionDocumentPolicy()
};
Expand All @@ -88,7 +88,7 @@ internal INpgsqlDataSourceFactory NpgsqlDataSourceFactory
/// Register "initial data loads" that will be applied to the DocumentStore when it is
/// bootstrapped
/// </summary>
internal readonly IList<IInitialData> InitialData = new List<IInitialData>();
internal readonly List<IInitialData> InitialData = new();

/// <summary>
/// Configure tenant id behavior within this Marten DocumentStore
Expand All @@ -98,7 +98,7 @@ internal INpgsqlDataSourceFactory NpgsqlDataSourceFactory
/// <summary>
/// Add, remove, or reorder global session listeners
/// </summary>
public readonly IList<IDocumentSessionListener> Listeners = new List<IDocumentSessionListener>();
public readonly List<IDocumentSessionListener> Listeners = new();

/// <summary>
/// Used to enable or disable Marten's OpenTelemetry features for just this session.
Expand Down Expand Up @@ -399,7 +399,7 @@ public ITenancy Tenancy
private Lazy<ITenancy>? _tenancy;
private Func<string, NpgsqlDataSourceBuilder> _npgsqlDataSourceBuilderFactory = DefaultNpgsqlDataSourceBuilderFactory;
private INpgsqlDataSourceFactory _npgsqlDataSourceFactory;
private readonly IList<Type> _compiledQueryTypes = new List<Type>();
private readonly List<Type> _compiledQueryTypes = new();
private int _applyChangesLockId = 4004;
private bool _shouldApplyChangesOnStartup = false;
private bool _shouldAssertDatabaseMatchesConfigurationOnStartup = false;
Expand Down

0 comments on commit 7a15137

Please sign in to comment.