[PR #1094] [MERGED] Refactoring user settings #1306

Closed
opened 2026-02-26 09:34:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NickeManarin/ScreenToGif/pull/1094
Author: @koszeggy
Created: 3/23/2022
Status: Merged
Merged: 4/16/2022
Merged by: @NickeManarin

Base: devHead: RefactoringUserSettings


📝 Commits (3)

  • 56dc30f UserSettings refactoring: parsing types in a cleaner way (#1093)
  • aca1c33 Fixing merge issues
  • fbfea5d Parsing user settings: adding missing support, fixing complex nested objects

📊 Changes

1 file changed (+65 additions, -310 deletions)

View changed files

📝 ScreenToGif.Util/Settings/UserSettings.cs (+65 -310)

📄 Description

Fixes #1093

  • The huge switch from ParseProperty has been removed
  • The redundant DeserializeProperty method is completely removed (ParseProperty is now recursive for collection elements and object properties)
  • The actual parsing is now in ParseValue, which uses the Parse extension to obtain the value
  • ParseType now uses Reflector.ResolveType where Type.GetType cannot be used (for non-corelib types without an assembly name)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NickeManarin/ScreenToGif/pull/1094 **Author:** [@koszeggy](https://github.com/koszeggy) **Created:** 3/23/2022 **Status:** ✅ Merged **Merged:** 4/16/2022 **Merged by:** [@NickeManarin](https://github.com/NickeManarin) **Base:** `dev` ← **Head:** `RefactoringUserSettings` --- ### 📝 Commits (3) - [`56dc30f`](https://github.com/NickeManarin/ScreenToGif/commit/56dc30f098e65eaadaeb1d492184830220e435d7) UserSettings refactoring: parsing types in a cleaner way (#1093) - [`aca1c33`](https://github.com/NickeManarin/ScreenToGif/commit/aca1c33b1d58e9a56ec0f562ac27f88094c11cbe) Fixing merge issues - [`fbfea5d`](https://github.com/NickeManarin/ScreenToGif/commit/fbfea5d69b641c650211708d2177a5bca64b4563) Parsing user settings: adding missing support, fixing complex nested objects ### 📊 Changes **1 file changed** (+65 additions, -310 deletions) <details> <summary>View changed files</summary> 📝 `ScreenToGif.Util/Settings/UserSettings.cs` (+65 -310) </details> ### 📄 Description Fixes #1093 - The huge `switch` from `ParseProperty` has been removed - The redundant `DeserializeProperty` method is completely removed (`ParseProperty` is now recursive for collection elements and object properties) - The actual parsing is now in `ParseValue`, which uses the [`Parse`](https://docs.kgysoft.net/corelibraries/?topic=html/M_KGySoft_CoreLibraries_StringExtensions_Parse.htm) extension to obtain the value - `ParseType` now uses [`Reflector.ResolveType`](https://docs.kgysoft.net/corelibraries/?topic=html/M_KGySoft_Reflection_Reflector_ResolveType_1.htm) where `Type.GetType` cannot be used (for non-corelib types without an assembly name) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 09:34:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1306
No description provided.