Skip to content

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Jun 4, 2025

Fixes #7678

Changes

Add non-generic ReadJournalFor API

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Copy link
Contributor Author

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-review

{
public sealed class PersistenceQuery : IExtension
{
private static readonly Type ReadJournalType = typeof(IReadJournal);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type cache of IReadJournal

_system = system;
}

public TJournal ReadJournalFor<TJournal>(string readJournalPluginId) where TJournal : IReadJournal
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old API is left intact

Comment on lines +43 to +44
if(!ReadJournalType.IsAssignableFrom(readJournalType))
throw new ArgumentException("Must implement IReadJournal interface", nameof(readJournalType));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added type checking code to make sure that readJournalType implements IReadJournal

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit ec99b8c into akkadotnet:dev Jun 5, 2025
11 checks passed
This was referenced Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Query] Need a new ReadJournalFor API

2 participants