public static String Serialize(object obj, TranslationContext translationContext, StringFormat format) { StringSerializer stringSerializer = FormatSerializer.GetStringSerializer(format); return(stringSerializer.Serialize(obj, translationContext)); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <param name="textWriter"></param> /// <param name="translationContext"></param> /// <param name="format"></param> public static void Serialize(object obj, TextWriter textWriter, TranslationContext translationContext, StringFormat format) { StringSerializer serializer = FormatSerializer.GetStringSerializer(format); serializer.Serialize(obj, textWriter, translationContext); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <param name="stringBuilder"></param> /// <param name="translationContext"></param> /// <param name="format"></param> public static void Serialize(object obj, StringBuilder stringBuilder, TranslationContext translationContext, StringFormat format) { StringSerializer stringSerializer = FormatSerializer.GetStringSerializer(format); stringSerializer.Serialize(obj, stringBuilder, translationContext); }