public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) { tester t = (tester)obj; t.internal_value = info.GetInt32(nameof(tester.internal_value)); return(t); }
public void GetObjectData(object obj, SerializationInfo info, StreamingContext context) { tester t = (tester)obj; info.AddValue(nameof(tester.internal_value), t.internal_value); }