Files
DP44/docs/ai/Common/DTS.Common/Attributes.md
2026-04-17 14:55:32 -04:00

2.7 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Attributes/VersionAttribute.cs
Common/DTS.Common/Attributes/DisplayAttributeEx.cs
Common/DTS.Common/Attributes/DescriptionAttributeEx.cs
Common/DTS.Common/Attributes/ProgrammableTriggerAttributes.cs
2026-04-17T16:34:44.808885+00:00 zai-org/GLM-5-FP8 1 44630fee2cdfa77b

Documentation: DTS.Common.Attributes

1. Purpose

This module provides a collection of custom .NET attributes used throughout the DTS codebase for metadata annotation. It includes VersionAttribute for versioning metadata, DisplayAttributeEx and DescriptionAttributeEx for localized string lookup via resource files, and ProgrammableTriggersAttribute for configuring trigger behavior on enum values. These attributes support reflection-based discovery and are designed to integrate with the system's localization and extensibility infrastructure.


2. Public Interface

VersionAttribute

Namespace: DTS.Common.Attributes
Base: System.Attribute

A simple attribute for attaching version metadata to code elements.

Member Signature Description
Constructor VersionAttribute(int version) Initializes the attribute with the specified version number.
Property int Version { get; private set; } Gets the version value. Read-only after construction.

DisplayAttributeEx

Namespace: DTS.Common.Attributes
Base: System.ComponentModel.DisplayNameAttribute

Provides localized display names via resource lookup. The resource key is constructed as {propertyId}_DisplayName.

Member Signature Description
Constructor DisplayAttributeEx(string propertyId) Initializes with the property identifier used for resource lookup.
Property string DisplayName { get; } Overrides base. Returns the localized string from StringResources, or ##DisplayNameNotFound##{propertyId} if not found.

Attribute Usage: Class | Enum | Interface | Delegate | Property


DescriptionAttributeEx

Namespace: DTS.Common.Attributes
Base: System.ComponentModel.DescriptionAttribute

Provides localized descriptions via resource lookup. The resource key is constructed as {propertyId}_Description.

Member Signature Description
Constructor DescriptionAttributeEx(string propertyId) Initializes with the property identifier used for resource lookup.
Property string Description { get; } Overrides base. Returns the localized string from StringResources, or ##DescriptionNotFound##{propertyId} if not found.

Attribute Usage: Class | Enum | Interface | Delegate | Property