Skip to content

DeepTracker Component

Volodymyr Shkolka edited this page Nov 16, 2023 · 1 revision

DeepTracker Component

Overview

DeepTracker is a component of the PS.Framework designed to monitor and track changes in objects and collections within applications. It's particularly useful in complex scenarios where understanding interactions and modifications of data is essential.

Features

  • Property Change Tracking: Monitors changes in object properties, triggering events when values are altered.
  • Collection Change Monitoring: Observes modifications in collections, such as additions, deletions, and item changes.
  • Configurable Tracking: Offers customizable tracking settings to cater to specific application needs.
  • Event Handling: Provides a range of event classes for handling different types of tracking-related events.
  • Activation/Deactivation Control: Allows for the enabling and disabling of tracking to optimize performance.
  • Extensions and Filters: Includes additional functionalities for enhanced tracking control.

Usage

Setting Up

To set up DeepTracker, initialize it with the source object and optional route parts:

var tracker = DeepTracker.Setup(sourceObject, routeParts);

Activation

Activate the tracker to start monitoring changes:

tracker.Activate();

Deactivation

Deactivate the tracker when monitoring is no longer needed:

tracker.Deactivate();

Event Handling

DeepTracker triggers various events based on the type of changes detected:

  • Property Changes: ChangedPropertyEventArgs is triggered on property value changes.
  • Collection Changes: ChangedCollectionEventArgs is used for collection modifications.

Configuration

Customize tracking behavior using various configuration options provided by DeepTracker.

Example

tracker.Exclude(propertyRoutes).Include(collectionRoutes);

Integration

DeepTracker integrates seamlessly with property change notification systems, making it ideal for MVVM pattern applications.

Conclusion

DeepTracker is a versatile tool for real-time monitoring and response to data changes, suitable for applications where dynamic data interactions are critical.


Documentation generated for DeepTracker component in PS.Framework.