Several classes, particularly the ones related to translation services, have been modified to implement IDisposable interface. Additionally, all instances of HttpClient are being disposed properly now using "using" keyword. This will help ensure that system resources are promptly released when they're no longer required, potentially improving application performance and stability.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This commit replaces explicit string variable declarations with the var keyword in the SpellCheckWordLists.cs file. This provides improved code readability and maintainability, as it leverages the compiler's ability to determine the variable's type automatically based on its value.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This commit simplifies the process of loading user and system dictionaries in SpellCheckWordLists. The modified code avoids redundant loading constructs through an iteration over the dictionary paths. It contributes to maintaining the readability and efficiency of the codebase.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The duplicated loops checking for words containing periods or dashes in different collections were replaced with a single loop. The function GetSingleUnifiedCollection was created to unify the collections using the Union method. This makes the code cleaner and more maintainable.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
Removed the '_skipAllList' variable from 'SpellCheckWordLists.cs' as it was unused. The variable was also removed from a sorting operation, which should help improve performance.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
A new test class, DimensionTest, is created and added to the test project. This class specifically tests the functionality of the Dimension object's validity and equality methods, thus enhancing our suite of unit tests.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>