public void WriteNullableStruct <T>(T?value) where T : struct { if (WriteIsNotNull(value)) { DynamicStructTypeInfo <T> .Save(value.Value, this); } }
public T?ReadNullableStruct <T>() where T : struct { if (ReadIsNotNull()) { return(DynamicStructTypeInfo <T> .Load(this)); } else { return(null); } }
public T ReadStruct <T>() { return(DynamicStructTypeInfo <T> .Load(this)); }
//todo, xml note here about no strict struct req? public void WriteStruct <T>(T value) { // No null check, no ref comparison, and no dynamic subtype resolution: DynamicStructTypeInfo <T> .Save(value, this); }