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

Added generic extensions to EventStream subscribe/unsubscribe. #990

Merged
merged 1 commit into from
May 19, 2015

Conversation

nvivo
Copy link
Contributor

@nvivo nvivo commented May 19, 2015

EventStream is one of the few pieces that don't have generic counterparts.

This patch allows for:

EventStream.Subscribe<SomeMessage>(Self);
EventStream.Unsubscribe<SomeMessage>(Self);

instead of

EventStream.Subscribe(Self, typeof(SomeMessage));
EventStream.Unsubscribe(Self, typeof(SomeMessage));

I was going to add these methods directly to EventStream, but it seems these generic versions are usually extensions methods. One caveat with the extension method is that most code don't require an using Akka.Event, so people may miss it entirely.

Please let me know if they should be moved.

@rogeralsing
Copy link
Contributor

Looks good to me 👍

@Aaronontheweb
Copy link
Member

One caveat with the extension method is that most code don't require an using Akka.Event, so people may miss it entirely.

Is the EventStream in the Akka.Event namespace too?

@rogeralsing
Copy link
Contributor

Yes

@Aaronontheweb
Copy link
Member

Cool - I think that should be fine then.

Aaronontheweb added a commit that referenced this pull request May 19, 2015
Added generic extensions to EventStream subscribe/unsubscribe.
@Aaronontheweb Aaronontheweb merged commit a86e027 into akkadotnet:dev May 19, 2015
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

Successfully merging this pull request may close these issues.

3 participants