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

2.8 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Classes/ISO/ExtraProperties/TextPastedArgs.cs
2026-04-17T16:40:00.349676+00:00 zai-org/GLM-5-FP8 1 d715f67ccc715086

Documentation: TextPastedArgs

1. Purpose

TextPastedArgs is an event argument class that encapsulates data related to text paste operations within the ISO Extra Properties system. It implements ITextPastedEventArgs and serves as a data transfer object to communicate paste event details—including the pasted text content, the source extra property, an identifier, and an optional tag—between event producers and consumers.

2. Public Interface

Class: TextPastedArgs

Namespace: DTS.Common.ISO.ExtraProperties
Implements: ITextPastedEventArgs

Properties

Property Type Access Description
Text string Read-only The text content that was pasted.
Sender object Read-only The source object of the paste event. Set from the extraProperty constructor parameter.
Id string Read-only An identifier associated with the paste event.
Tag object Read-only An arbitrary object for additional context or data.

Constructor

public TextPastedArgs(string text, IExtraProperty extraProperty, string id, object tag)

Creates a new TextPastedArgs instance with the specified values. The extraProperty parameter is assigned to the Sender property.

3. Invariants

  • All properties are immutable after construction (read-only getters with no setters).
  • Sender is always assigned from an IExtraProperty instance passed to the constructor, though the property type is object.
  • No null validation is performed in the constructor; any parameter may be null.

4. Dependencies

This module depends on:

  • DTS.Common.Events — Likely contains event infrastructure or the ITextPastedEventArgs interface definition.
  • DTS.Common.Interface.ISO.ExtraProperties — Provides ITextPastedEventArgs and IExtraProperty interfaces.

What depends on this module:

  • Cannot be determined from this source file alone.

5. Gotchas

  1. Naming mismatch: The constructor parameter is named extraProperty but is assigned to the Sender property. This naming inconsistency may cause confusion about the intended semantics of the property.

  2. Unused imports: The file imports System.Collections.Generic, System.Linq, and System.Text, none of which are used in the current implementation. This may indicate dead code or remnants from previous refactoring.

  3. No null guards: The constructor performs no validation. Callers should be aware that Text, Id, Sender, and Tag may all be null depending on what is passed in.