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

Allow IActorGrain and GrainWithStringKey in inherited interface #175

Closed
andyhoyle opened this issue May 27, 2022 · 0 comments
Closed

Allow IActorGrain and GrainWithStringKey in inherited interface #175

andyhoyle opened this issue May 27, 2022 · 0 comments

Comments

@andyhoyle
Copy link
Contributor

andyhoyle commented May 27, 2022

Take the HelloWorld example:

public interface IGreeter : IActorGrain, IGrainWithStringKey { }

public class Greeter : DispatchActorGrain, IGreeter { ... }

I would like to move IActorGrain and IGrainWithStringKey into a base interface:

public interface IBase : IActorGrain, IGrainWithStringKey { }

public interface IGreeter : IBase { }

public class Greeter : DispatchActorGrain, IGreeter { ... }

But when I do this I get an exception:

Warning
System.InvalidOperationException: 'Type 'Demo.Greeter' can only implement single custom IActorGrain interface'

I userstand that when compiled to IL, Greeter gets compiled to:

public class Greeter : DispatchActorGrain, IGreeter, IBase { ... }

But as long as only IGreeter is registered as a reference to the Greeter grain, then there shouldn't be an issue.

I've created a PR to address this: #176

yevhen added a commit that referenced this issue May 25, 2023
#175 Allow IActorGrain and GrainWithStringKey in inherited interface
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