2.6 KiB
2.6 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T02:39:10.292945+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | ebd03ba552c1193d |
Connection
-
Purpose
This module defines a custom exception type,NotConnectedException, used to signal operations that are attempted on a connection object when no active connection is established. It resides in theDTS.Common.Classes.Connectionnamespace, indicating its role in the common core infrastructure for managing connection state across the DTS system. Its purpose is to provide a semantically precise exception for connection-state violations, distinguishing them from genericApplicationExceptionorInvalidOperationExceptioncases. -
Public Interface
NotConnectedException(string message)
Constructor that initializes the exception with a specified error message. It delegates to the baseApplicationExceptionconstructor. No additional properties or methods are exposed beyond those inherited fromException.
- Invariants
- The exception inherits all standard
Exceptioninvariants (e.g.,Message,StackTrace,InnerExceptionbehavior). - The exception is only intended for use when an operation requires an active connection but none exists; it is not a general-purpose connection error.
- No validation or state management is performed by this class itself—it is a passive data carrier.
- Dependencies
- Depends on:
System.ApplicationException(frommscorlib/System.Runtime). - Used by: Presumably connection-handling classes (e.g.,
Connection,Client, orSessiontypes in theDTS.Common.Classes.Connectionnamespace or related modules), though these are not visible in this file. - Not used by: No other code in this file; this is a standalone type definition.
- Gotchas
ApplicationExceptionis deprecated in modern .NET best practices (replaced byExceptionor more specific built-in exceptions likeInvalidOperationException), suggesting this may be legacy code or part of an older design pattern.- The class provides no additional context (e.g., connection ID, endpoint, or timestamp), so callers must embed such details in the
messagestring if needed for diagnostics. - No serialization support is explicitly implemented (e.g.,
[Serializable]attribute or customGetObjectData), thoughApplicationExceptionitself is serializable by default in .NET Framework—behavior may differ in .NET Core/.NET 5+. - None identified from source alone.