1 <?xml version="1.0" encoding="utf-8"?>
4 <name>System.Threading.Channels</name>
7 <member name="T:System.Threading.Channels.BoundedChannelFullMode">
8 <summary>Specifies the behavior to use when writing to a bounded channel that is already full.</summary>
10 <member name="F:System.Threading.Channels.BoundedChannelFullMode.DropNewest">
11 <summary>Removes and ignores the newest item in the channel in order to make room for the item being written.</summary>
13 <member name="F:System.Threading.Channels.BoundedChannelFullMode.DropOldest">
14 <summary>Removes and ignores the oldest item in the channel in order to make room for the item being written.</summary>
16 <member name="F:System.Threading.Channels.BoundedChannelFullMode.DropWrite">
17 <summary>Drops the item being written.</summary>
19 <member name="F:System.Threading.Channels.BoundedChannelFullMode.Wait">
20 <summary>Waits for space to be available in order to complete the write operation.</summary>
22 <member name="T:System.Threading.Channels.BoundedChannelOptions">
23 <summary>Provides options that control the behavior of bounded <see cref="T:System.Threading.Channels.Channel`1" /> instances.</summary>
25 <member name="M:System.Threading.Channels.BoundedChannelOptions.#ctor(System.Int32)">
26 <summary>Initializes the options.</summary>
27 <param name="capacity">The maximum number of items the bounded channel may store.</param>
29 <member name="P:System.Threading.Channels.BoundedChannelOptions.Capacity">
30 <summary>Gets or sets the maximum number of items the bounded channel may store.</summary>
32 <member name="P:System.Threading.Channels.BoundedChannelOptions.FullMode">
33 <summary>Gets or sets the behavior incurred by write operations when the channel is full.</summary>
35 <member name="T:System.Threading.Channels.Channel">
36 <summary>Provides static methods for creating channels.</summary>
38 <member name="M:System.Threading.Channels.Channel.CreateBounded``1(System.Int32)">
39 <summary>Creates a channel with the specified maximum capacity.</summary>
40 <param name="capacity">The maximum number of items the channel may store.</param>
41 <typeparam name="T">Specifies the type of data in the channel.</typeparam>
42 <returns>The created channel.</returns>
44 <member name="M:System.Threading.Channels.Channel.CreateBounded``1(System.Threading.Channels.BoundedChannelOptions)">
45 <summary>Creates a channel with the specified maximum capacity.</summary>
46 <param name="options">Options that guide the behavior of the channel.</param>
47 <typeparam name="T">Specifies the type of data in the channel.</typeparam>
48 <returns>The created channel.</returns>
50 <member name="M:System.Threading.Channels.Channel.CreateUnbounded``1">
51 <summary>Creates an unbounded channel usable by any number of readers and writers concurrently.</summary>
52 <typeparam name="T" />
53 <returns>The created channel.</returns>
55 <member name="M:System.Threading.Channels.Channel.CreateUnbounded``1(System.Threading.Channels.UnboundedChannelOptions)">
56 <summary>Creates an unbounded channel subject to the provided options.</summary>
57 <param name="options">Options that guide the behavior of the channel.</param>
58 <typeparam name="T">Specifies the type of data in the channel.</typeparam>
59 <returns>The created channel.</returns>
61 <member name="T:System.Threading.Channels.Channel`1">
62 <summary>Provides a base class for channels that support reading and writing elements of type <typeparamref name="T" />.</summary>
63 <typeparam name="T">Specifies the type of data readable and writable in the channel.</typeparam>
65 <member name="M:System.Threading.Channels.Channel`1.#ctor" />
66 <member name="T:System.Threading.Channels.Channel`2">
67 <summary>Provides a base class for channels that support reading elements of type <typeparamref name="TRead" /> and writing elements of type <typeparamref name="TWrite" />.</summary>
68 <typeparam name="TWrite">Specifies the type of data that may be written to the channel.</typeparam>
69 <typeparam name="TRead">Specifies the type of data that may be read from the channel.</typeparam>
71 <member name="M:System.Threading.Channels.Channel`2.#ctor" />
72 <member name="M:System.Threading.Channels.Channel`2.op_Implicit(System.Threading.Channels.Channel{`0,`1})~System.Threading.Channels.ChannelReader{`1}">
73 <summary>Implicit cast from a <see cref="T:System.Threading.Channels.Channel`2" /> to its readable half.</summary>
74 <param name="channel">The <see cref="T:System.Threading.Channels.Channel`2" /> being cast.</param>
75 <returns>The readable half.</returns>
77 <member name="M:System.Threading.Channels.Channel`2.op_Implicit(System.Threading.Channels.Channel{`0,`1})~System.Threading.Channels.ChannelWriter{`0}">
78 <summary>Implicit cast from a <see cref="T:System.Threading.Channels.Channel`2" /> to its writable half.</summary>
79 <param name="channel">The <see cref="T:System.Threading.Channels.Channel`2" /> being cast.</param>
80 <returns>The writable half.</returns>
82 <member name="P:System.Threading.Channels.Channel`2.Reader">
83 <summary>Gets the readable half of this channel.</summary>
85 <member name="P:System.Threading.Channels.Channel`2.Writer">
86 <summary>Gets the writable half of this channel.</summary>
88 <member name="T:System.Threading.Channels.ChannelClosedException">
89 <summary>Exception thrown when a channel is used after it's been closed.</summary>
91 <member name="M:System.Threading.Channels.ChannelClosedException.#ctor">
92 <summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
94 <member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.Exception)">
95 <summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
96 <param name="innerException">The exception that is the cause of this exception.</param>
98 <member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
99 <summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class with serialized data.</summary>
100 <param name="info">The object that holds the serialized object data.</param>
101 <param name="context">The contextual information about the source or destination.</param>
103 <member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.String)">
104 <summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
105 <param name="message">The message that describes the error.</param>
107 <member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.String,System.Exception)">
108 <summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
109 <param name="message">The message that describes the error.</param>
110 <param name="innerException">The exception that is the cause of this exception.</param>
112 <member name="T:System.Threading.Channels.ChannelOptions">
113 <summary>Provides options that control the behavior of channel instances.</summary>
115 <member name="M:System.Threading.Channels.ChannelOptions.#ctor" />
116 <member name="P:System.Threading.Channels.ChannelOptions.AllowSynchronousContinuations">
118 <see langword="true" /> if operations performed on a channel may synchronously invoke continuations subscribed to
119 notifications of pending async operations; <see langword="false" /> if all continuations should be invoked asynchronously.</summary>
121 <member name="P:System.Threading.Channels.ChannelOptions.SingleReader">
123 <see langword="true" /> readers from the channel guarantee that there will only ever be at most one read operation at a time;
124 <see langword="false" /> if no such constraint is guaranteed.</summary>
126 <member name="P:System.Threading.Channels.ChannelOptions.SingleWriter">
128 <see langword="true" /> if writers to the channel guarantee that there will only ever be at most one write operation
129 at a time; <see langword="false" /> if no such constraint is guaranteed.</summary>
131 <member name="T:System.Threading.Channels.ChannelReader`1">
132 <summary>Provides a base class for reading from a channel.</summary>
133 <typeparam name="T">Specifies the type of data that may be read from the channel.</typeparam>
135 <member name="M:System.Threading.Channels.ChannelReader`1.#ctor" />
136 <member name="P:System.Threading.Channels.ChannelReader`1.Completion">
137 <summary>Gets a <see cref="T:System.Threading.Tasks.Task" /> that completes when no more data will ever
138 be available to be read from this channel.</summary>
140 <member name="M:System.Threading.Channels.ChannelReader`1.ReadAllAsync(System.Threading.CancellationToken)">
141 <summary>Creates an <see cref="T:System.Collections.Generic.IAsyncEnumerable`1" /> that enables reading all of the data from the channel.</summary>
142 <param name="cancellationToken">The cancellation token to use to cancel the enumeration.</param>
143 <returns>The created async enumerable.</returns>
145 <member name="M:System.Threading.Channels.ChannelReader`1.ReadAsync(System.Threading.CancellationToken)">
146 <summary>Asynchronously reads an item from the channel.</summary>
147 <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the read operation.</param>
148 <returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that represents the asynchronous read operation.</returns>
150 <member name="M:System.Threading.Channels.ChannelReader`1.TryRead(`0@)">
151 <summary>Attempts to read an item from the channel.</summary>
152 <param name="item">The read item, or a default value if no item could be read.</param>
154 <see langword="true" /> if an item was read; otherwise, <see langword="false" />.</returns>
156 <member name="M:System.Threading.Channels.ChannelReader`1.WaitToReadAsync(System.Threading.CancellationToken)">
157 <summary>Returns a <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete when data is available to read.</summary>
158 <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the wait operation.</param>
159 <returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete with a <see langword="true" /> result when data is available to read
160 or with a <see langword="false" /> result when no further data will ever be available to be read.</returns>
162 <member name="T:System.Threading.Channels.ChannelWriter`1">
163 <summary>Provides a base class for writing to a channel.</summary>
164 <typeparam name="T">Specifies the type of data that may be written to the channel.</typeparam>
166 <member name="M:System.Threading.Channels.ChannelWriter`1.#ctor" />
167 <member name="M:System.Threading.Channels.ChannelWriter`1.Complete(System.Exception)">
168 <summary>Mark the channel as being complete, meaning no more items will be written to it.</summary>
169 <param name="error">Optional Exception indicating a failure that's causing the channel to complete.</param>
170 <exception cref="T:System.InvalidOperationException">The channel has already been marked as complete.</exception>
172 <member name="M:System.Threading.Channels.ChannelWriter`1.TryComplete(System.Exception)">
173 <summary>Attempts to mark the channel as being completed, meaning no more data will be written to it.</summary>
174 <param name="error">An <see cref="T:System.Exception" /> indicating the failure causing no more data to be written, or null for success.</param>
176 <see langword="true" /> if this operation successfully completes the channel; otherwise, <see langword="false" /> if the channel could not be marked for completion,
177 for example due to having already been marked as such, or due to not supporting completion.</returns>
179 <member name="M:System.Threading.Channels.ChannelWriter`1.TryWrite(`0)">
180 <summary>Attempts to write the specified item to the channel.</summary>
181 <param name="item">The item to write.</param>
183 <see langword="true" /> if the item was written; otherwise, <see langword="false" />.</returns>
185 <member name="M:System.Threading.Channels.ChannelWriter`1.WaitToWriteAsync(System.Threading.CancellationToken)">
186 <summary>Returns a <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete when space is available to write an item.</summary>
187 <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the wait operation.</param>
188 <returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete with a <see langword="true" /> result when space is available to write an item
189 or with a <see langword="false" /> result when no further writing will be permitted.</returns>
191 <member name="M:System.Threading.Channels.ChannelWriter`1.WriteAsync(`0,System.Threading.CancellationToken)">
192 <summary>Asynchronously writes an item to the channel.</summary>
193 <param name="item">The value to write to the channel.</param>
194 <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the write operation.</param>
195 <returns>A <see cref="T:System.Threading.Tasks.ValueTask" /> that represents the asynchronous write operation.</returns>
197 <member name="T:System.Threading.Channels.UnboundedChannelOptions">
198 <summary>Provides options that control the behavior of unbounded <see cref="T:System.Threading.Channels.Channel`1" /> instances.</summary>
200 <member name="M:System.Threading.Channels.UnboundedChannelOptions.#ctor" />