Пример #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);
 }
Пример #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);
 }