--- source_files: - DataPRO/IService/SerializableDictionary.cs - DataPRO/IService/SLICE Service.Information.cs - DataPRO/IService/Resources.Designer.cs generated_at: "2026-04-17T15:40:08.306334+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "478b82ea7c566003" --- # Documentation: DTS.DASLib.Service Namespace ## 1. Purpose This module provides service-layer functionality for DTS SLICE data acquisition hardware. It contains a generic XML-serializable dictionary implementation (`SerializableDictionary`) for persisting key-value data, a partial `Slice` class implementing device information querying via the `IInformationActions` interface, and localized resource strings for error messaging and status reporting. The module serves as an intermediary between hardware communication layers and application-level configuration, calibration, and data collection operations. --- ## 2. Public Interface ### SerializableDictionary **Signature:** `public class SerializableDictionary : Dictionary, IXmlSerializable` A generic dictionary class that implements `IXmlSerializable` to enable XML serialization of key-value pairs. Standard `Dictionary` does not support XML serialization directly. | Method | Signature | Description | |--------|-----------|-------------| | `GetSchema` | `public System.Xml.Schema.XmlSchema GetSchema()` | Returns `null`. Required by `IXmlSerializable` interface. | | `ReadXml` | `public void ReadXml(System.Xml.XmlReader reader)` | Deserializes dictionary contents from XML. Expects elements structured as `.........`. Handles empty elements and end-of-stream conditions. | | `WriteXml` | `public void WriteXml(System.Xml.XmlWriter writer)` | Serializes dictionary contents to XML. Writes a complete XML document with root element `` containing `` children, each with `` and `` sub-elements. | --- ### Slice (Partial Class - Information Region) **Signature:** `public partial class Slice : Communication, IDASCommunication, IConfigurationActions, ICalibrateActions, ITriggerCheckActions, IRealTimeActions, IArmActions, IDownloadActions, IInformationActions where T : IConnection, new()` A partial class providing SLICE device communication and control. The `Information` region implements device querying functionality. | Method | Signature | Description | |--------|-----------|-------------| | `Query` (explicit interface) | `void IInformationActions.Query(ServiceCallback callback, object userData)` | Launches an asynchronous worker to query device information. Creates a `SliceServiceAsyncInfo` wrapper and delegates to `AsyncQueryInformation`. | | `AsyncQueryInformation` | `private void AsyncQueryInformation(object asyncInfo)` | Executes synchronous stack query via `QueryStackContents`, builds `InfoResult` with module metadata (serial numbers, gains, sample rates, channel counts), and stores result in `DASInfo` property. Handles `CanceledException` and general exceptions via the async info wrapper. | | `DASFactoryQueryInformation` | `private void DASFactoryQueryInformation()` | **Note:** Appears to be a duplicate/alternate implementation using `StackContentsQuery` instead of `QueryStackContents`. Contains a bug (references undefined `info` variable). Purpose unclear from source alone. | --- ### Resources (Internal Class) **Signature:** `internal class Resources` Auto-generated strongly-typed resource accessor for localized strings in the `DTS.DASLib.Service` namespace. | Property | Type | Description | |----------|------|-------------| | `ResourceManager` | `global::System.Resources.ResourceManager` | Cached ResourceManager instance for the assembly. | | `Culture