From 53d27b444d6e63695696bbdc7aca4aecf4f23f09 Mon Sep 17 00:00:00 2001 From: jay-zahiri <11631617+jay-zahiri@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:23:49 +0100 Subject: [PATCH] Perform casting to IEnumerable --- src/Persistence/Wolverine.Marten/IMartenOp.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Persistence/Wolverine.Marten/IMartenOp.cs b/src/Persistence/Wolverine.Marten/IMartenOp.cs index c88eaa5f..8f73b5b1 100644 --- a/src/Persistence/Wolverine.Marten/IMartenOp.cs +++ b/src/Persistence/Wolverine.Marten/IMartenOp.cs @@ -260,9 +260,9 @@ public class StoreManyDocs : DocumentsOp where T : notnull { private readonly T[] _documents; - public StoreManyDocs(T[] documents) : base(documents) + public StoreManyDocs(IEnumerable documents) : base(documents.Cast()) { - _documents = documents; + _documents = documents.ToArray(); } public override void Execute(IDocumentSession session) @@ -332,9 +332,9 @@ public abstract class DocumentsOp : IMartenOp { public object[] Documents { get; } - protected DocumentsOp(params object[] documents) + protected DocumentsOp(IEnumerable documents) { - Documents = documents; + Documents = documents.ToArray(); } public abstract void Execute(IDocumentSession session);