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); } }
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); } }