From 31ac251d1ddc9cff564bab988b5e36cb7781045f Mon Sep 17 00:00:00 2001 From: glopesdev Date: Sun, 22 Mar 2026 08:43:16 +0000 Subject: [PATCH] Simplify async interface docs terminology Generic type references are removed for simplicity. We also change the phrasing describing the value parameter of Write methods to work with pure function calls coming soon. --- src/AsyncDevice.tt | 10 +-- tests/ExpectedOutput/device.async.cs | 126 +++++++++++++-------------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/AsyncDevice.tt b/src/AsyncDevice.tt index 3605045..3ab0dec 100644 --- a/src/AsyncDevice.tt +++ b/src/AsyncDevice.tt @@ -75,8 +75,8 @@ foreach (var registerMetadata in publicRegisters) /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task<<#= interfaceType #>> Read<#= registerMetadata.Key #>Async(CancellationToken cancellationToken = default) { @@ -91,8 +91,8 @@ foreach (var registerMetadata in publicRegisters) /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task>> ReadTimestamped<#= registerMetadata.Key #>Async(CancellationToken cancellationToken = default) { @@ -107,7 +107,7 @@ foreach (var registerMetadata in publicRegisters) /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// diff --git a/tests/ExpectedOutput/device.async.cs b/tests/ExpectedOutput/device.async.cs index 39a52ac..2386928 100644 --- a/tests/ExpectedOutput/device.async.cs +++ b/tests/ExpectedOutput/device.async.cs @@ -55,8 +55,8 @@ internal AsyncDevice(string portName) /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadDigitalInputsAsync(CancellationToken cancellationToken = default) { @@ -71,8 +71,8 @@ public async Task ReadDigitalInputsAsync(CancellationToken cancellationTok /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedDigitalInputsAsync(CancellationToken cancellationToken = default) { @@ -87,8 +87,8 @@ public async Task> ReadTimestampedDigitalInputsAsync(Cancellat /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadAnalogDataAsync(CancellationToken cancellationToken = default) { @@ -103,8 +103,8 @@ public async Task ReadAnalogDataAsync(CancellationToken cance /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedAnalogDataAsync(CancellationToken cancellationToken = default) { @@ -119,8 +119,8 @@ public async Task> ReadTimestampedAnalogDataAsync /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadComplexConfigurationAsync(CancellationToken cancellationToken = default) { @@ -135,8 +135,8 @@ public async Task ReadComplexConfigurationAsync(Can /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedComplexConfigurationAsync(CancellationToken cancellationToken = default) { @@ -147,7 +147,7 @@ public async Task> ReadTimestampedCompl /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// @@ -165,8 +165,8 @@ public async Task WriteComplexConfigurationAsync(ComplexConfigurationPayload val /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadVersionAsync(CancellationToken cancellationToken = default) { @@ -181,8 +181,8 @@ public async Task ReadVersionAsync(CancellationToken cancellatio /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedVersionAsync(CancellationToken cancellationToken = default) { @@ -197,8 +197,8 @@ public async Task> ReadTimestampedVersionAsync(Cance /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadCustomPayloadAsync(CancellationToken cancellationToken = default) { @@ -213,8 +213,8 @@ public async Task ReadCustomPayloadAsync(CancellationToken cancella /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedCustomPayloadAsync(CancellationToken cancellationToken = default) { @@ -229,8 +229,8 @@ public async Task> ReadTimestampedCustomPayloadAsync(Ca /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadCustomRawPayloadAsync(CancellationToken cancellationToken = default) { @@ -245,8 +245,8 @@ public async Task ReadCustomRawPayloadAsync(CancellationToken cance /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedCustomRawPayloadAsync(CancellationToken cancellationToken = default) { @@ -261,8 +261,8 @@ public async Task> ReadTimestampedCustomRawPayloadAsync /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadCustomMemberConverterAsync(CancellationToken cancellationToken = default) { @@ -277,8 +277,8 @@ public async Task ReadCustomMemberConverterAsync(C /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedCustomMemberConverterAsync(CancellationToken cancellationToken = default) { @@ -293,8 +293,8 @@ public async Task> ReadTimestampedCust /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadBitmaskSplitterAsync(CancellationToken cancellationToken = default) { @@ -309,8 +309,8 @@ public async Task ReadBitmaskSplitterAsync(CancellationT /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedBitmaskSplitterAsync(CancellationToken cancellationToken = default) { @@ -321,7 +321,7 @@ public async Task> ReadTimestampedBitmaskSpl /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// @@ -339,8 +339,8 @@ public async Task WriteBitmaskSplitterAsync(BitmaskSplitterPayload value, Cancel /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadCounter0Async(CancellationToken cancellationToken = default) { @@ -355,8 +355,8 @@ public async Task ReadCounter0Async(CancellationToken cancellationToken = d /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedCounter0Async(CancellationToken cancellationToken = default) { @@ -371,8 +371,8 @@ public async Task> ReadTimestampedCounter0Async(CancellationTok /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadPortDIOSetAsync(CancellationToken cancellationToken = default) { @@ -387,8 +387,8 @@ public async Task ReadPortDIOSetAsync(CancellationToken cancella /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedPortDIOSetAsync(CancellationToken cancellationToken = default) { @@ -399,7 +399,7 @@ public async Task> ReadTimestampedPortDIOSetAsync(Ca /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// @@ -417,8 +417,8 @@ public async Task WritePortDIOSetAsync(PortDigitalIOS value, CancellationToken c /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadPulseDOPort0Async(CancellationToken cancellationToken = default) { @@ -433,8 +433,8 @@ public async Task ReadPulseDOPort0Async(CancellationToken cancellationTo /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedPulseDOPort0Async(CancellationToken cancellationToken = default) { @@ -445,7 +445,7 @@ public async Task> ReadTimestampedPulseDOPort0Async(Cancella /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// @@ -463,8 +463,8 @@ public async Task WritePulseDOPort0Async(ushort value, CancellationToken cancell /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadPulseDO0Async(CancellationToken cancellationToken = default) { @@ -479,8 +479,8 @@ public async Task ReadPulseDO0Async(CancellationToken cancellationToken /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedPulseDO0Async(CancellationToken cancellationToken = default) { @@ -491,7 +491,7 @@ public async Task> ReadTimestampedPulseDO0Async(Cancellation /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// @@ -509,8 +509,8 @@ public async Task WritePulseDO0Async(ushort value, CancellationToken cancellatio /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadStartPulseAsync(CancellationToken cancellationToken = default) { @@ -525,8 +525,8 @@ public async Task ReadStartPulseAsync(CancellationToken cance /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedStartPulseAsync(CancellationToken cancellationToken = default) { @@ -537,7 +537,7 @@ public async Task> ReadTimestampedStartPulseAsync /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. /// @@ -555,8 +555,8 @@ public async Task WriteStartPulseAsync(StartPulsePayload value, CancellationToke /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the register payload. /// public async Task ReadStartPulseTrainAsync(CancellationToken cancellationToken = default) { @@ -571,8 +571,8 @@ public async Task ReadStartPulseTrainAsync(CancellationT /// A which can be used to cancel the operation. /// /// - /// A task that represents the asynchronous read operation. The - /// property contains the timestamped register payload. + /// A task that represents the asynchronous read operation. The task result contains + /// the timestamped register payload. /// public async Task> ReadTimestampedStartPulseTrainAsync(CancellationToken cancellationToken = default) { @@ -583,7 +583,7 @@ public async Task> ReadTimestampedStartPulse /// /// Asynchronously writes a value to the register. /// - /// The value to be stored in the register. + /// The value to write in the register. /// /// A which can be used to cancel the operation. ///