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

Context.DI().ActorOf shouldn't require a parameterless constructor #832

Closed
nvivo opened this issue Apr 10, 2015 · 4 comments
Closed

Context.DI().ActorOf shouldn't require a parameterless constructor #832

nvivo opened this issue Apr 10, 2015 · 4 comments

Comments

@nvivo
Copy link
Contributor

nvivo commented Apr 10, 2015

The new extension method in 1.0 to instantiate actors using DI fails to instantiate any actor that requires parameters because of the "new()" constraint on the extension.

Example:

public class SomeActor : ReceiveActor
{
    public SomeActor(IDependency dependency) { ... }
}

Context.DI().ActorOf<SomeActor>("foo");

Fails with:

'SomeActor' must be a non-abstract type with a public parameterless
constructor in order to use it as parameter 'TActor' in the generic type
or method 'DIActorContextAdapter.ActorOf<TActor>(string)'

This defeats the purpose of the extension.

@rogeralsing
Copy link
Contributor

@jcwrequests
Copy link

@rogeralsing @nvivo I will take care if this will 833. Thanks

@jcwrequests
Copy link

@Danthar @nvivo Please verify that PR#835 resolves this issue. Thanks.

@Aaronontheweb
Copy link
Member

Resolved per #835

This was referenced Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants