Skip to content

Refactor IPropertyBagValue into Type-Specific Derived Classes #41

@adydecki

Description

@adydecki

As part of our ongoing efforts to enhance the XPing365 project’s codebase, this issue proposes a significant refactoring of the IPropertyBagValue interface. The goal is to create four new derived classes, each tailored to handle a specific data type. This change aims to streamline type management and improve the clarity and maintainability of our code.

The new classes to be introduced are:

  • StringPropertyBagValue for handling single string values.
  • StringArrayPropertyBagValue for managing arrays of strings.
  • ByteArrayPropertyBagValue for byte array data.
  • DictionaryOfStringsPropertyBagValue for dictionaries with string keys and values.

Expected Outcomes:

  • Clear separation of concerns where each class is responsible for a single type.
  • Simplified code paths for operations like serialization and deserialization.
  • Enhanced type safety and reduced risk of runtime type errors.

Implementation Notes:

  • Current PropertyBagValue should became an abstract class and renamed to SerializedPropertyBagValue.
  • Each new class should implement the SerializedPropertyBagValue abstract class.
  • Include unit tests to cover the new functionality and confirm that existing features remain unaffected.
  • Update the documentation to reflect the new class structure.

This refactoring is a step towards a more robust and type-safe architecture

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions