3.7 KiB
3.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:15:36.171898+00:00 | zai-org/GLM-5-FP8 | 1 | a7e08a3e77cd2e83 |
View
Purpose
This ViewModel manages the Realtime channel selection UI logic. It handles filtering and displaying available realtime channels, responding to user search input, publishing channel selection events, and responding to global notification events (busy indicator and notifications). It acts as the intermediary between the View and the event aggregation system.
Public Interface
RealtimeChannelSelectViewModel (class)
- Implements
IRealtimeChannelSelectViewModel RealtimeChannelSelectViewModel(IRealtimeChannelSelectView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)- Constructor that wires up the view, sets DataContext, initializes interaction requests, and subscribes to events.
Properties:
IRealtimeChannelSelectView ChannelSelectView { get; set; }- The associated view.InteractionRequest<Notification> NotificationRequest { get; }- For raising notification popups.InteractionRequest<Confirmation> ConfirmationRequest { get; }- For raising confirmation dialogs.IRealtimeChannel[] RealtimeChannels { get; set; }- Filtered channels displayed to user; defaults to empty array.bool IsDirty { get; }- Always returnsfalse.bool IsBusy { get; set; }- Bound to busy indicator; notifies on change.bool IsMenuIncluded { get; set; }- Notifies on change.bool IsNavigationIncluded { get; set; }- Notifies on change.
Methods:
void SetAvailableChannels(IRealtimeChannel[] channels)- Sets_allChannelsand callsFilter().void SetSearchText(string searchText)- Sets_searchTermand callsFilter().void SetRealtimeChannel(IRealtimeChannel channel)- PublishesRealtimeChannelSelectedEventwith the selected channel.void OnPropertyChanged(string propertyName)- RaisesPropertyChangedevent.void Unset()- Empty.void Cleanup()- Empty.Task CleanupAsync()- ReturnsTask.CompletedTask.void Initialize()- Empty.void Initialize(object parameter)- Empty.void Initialize(object parameter, object model)- Empty.Task InitializeAsync()- ReturnsTask.CompletedTask.Task InitializeAsync(object parameter)- ReturnsTask.CompletedTask.void Activated()- Empty.
Events:
event PropertyChangedEventHandler PropertyChanged- ImplementsINotifyPropertyChanged.
Invariants
RealtimeChannelsis never null (initialized to empty array)._allChannelsis private and only modified viaSetAvailableChannels.Filter()is always called after modifying_searchTermor_allChannels.- The ViewModel is created as a shared singleton (
[PartCreationPolicy(CreationPolicy.Shared)]). - Event subscriptions use
ThreadOption.PublisherThreadforBusyIndicatorChangeNotificationwithkeepSubscriberReferenceAlive = true.
Dependencies
Depends on:
DTS.Common.Events- ProvidesNotificationContentEventArgs.DTS.Common.Events.Realtime- ProvidesRaiseNotification,BusyIndicatorChangeNotification,RealtimeChannelSelectedEvent.DTS.Common.Interactivity- ProvidesInteractionRequest<T>,Notification,Confirmation.DTS.Common.Interface.Realtime- ProvidesIRealtimeChannel,IRealtimeChannelSelectView,IRealtimeChannelSelectViewModel.Prism.Events- ProvidesIEventAggregator,ThreadOption.Prism.Regions- ProvidesIRegionManager.Unity- ProvidesIUnityContainer.
Depended on by:
RealtimeModule(registers and resolves this