Example #1
0
 public static T?ReadNullableStruct <T>(this UnsafeReader reader, CtxReadDelegate <T> itemReader, SerializationCtx ctx) where T : struct
 {
     return(reader.ReadNullness() ? itemReader(ctx, reader).ToNullable() : null);
 }
Example #2
0
 public static T ReadNullableClass <T>(this UnsafeReader reader, CtxReadDelegate <T> itemReader, SerializationCtx ctx) where T : class
 {
     return(reader.ReadNullness() ? itemReader(ctx, reader) : null);
 }