示例#1
0
 public static void WriteNullableStruct <T>(this UnsafeWriter writer, CtxWriteDelegate <T> itemWriter, SerializationCtx ctx, T?value) where T : struct
 {
     if (writer.WriteNullness(value))
     {
         itemWriter(ctx, writer, value.Value);
     }
 }
示例#2
0
 public static void WriteNullableClass <T>(this UnsafeWriter writer, CtxWriteDelegate <T> itemWriter, SerializationCtx ctx, T value) where T : class
 {
     if (writer.WriteNullness(value))
     {
         itemWriter(ctx, writer, value);
     }
 }