7.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T03:31:05.140610+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | b7f5fb3360deccec |
Module
Documentation: ReviewableDasSerialNumberAttribute and Related Classes
1. Purpose
This module provides concrete implementations of ReviewableAttribute for capturing and exposing read-only metadata about a DTS.Slice.Control.Event.Module instance—specifically, attributes that are relevant during event review or audit workflows. These attributes (e.g., DAS serial number, sample rate, hardware anti-aliasing filter rate, test description) are lazily evaluated via delegates and formatted for display in UI or reporting contexts. The classes exist to support structured, consistent, and type-safe access to module-level configuration and identity data during review processes.
2. Public Interface
All classes are public nested within DTS.Slice.Control.Event.Module.
ReviewableDasSerialNumberAttribute
- Signature:
public class ReviewableDasSerialNumberAttribute : ReviewableAttribute - Constructor:
public ReviewableDasSerialNumberAttribute(Event.Module module) - Behavior:
Initializes a reviewable attribute named"DAS Serial Number"whose value is lazily retrieved frommodule.DasSerialNumber. Uses the base class’sDetermineValueStringdelegate mechanism.
ReviewableSampleRateAttribute
- Signature:
public class ReviewableSampleRateAttribute : ReviewableAttribute - Constructor:
public ReviewableSampleRateAttribute(Event.Module module) - Behavior:
Initializes a reviewable attribute named"Sample Rate". Value ismodule.SampleRateHz.ToString("N")(numeric formatting with thousand separators, no decimal places implied by"N"default).
ReviewableTestDescriptionAttribute
- Signature:
public class ReviewableTestDescriptionAttribute : ReviewableAttribute - Constructor:
public ReviewableTestDescriptionAttribute(Event.Module module) - Behavior:
Initializes a reviewable attribute named"Test Description". Value ismodule.ParentEvent.Description. Note: This accesses the parentEvent, not theModuledirectly.
ReviewableHardwareFrequencyAttribute
- Signature:
public class ReviewableHardwareFrequencyAttribute : ReviewableAttribute - Constructor:
public ReviewableHardwareFilterAttribute(Event.Module module) - Behavior:
Initializes a reviewable attribute named"HW AAF"(Hardware Anti-Alias Filter). Value ismodule.AaFilterRateHz.ToString("N2")(2 decimal places).
3. Invariants
- All attributes are immutable after construction: The
nameandDetermineValueStringdelegate are set in the base constructor and never modified. - Value evaluation is deferred: The delegate passed to
base(...)is invoked only when the attribute’s value is requested (e.g., for display), not at construction time. ReviewableAttributebase constructor enforces non-nullnameandcalculateValue: The protected constructor expects both parameters; the public constructor in subclasses always supplies them.ReviewableDasSerialNumberAttributeand other subclasses must be instantiated with a non-nullEvent.Module: Otherwise, accessingmodule.DasSerialNumber,module.SampleRateHz, etc., will throw aNullReferenceException.ReviewableAttributehas two constructors, but only one is usable:- The single-parameter constructor (
ReviewableAttribute(Event.Module)) is intentionally non-functional and throwsNotImplementedExceptionvia a wrapperException. - Only the two-parameter protected constructor (
ReviewableAttribute(string, DetermineValueString)) is used in practice.
- The single-parameter constructor (
4. Dependencies
Dependencies of this module:
DTS.Slice.Control.Event.Module— Required formodule.DasSerialNumber,module.SampleRateHz,module.AaFilterRateHz, andmodule.ParentEvent.DTS.Slice.Control.ReviewableAttribute— Base class forReviewableAttribute. (Implied by inheritance; source not provided, but referenced inReviewableAttribute.cs.)DTS.Utilities— Used for formatting (e.g.,.ToString("N")), though standard .NET formatting would suffice.
Dependencies on this module:
- Any code that needs to expose module metadata for review (e.g., UI forms, audit logging, export tools) will instantiate these classes and pass them to a review framework built around
ReviewableAttribute.
Inferred relationships:
Event.Modulemust define the following properties (not visible in source, but required):string DasSerialNumberdouble SampleRateHzdouble AaFilterRateHzEvent ParentEvent(withstring Description)
ReviewableAttributeinherits fromSlice.Control.ReviewableAttribute, which must define:- Constructor:
ReviewableAttribute(string name, DetermineValueString calculateValue) - Property/method to retrieve the formatted value string (via
DetermineValueStringdelegate).
- Constructor:
5. Gotchas
-
Misleading XML comment for
ReviewableSampleRateAttributeandReviewableHardwareFrequencyAttribute:
Both are documented as “A reviewable filter frequency attribute attached to a specific channel.” — but they are attached to aModule, not aChannel. (TheReviewableDasSerialNumberAttributecomment is similarly inaccurate.) -
ReviewableTestDescriptionAttributeaccessesmodule.ParentEvent.Description:
This implies a parent-child relationship (Module→Event). Ifmodule.ParentEventisnull, this will throwNullReferenceException. -
ReviewableAttributeconstructor design is fragile:
The single-parameter constructor exists solely to fail at runtime. This is a code smell—ideally, it would beprivateor removed entirely. -
String formatting is hardcoded:
"N"and"N2"are used directly in delegates. Changing formatting (e.g., locale, precision) requires source modification. -
No null-safety in value delegates:
None of the delegates check for null (e.g.,module.DasSerialNumbercould benull, butToString()is called unconditionally). This may yield"False"or""depending on type, or throw ifDasSerialNumberis a non-nullable value type. -
Typo in
ReviewableHardwareFrequencyAttributeconstructor name in source:
The XML comment sayschannel, but the parameter is namedmodule. This is minor but inconsistent. -
No documentation for
DetermineValueStringdelegate type:
Its signature and contract are unknown from source alone. Assumed to beFunc<string>or similar. -
No tests or usage examples provided:
Behavior is inferred solely from constructor and inheritance. Actual runtime behavior (e.g., how values are consumed) is not verifiable from source.
Note: All inferences assume standard .NET conventions and the structural clues in the provided source. Behavior of DetermineValueString and the parent ReviewableAttribute class cannot be fully confirmed without their source.