public override Int32?CreateGenericValue(ref JniObjectReference reference, JniObjectReferenceOptions options, Type targetType)
        {
            if (!reference.IsValid)
            {
                return(null);
            }

            return(JniInteger.GetValueFromJni(ref reference, options, targetType: null));
        }
        public override JniValueMarshalerState CreateGenericObjectReferenceArgumentState(Int32?value, ParameterAttributes synchronize)
        {
            if (!value.HasValue)
            {
                return(new JniValueMarshalerState());
            }
            var r = JniInteger.CreateLocalRef(value.Value);

            return(new JniValueMarshalerState(r));
        }