Class TransformChannel<T, TResult>
A channel wrapper that takes the provided channel and transforms them on demand when being read.
Inheritance
System.Object
System.Threading.Channels.Channel<T, TResult>
TransformChannel<T, T, TResult>
TransformChannel<T, TResult>
Inherited Members
System.Threading.Channels.Channel<T, TResult>.Reader
System.Threading.Channels.Channel<T, 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<T, TResult> : TransformChannel<T, T, TResult>
Type Parameters
Name | Description |
---|---|
T | Specifies the type of data that may be written to the channel. |
TResult | Specifies the type of data that may be read from the channel. |
Constructors
| Improve this Doc View SourceTransformChannel(Channel<T, T>, Func<T, TResult>)
Creates a channel wrapper that takes the provided channel and transforms them on demand when being read.
Declaration
public TransformChannel(Channel<T, T> source, Func<T, TResult> transform)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.Channels.Channel<T, T> | source | The channel containing the source data. |
System.Func<T, 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)