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

WinoServer Code fixes #585

Merged
merged 1 commit into from
Feb 24, 2025
Merged

WinoServer Code fixes #585

merged 1 commit into from
Feb 24, 2025

Conversation

DinuruSeniya
Copy link
Contributor

  1. Moved the IsBackground property assignment into the object initializer for the Thread object.

  2. Replaced e.Args[e.Args.Length - 1] with e.Args[^1]

  3. Added a conditional check to see if GetWindowThreadProcessId returns 0, which indicates failure. If it fails, throw a Win32Exception with the last Win32 error.

  4. Removed unused assignment to the variable process

  5. Changed the return type of the ConfigureServices method from IServiceProvider to ServiceProvider. It is more specific and faster.

  6. Changed notifyIcon to _notifyIcon according to private var naming scheme.

  7. Added the CharSet = CharSet.Unicode attribute to the DllImport declarations to specify that the string arguments should be marshaled as Unicode.

1.  Moved the IsBackground property assignment into the object initializer for the Thread object.

2. Replaced e.Args[e.Args.Length - 1] with e.Args[^1]

3. Added a conditional check to see if GetWindowThreadProcessId returns 0, which indicates failure. If it fails, throw a Win32Exception with the last Win32 error.

4. Removed unused assignment to the variable process

5. Changed the return type of the ConfigureServices method from IServiceProvider to ServiceProvider. It is more specific and faster.

6. Changed notifyIcon to _notifyIcon according to private var naming scheme.

7. Added the CharSet = CharSet.Unicode attribute to the DllImport declarations to specify that the string arguments should be marshaled as Unicode.
@DinuruSeniya DinuruSeniya changed the title Code fixes WinoServer Code fixes Feb 24, 2025
@bkaankose bkaankose merged commit cf8f1ec into bkaankose:main Feb 24, 2025
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.

2 participants