Пример #1
0
 /// <summary>
 /// Reads data from the Channel.</summary>
 /// <remarks>
 /// If this Channel has an underlying buffer, and this buffer is empty, then Read blocks
 /// until a writer has written to the Channel. Otherwise Read removes an element from the buffer and returns.<p/>
 /// If this is an unbuffered Channel, then Read waits until data is written by a writer.
 /// </remarks>
 /// <returns>The data read from the Channel.</returns>
 /// <exception cref="Jibu.PoisonException">Thrown if the channel has been poisoned.</exception>
 // <example>
 // - Unbuffered Channel Example -
 // <code><include UnbufferedChannelExample/UnbufferedChannelExample.cs></code>
 // </example>
 // <example>
 // - Buffered Channel Example -
 // <code><include BufferedChannelExample/BufferedChannelExample.cs></code>
 // </example>
 public T Read()
 {
     return(internalChannel.Read());
 }
Пример #2
0
 /// <summary>Reads data from the underlying Channel.</summary>
 /// <remarks>The Read method reads and returns the data available in the Channel. If no data is available Read will
 /// block until data is available.</remarks>
 /// <exception cref="PoisonException">The channel has been poisoned</exception>
 /// <returns>The data read from the Channel.</returns>
 // <example>
 // - Unbuffered Channel Example -
 // <code><include UnbufferedChannelExample/UnbufferedChannelExample.cs></code>
 // </example>
 // <example>
 // - Buffered Channel Example -
 // <code><include BufferedChannelExample/BufferedChannelExample.cs></code>
 // </example>
 public T Read()
 {
     return(channel.Read());
 }