Skip to content

Commit

Permalink
StoreDoc inherits DocumentOp again
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-zahiri authored and jeremydmiller committed Dec 2, 2024
1 parent c1eec8e commit e3906fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Persistence/Wolverine.Marten/IMartenOp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ public void Execute(IDocumentSession session)
IReadOnlyList<object> IStartStream.Events => Events;
}

public class StoreDoc<T> : IMartenOp where T : notnull
public class StoreDoc<T> : DocumentOp where T : notnull
{
private readonly T[] _documents;

public StoreDoc(params T[] documents)
public StoreDoc(params T[] documents) : base(documents)
{
_documents = documents;
}

public void Execute(IDocumentSession session)
public override void Execute(IDocumentSession session)
{
session.Store(_documents);
}
Expand Down Expand Up @@ -286,11 +286,11 @@ public override void Execute(IDocumentSession session)

public abstract class DocumentOp : IMartenOp
{
public object Document { get; }
public object[] Documents { get; }

protected DocumentOp(object document)
protected DocumentOp(params object[] documents)
{
Document = document;
Documents = documents;
}

public abstract void Execute(IDocumentSession session);
Expand Down

0 comments on commit e3906fd

Please sign in to comment.