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

Additional check for any method that uses name as string and args as objects #44

Open
Meister1593 opened this issue Aug 30, 2020 · 0 comments

Comments

@Meister1593
Copy link

Meister1593 commented Aug 30, 2020

Imagine this situation:
We have typical multiplayers with signals scene.
Every time you need to call RPC you type something like this:
Rpc(nameof(NameOfMethod), SomeFormOfArg1, SomeFormOfArg2);
Or for example you need to emit signal, you use this construction:
EmitSignal(nameof(OnSignalHappened), SomeFormOfArg1, SomeFormOfArg2);
Or for example you need to connect to signal:
Connect(nameof(OnSignalHappened), this, nameof(SomeMethodThatHasArgs));
Aswell as disconnect:
Disconnect(nameof(OnSignalHappened), this, nameof(SomeMethodThatHasArgs));

Rider does understand that first is string and other objects is param of objects (for passing args), but rider also doesn't understand that it's indirectly related to methods and it's args.

What would be nice is to have additional check for such stuff.
For example, if we write one of those methods above with less than required methods, or with more, or with wrong type, it would highlight it as error about wrong type or amount of args.
As far as i know, there's not much of work being done for full support on c# side even in 4.0, i've seen only signals as events, so it's unlikely that this typing would be changed soon.

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