3.9 KiB
3.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:15:36.169206+00:00 | zai-org/GLM-5-FP8 | 1 | 7c2cdf5e5e1be734 |
RealtimeModule
Purpose
This module serves as the Prism module initializer for the Realtime functionality within the application. It is responsible for registering the Realtime channel selection View and ViewModel with the Unity dependency injection container and providing assembly metadata (name, image, group, region) that the shell uses to display and manage the module. The module is categorized under the "Prepare" assembly group and targets the RealtimeModuleRegion.
Public Interface
RealtimeModule (class)
- Implements
Prism.Modularity.IModule RealtimeModule(IUnityContainer unityContainer)- Constructor accepting the Unity container via dependency injection.void Initialize()- RegistersIRealtimeChannelSelectViewtoRealtimeChannelSelectViewandIRealtimeChannelSelectViewModeltoRealtimeChannelSelectViewModelwith the Unity container.void OnInitialized(IContainerProvider containerProvider)- Empty implementation.void RegisterTypes(IContainerRegistry containerRegistry)- CallsInitialize().
RealtimeModuleNameAttribute (class)
- Extends
TextAttribute. RealtimeModuleNameAttribute()/RealtimeModuleNameAttribute(string s)- Constructors that setAssemblyNametoAssemblyNames.RealtimeModule.ToString().override string AssemblyName { get; }- Returns the module name.override Type GetAttributeType()- Returnstypeof(TextAttribute).override string GetAssemblyName()- ReturnsAssemblyName.
RealtimeModuleImageAttribute (class)
- Extends
ImageAttribute. override BitmapImage AssemblyImage { get; }- Retrieves image viaAssemblyInfo.GetImage(AssemblyNames.RealtimeModule.ToString()).override string AssemblyName { get; }- ReturnsAssemblyNames.RealtimeModule.ToString().override string AssemblyGroup { get; }- ReturnseAssemblyGroups.Prepare.ToString().override eAssemblyRegion AssemblyRegion { get; }- ReturnseAssemblyRegion.RealtimeModuleRegion.override Type GetAttributeType()- Returnstypeof(ImageAttribute).override BitmapImage GetAssemblyImage()- ReturnsAssemblyImage.override string GetAssemblyName()- ReturnsAssemblyName.override string GetAssemblyGroup()- ReturnsAssemblyGroup.override eAssemblyRegion GetAssemblyRegion()- ReturnsAssemblyRegion.
Invariants
- The
RealtimeModuleclass must be instantiated by Prism's module manager with a non-nullIUnityContainer. - Assembly-level attributes
RealtimeModuleNameandRealtimeModuleImageAttributeare applied exactly once per assembly (AllowMultiple = false). AssemblyName,AssemblyGroup, andAssemblyRegionproperties always return consistent values derived fromDTS.Commonenums/constants.
Dependencies
Depends on:
DTS.Common- ProvidesAssemblyNames,AssemblyInfo,TextAttribute,ImageAttribute,eAssemblyGroups,eAssemblyRegion.DTS.Common.Interface- Provides base interfaces.DTS.Common.Interface.Realtime- ProvidesIRealtimeChannelSelectView,IRealtimeChannelSelectViewModel.Prism.Ioc,Prism.Modularity- Prism framework for modular applications.Unity- Dependency injection container.
Depended on by:
- The application shell/bootstrapper, which discovers and loads this module.
Gotchas
- The
Initialize()method is called both directly and viaRegisterTypes(), which could lead to double-registration ifRegisterTypesis called multiple times. However,RegisterTypein Unity typically overwrites existing registrations by default. - The
RealtimeModuleImageAttributeconstructor parameterstring sis accepted but never used in either constructor overload. OnInitializedis empty, so any post-initialization logic would need to be added elsewhere.