This module provides foundational infrastructure for the DTS codebase, including:
Property change notification base classes (BasePropertyChanged, BaseUserControl) that implement the INotifyPropertyChanged pattern for data binding scenarios in both UI and non-UI contexts.
Localizable attribute classes (DisplayResourceAttribute, DescriptionResourceAttribute) that enable runtime resource lookup for property display names and descriptions, supporting internationalization.
Dynamic type introspection (DynamicTypeDescriptor) that enables runtime modification of type metadata, allowing dynamic addition/removal of properties and modification of attributes for scenarios like PropertyGrid customization.
public DescriptionResourceAttribute(string resourceId)
Initializes with a resource identifier to look up.
Description
public override string Description
Looks up the localized string via Strings.Strings.ResourceManager.GetString(_resourceId). Returns "##DescriptionNotFound##" + _resourceId if not found.
Creates a descriptor for the specified type, extracting properties, attributes, editors, and events via TypeDescriptor. Throws ArgumentNullException if type is null.
Properties
Name
Type
Description
Component
object
The component instance this descriptor wraps (set via FromComponent).
ClassName
string
Optional override for class name.
ComponentName
string
Optional override for component name.
OriginalProperties
PropertyDescriptorCollection
Properties from the original type via TypeDescriptor.GetProperties(type).
Properties
PropertyDescriptorCollection
Modifiable collection of properties (excludes non-browsable by default).
Public Methods
Signature
Description
public T GetPropertyValue<T>(string name, T defaultValue)
Gets a property value by name, returning defaultValue if not found or on conversion failure.
public void SetPropertyValue(string name, object value)