Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V5] Consistent interfaces for typed jobs #223

Open
nulltoken opened this issue Feb 27, 2025 · 0 comments
Open

[V5] Consistent interfaces for typed jobs #223

nulltoken opened this issue Feb 27, 2025 · 0 comments
Milestone

Comments

@nulltoken
Copy link
Collaborator

nulltoken commented Feb 27, 2025

Currently we've got things like this

public void RemoveJob<TJob>() where TJob : IJob => RemoveJob(typeof(TJob));
public void RemoveJob(Type type) => jobWorker.RemoveJobByType(type);

and others than only expose generic based variants

Guid RunScheduledJob<TJob>(TimeSpan delay, object? parameter = null, CancellationToken token = default)
    where TJob : IJob;

The proposal would be to move to Typed based interfaces only and expose Generic based sugar syntax through extension methods delegating to the pure interface methods.

This would have the following benefits

  • Reduce the scope of core interfaces
  • Be able to easily dismiss some lack of code coverage if it only exists at the extension methods level
@nulltoken nulltoken added this to the v5 milestone Feb 27, 2025
@nulltoken nulltoken changed the title [V5] Consistent interfaces for typed jobs [V5] Consistent interfaces for typed and untyped jobs Mar 11, 2025
@nulltoken nulltoken changed the title [V5] Consistent interfaces for typed and untyped jobs [V5] Consistent interfaces for typed jobs Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant