Skip to main content

CsvSerializer

Assembly: ServiceStack.Text.dll
View Source
Declaration
public class CsvSerializer

Properties

UseEncoding

View Source
Declaration
public static Encoding UseEncoding { get; set; }

OnSerialize

View Source
Declaration
public static Action<object> OnSerialize { get; set; }

Methods

SerializeToCsv<T>(IEnumerable<T>)

View Source
Declaration
public static string SerializeToCsv<T>(IEnumerable<T> records)
Returns

System.String

Parameters
TypeName
System.Collections.Generic.IEnumerable<<T>>records
Type Parameters
  • T

SerializeToString<T>(T)

View Source
Declaration
public static string SerializeToString<T>(T value)
Returns

System.String

Parameters
TypeName
<T>value
Type Parameters
  • T

SerializeToWriter<T>(T, TextWriter)

View Source
Declaration
public static void SerializeToWriter<T>(T value, TextWriter writer)
Parameters
TypeName
<T>value
System.IO.TextWriterwriter
Type Parameters
  • T

SerializeToStream<T>(T, Stream)

View Source
Declaration
public static void SerializeToStream<T>(T value, Stream stream)
Parameters
TypeName
<T>value
System.IO.Streamstream
Type Parameters
  • T

SerializeToStream(Object, Stream)

View Source
Declaration
public static void SerializeToStream(object obj, Stream stream)
Parameters
TypeName
System.Objectobj
System.IO.Streamstream

DeserializeFromStream<T>(Stream)

View Source
Declaration
public static T DeserializeFromStream<T>(Stream stream)
Returns

<T>

Parameters
TypeName
System.IO.Streamstream
Type Parameters
  • T

DeserializeFromStream(Type, Stream)

View Source
Declaration
public static object DeserializeFromStream(Type type, Stream stream)
Returns

System.Object

Parameters
TypeName
System.Typetype
System.IO.Streamstream

DeserializeFromReader<T>(TextReader)

View Source
Declaration
public static T DeserializeFromReader<T>(TextReader reader)
Returns

<T>

Parameters
TypeName
System.IO.TextReaderreader
Type Parameters
  • T

DeserializeFromString<T>(String)

View Source
Declaration
public static T DeserializeFromString<T>(string text)
Returns

<T>

Parameters
TypeName
System.Stringtext
Type Parameters
  • T

DeserializeFromString(Type, String)

View Source
Declaration
public static object DeserializeFromString(Type type, string text)
Returns

System.Object

Parameters
TypeName
System.Typetype
System.Stringtext

WriteLateBoundObject(TextWriter, Object)

View Source
Declaration
public static void WriteLateBoundObject(TextWriter writer, object value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Objectvalue

ReadLateBoundObject(Type, String)

View Source
Declaration
public static object ReadLateBoundObject(Type type, string value)
Returns

System.Object

Parameters
TypeName
System.Typetype
System.Stringvalue

InitAot<T>()

View Source
Declaration
public static void InitAot<T>()
Type Parameters
  • T