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

Optionally put imported method in separate classes (by module) #826

Closed
TymurGubayev opened this issue Dec 9, 2022 · 1 comment
Closed
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@TymurGubayev
Copy link

Is your feature request related to a problem? Please describe.
I need to import lots of APIs from different modules (most notable are kernel32 and user32). I'd like a way to keep them in different namespaces, i.e.

kernel32.Sleep(100);
user32.MessageBeep(0);

Right now all imported functions are thrown together into a single class (Windows.Win32.PInvoke by default).

Describe the solution you'd like
I'd like an option to have imported method in separate classes (corresponding to modules they were imported from), especially if the import is done with the "match all"-pattern (f.e. kernel32.*).

Describe alternatives you've considered
A solution is to generate each class once and make them permanent part of the solution, not auto-generated.

Additional context

@TymurGubayev TymurGubayev added the enhancement New feature or request label Dec 9, 2022
@AArnott AArnott added the wontfix This will not be worked on label Dec 9, 2022
@AArnott
Copy link
Member

AArnott commented Dec 9, 2022

Thank you for your feedback. We actually originally had this feature, but removed it in #444 because it added complexity to CsWin32 which is already quite complex, and it didn't match the native development experience where all methods are in the global namespace anyway.

@AArnott AArnott closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants