Esempio n. 1
0
 /// <summary>
 /// Write the specified sourceData to a stream that later can be output to any channel.
 /// </summary>
 /// <returns>The stream containing the names.</returns>
 /// <param name="sourceData">Source data.</param>
 public byte[] Write(IEnumerable <T> sourceData)
 {
     using (var sw = new StreamWriter(stream)
     {
         AutoFlush = true
     })
     {
         var bytes = converter.ConvertToBytes(sourceData);
         sw.Write(System.Text.Encoding.UTF8.GetString(bytes));
         return(bytes);
     }
 }