8000 Optimize conversion of Key enum from/to string, reduce allocations (#… · dotnet/wpf@c8c970b · GitHub
[go: up one dir, main page]

Skip to content

Commit c8c970b

Browse files
authored
Optimize conversion of Key enum from/to string, reduce allocations (#9697)
* Simplify CanConvertFrom * Simplify CanConvertTo * Speed up and simplify ConvertFrom, add fast-path for F-keys * Speed up and simplify ConvertTo, add IsDefinedKey helper * Add documentation, formatting adjustments only * Use IsDefinedKey in CanConvertTo as wel 8BDF l * Remove redundant usings * Fix an unlikely IndexOutOfRangeException we could have introduced * Prevent behaviour change, let it throw an exception * Address PR feedback * Address nits, fix spelling
1 parent e1babd2 commit c8c970b

File tree

1 file changed

+267
-176
lines changed
  • src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Input

1 file changed

+267
-176
lines changed

0 commit comments

Comments
 (0)
0