Exemple #1
0
 public static void WriteStringOrReference(this ObjectWriter writer, String value)
 {
     if (value == null)
     {
         writer.WriteNull();
     }
     else if (!writer.TryWriteReference(value))
     {
         writer.WriteString(value);
     }
 }
Exemple #2
0
 public static void WriteStringBuilderArray(this ObjectWriter writer, StringBuilder[] value)
 {
     writer.WriteTag(FormatterTag.StringBuilderArray);
     writer.InnerWrite(value.Length);
     foreach (var v in value)
     {
         if (v == null)
         {
             writer.WriteNull();
         }
         else
         {
             writer.WriteStringOrReference(v.ToString());
         }
     }
 }