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
Type | Name |
---|---|
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
Type | Name |
---|---|
<T> | value |
Type Parameters
T
SerializeToWriter<T>(T, TextWriter)
View Source
Declaration
public static void SerializeToWriter<T>(T value, TextWriter writer)
Parameters
Type | Name |
---|---|
<T> | value |
System.IO.TextWriter | writer |
Type Parameters
T
SerializeToStream<T>(T, Stream)
View Source
Declaration
public static void SerializeToStream<T>(T value, Stream stream)
Parameters
Type | Name |
---|---|
<T> | value |
System.IO.Stream | stream |
Type Parameters
T
SerializeToStream(Object, Stream)
View Source
Declaration
public static void SerializeToStream(object obj, Stream stream)
Parameters
Type | Name |
---|---|
System.Object | obj |
System.IO.Stream | stream |
DeserializeFromStream<T>(Stream)
View Source
Declaration
public static T DeserializeFromStream<T>(Stream stream)
Returns
<T>
Parameters
Type | Name |
---|---|
System.IO.Stream | stream |
Type Parameters
T
DeserializeFromStream(Type, Stream)
View Source
Declaration
public static object DeserializeFromStream(Type type, Stream stream)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.IO.Stream | stream |
DeserializeFromReader<T>(TextReader)
View Source
Declaration
public static T DeserializeFromReader<T>(TextReader reader)
Returns
<T>
Parameters
Type | Name |
---|---|
System.IO.TextReader | reader |
Type Parameters
T
DeserializeFromString<T>(String)
View Source
Declaration
public static T DeserializeFromString<T>(string text)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | text |
Type Parameters
T
DeserializeFromString(Type, String)
View Source
Declaration
public static object DeserializeFromString(Type type, string text)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.String | text |
WriteLateBoundObject(TextWriter, Object)
View Source
Declaration
public static void WriteLateBoundObject(TextWriter writer, object value)
Parameters
Type | Name |
---|---|
System.IO.TextWriter | writer |
System.Object | value |
ReadLateBoundObject(Type, String)
View Source
Declaration
public static object ReadLateBoundObject(Type type, string value)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.String | value |
InitAot<T>()
View Source
Declaration
public static void InitAot<T>()
Type Parameters
T