public static void Save(IValueSink sink, ReadResultType value)
{
sink.EnterChoice((byte)value.Tag);
switch(value.Tag)
{
case Tags.PropertyValue:
Value<PropertyValueWrapper>.Save(sink, (PropertyValueWrapper)value);
break;
case Tags.PropertyAccessError:
Value<PropertyAccessErrorWrapper>.Save(sink, (PropertyAccessErrorWrapper)value);
break;
default:
throw new Exception();
}
sink.LeaveChoice();
}