~ubuntu-branches/ubuntu/trusty/smuxi/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/ServiceStack.Text/src/ServiceStack.Text/CsvStreamExtensions.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer
  • Date: 2013-05-25 22:11:31 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130525221131-nd2mc0kzubuwyx20
Tags: 0.8.11-1
* [22d13d5] Imported Upstream version 0.8.11
* [6d2b95a] Refreshed patches
* [89eb66e] Added ServiceStack libraries to smuxi-engine package
* [848ab10] Enable Campfire engine
* [c6dbdc7] Always build db4o for predictable build result
* [13ec489] Exclude OS X specific libraries from dh_clideps

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// http://code.google.com/p/servicestack/wiki/TypeSerializer
 
3
// ServiceStack.Text: .NET C# POCO Type Text Serializer.
 
4
//
 
5
// Authors:
 
6
//   Demis Bellot (demis.bellot@gmail.com)
 
7
//
 
8
// Copyright 2011 Liquidbit Ltd.
 
9
//
 
10
// Licensed under the same terms of ServiceStack: new BSD license.
 
11
//
 
12
 
 
13
using System.Collections.Generic;
 
14
using System.IO;
 
15
 
 
16
namespace ServiceStack.Text
 
17
{
 
18
        public static class CsvStreamExtensions
 
19
        {
 
20
                public static void WriteCsv<T>(this Stream outputStream, IEnumerable<T> records)
 
21
                {
 
22
                        using (var textWriter = new StreamWriter(outputStream))
 
23
                        {
 
24
                                textWriter.WriteCsv(records);
 
25
                        }
 
26
                }
 
27
 
 
28
                public static void WriteCsv<T>(this TextWriter writer, IEnumerable<T> records)
 
29
                {
 
30
                        CsvWriter<T>.Write(writer, records);
 
31
                }
 
32
 
 
33
        }
 
34
}
 
 
b'\\ No newline at end of file'