3.3 KiB
3.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T12:13:29.485943+00:00 | zai-org/GLM-5-FP8 | 1 | 089f2c1bff740fce |
Documentation: IDownloadEvent.cs
1. Purpose
This module defines the IDownloadEvent interface within the DTS.Common.Interface.DownloadEvent namespace. It serves as a data contract for representing a "Multiple download event" (as noted in source comments). The interface is designed for UI data-binding scenarios, indicated by its inheritance from INotifyPropertyChanged, and encapsulates properties regarding an event's identification, interactive state (enabled/readonly), duration, and display logic.
2. Public Interface
Interface: IDownloadEvent
Inherits from: INotifyPropertyChanged
Properties:
int EventNumber { get; set; }- Gets or sets the numeric identifier for the download event.
string EventNumberDisplay { get; set; }- Gets or sets the string representation of the event number, intended for UI display purposes.
bool IsEnabled { get; set; }- Gets or sets a value indicating whether the download event is enabled.
bool IsReadonly { get; set; }- Gets or sets a value indicating whether the download event is read-only.
bool IsDefault { get; }- Gets a value indicating whether this instance is the default event. This property is read-only (has no setter).
TimeSpan EventLength { get; set; }- Gets or sets the total length available for the download event.
bool ShouldDisplayLength { get; set; }- Gets or sets a value indicating whether the event length should be displayed in the UI.
3. Invariants
- INotifyPropertyChanged Contract: Any class implementing
IDownloadEventmust implement thePropertyChangedevent fromINotifyPropertyChanged. Implementations are expected to raise this event when property values change to support UI binding. - Read-Only State: The
IsDefaultproperty is strictly read-only. Implementations must calculate or determine this state internally; it cannot be set externally via the interface.
4. Dependencies
- System: Required for the
TimeSpantype. - System.ComponentModel: Required for the
INotifyPropertyChangedinterface. - Consumers: Unknown from this source file alone, though the namespace
DTS.Common.Interface.DownloadEventsuggests it is consumed by UI components or ViewModels handling download logic within the DTS system.
5. Gotchas
- Dual Event Number Properties: The interface defines both
EventNumber(int) andEventNumberDisplay(string). The source does not define the relationship between them (e.g., if setting one automatically updates the other). Developers should verify the synchronization logic in the concrete implementation. - IsDefault Logic: Because
IsDefaulthas no setter, the logic determining what makes an event "default" is encapsulated within the implementation. Developers cannot force an event to be default via this interface. - Comment Reference: The comment
//FB 6399references a specific issue tracking ID (likely FogBugz), suggesting this interface was created to address a specific requirement or bug regarding "Multiple download events."