3.0 KiB
3.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:07:14.970939+00:00 | zai-org/GLM-5-FP8 | 1 | fa1361db7a24ac6a |
ChannelCodes
Purpose
This module provides the core domain model and event handling infrastructure for channel codes, which represent coded identifiers (User or ISO type) used in channel configuration. It includes the ChannelCode entity class, a PasteCommandClass for handling clipboard paste operations with multi-field parsing, and a delegate type for coercing ISO code values. The module supports data-driven construction from database readers and integrates with the Prism event aggregation system.
Public Interface
ChannelCode (class)
- Inherits from
BasePropertyChanged, implementsIChannelCode - Constructors:
ChannelCode(IDataReader reader, IReadOnlyDictionary<short, string> channelTypeLookup)- Constructs from database reader, mappingCodeTypeInttoChannelCodeTypevia lookupChannelCode()- Default constructor, setsCodeTypetoISOChannelCode(IChannelCode channelCode)- Copy constructor
- Properties:
int Id- Unique identifier (default: -1)UIItemStatus ItemStatus- UI state (default:UIItemStatus.None)string Code- The channel code valuestring Name- The channel nameChannelEnumsAndConstants.ChannelCodeType CodeType- EitherUserorISOICommand PasteCommand- Command for paste handling (default: null)
- Constants:
public const string PASTE_ID = "ChannelCode"
- Methods:
override bool Equals(object obj)- Equality based onCode,Name, andCodeType
- Destructor:
~ChannelCode()- Clears_codeand_nameto null
PasteCommandClass (class)
- Implements
ICommand - Constructor:
PasteCommandClass(string id) - Properties:
string Id { get; }- Identifier for the command instance
- Methods:
bool CanExecute(object parameter)- Always returnstruevoid Execute(object parameter)- Handles paste from clipboard; parses multi-field text, publishesTextPastedEventorPageModifiedEvent
- Events:
event EventHandler CanExecuteChanged
TextPastedArgs (class)
- Implements
ITextPastedEventArgs - Constructor:
TextPastedArgs(string text, IChannelCode channelCode, string id, object tag) - Properties:
string Text { get; }- Pasted text contentobject Sender { get; }- TheIChannelCodesourcestring Id { get; }- Identifierobject Tag { get; }- Additional context
CoerceISOCodeDelegate (delegate)
- Signature:
delegate string CoerceISOCodeDelegate(string val, bool uniqueISOCodesRequired, bool useISOCodeFilterMapping) - Purpose: Coerces incoming ISO codes from UI to new values
Invariants
ChannelCode.Iddefaults to -1 when not setChannelCode.CodeandChannelCode.Nameare never null (initialized tostring.Empty)PasteCommandClass.Executeonly processes paste ifClipboard.ContainsText()returns true