--- source_files: - Common/DTS.CommonCore/Interface/CheckTrigger/ICheckTriggerView.cs - Common/DTS.CommonCore/Interface/CheckTrigger/ICheckTriggerViewModel.cs generated_at: "2026-04-16T02:17:32.566868+00:00" model: "Qwen/Qwen3-Coder-Next-FP8" schema_version: 1 sha256: "b59a55831fe5a086" --- # CheckTrigger ## 1. Purpose This module defines the core interfaces for the *Check Trigger* feature within the DTS (likely *Data Tracking System*) architecture. It establishes the contract between the view and view model layers for components responsible for triggering and managing check operations—likely periodic or event-driven validation/sync tasks—within a MVVM (Model-View-ViewModel) pattern. The interfaces `ICheckTriggerView` and `ICheckTriggerViewModel` serve as base abstractions that concrete implementations must fulfill, enabling decoupled UI and business logic for check-triggering functionality. ## 2. Public Interface No public *functions*, *methods*, or *properties* are defined directly in these interfaces. Both interfaces are marker interfaces inheriting from base interfaces in the `DTS.Common.Base` namespace: - **`ICheckTriggerView`** - *Signature*: `public interface ICheckTriggerView : IBaseView` - *Behavior*: Represents the view layer contract for a check-trigger UI component. It inherits from `IBaseView`, implying it adheres to a common view contract (e.g., lifecycle, binding context, or UI state management), but no additional API surface is exposed here. - **`ICheckTriggerViewModel`** - *Signature*: `public interface ICheckTriggerViewModel : IBaseViewModel` - *Behavior*: Represents the view model layer contract for managing check-trigger state and logic. It inherits from `IBaseViewModel`, implying standard view model capabilities (e.g., property change notification, command handling), but no additional API surface is exposed here. > **Note**: All meaningful behavior (e.g., commands, properties like `IsTriggerEnabled`, `LastCheckTime`) must be defined in concrete implementations or in `IBaseView`/`IBaseViewModel`. This file only declares the *type roles*. ## 3. Invariants - `ICheckTriggerView` must be implemented by a UI component (e.g., XAML view, control, or page) that participates in the check-trigger workflow. - `ICheckTriggerViewModel` must be implemented by a view model that coordinates check-trigger logic and binds to an `ICheckTriggerView`. - The pair (`ICheckTriggerView`, `ICheckTriggerViewModel`) must be used in a standard MVVM binding relationship (e.g., view sets its `BindingContext` to an instance of `ICheckTriggerViewModel`). - Both interfaces are *marker interfaces*—they carry no behavioral contract beyond their type identity and base inheritance. ## 4. Dependencies - **Depends on**: - `DTS.Common.Base` (specifically `IBaseView` and `IBaseViewModel`). - **Depended on by**: - Concrete view classes (e.g., `CheckTriggerPage : Page, ICheckTriggerView`) and view model classes (e.g., `CheckTriggerViewModel : ICheckTriggerViewModel`) in the UI layer. - Dependency injection or composition containers likely register types against these interfaces. - Other modules (e.g., `DTS.Common.Core.CheckTrigger`) likely consume these interfaces to bind or wire up check-trigger components. ## 5. Gotchas - **No behavior defined here**: Developers may mistakenly expect methods/properties in these interfaces; all logic resides in implementations or base interfaces. - **Ambiguity in `IBaseView`/`IBaseViewModel`**: Behavior of `ICheckTriggerView` and `ICheckTriggerViewModel` is entirely contingent on the contracts of `IBaseView` and `IBaseViewModel`, which are not provided here. Their semantics (e.g., required lifecycle methods, binding patterns) must be consulted separately. - **No versioning or extensibility signals**: The interfaces are empty—adding future functionality may require breaking changes or new derived interfaces (e.g., `ICheckTriggerView2`). - **Namespace reuse**: Both interfaces reside in `DTS.Common.Interface`, but no other types in this namespace are shown; ensure no naming conflicts exist with other `*Trigger` interfaces (e.g., `IScheduleTriggerView`). None identified beyond the above.