Class TransformChannel<TWrite, TRead, TResult>
A channel wrapper that takes the provided channel and transforms them on demand when being read.
Inheritance
System.Object
System.Threading.Channels.Channel<TWrite, TResult>
TransformChannel<TWrite, TRead, TResult>
Inherited Members
System.Threading.Channels.Channel<TWrite, TResult>.Reader
System.Threading.Channels.Channel<TWrite, TResult>.Writer
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Open.ChannelExtensions
Assembly: Open.ChannelExtensions.dll
Syntax
public class TransformChannel<TWrite, TRead, TResult> : Channel<TWrite, TResult>
Type Parameters
Name | Description |
---|---|
TWrite | Specifies the type of data that may be written to the channel. |
TRead | Specifies the type of data read from the source channel. |
TResult | Specifies the type of data that may be read from the channel. |
Constructors
| Improve this Doc View SourceTransformChannel(Channel<TWrite, TRead>, Func<TRead, TResult>)
Creates a channel wrapper that takes the provided channel and transforms them on demand when being read.
Declaration
public TransformChannel(Channel<TWrite, TRead> source, Func<TRead, TResult> transform)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.Channels.Channel<TWrite, TRead> | source | The channel containing the source data. |
System.Func<TRead, TResult> | transform | The transform function to be applied to the results when being read. |
Extension Methods
Extensions.ReadAll<TWrite, TRead>(Channel<TWrite, TRead>, Action<TRead>, Boolean, CancellationToken)
Extensions.ReadAll<TWrite, TRead>(Channel<TWrite, TRead>, Action<TRead>, CancellationToken, Boolean)