public void CreateGenericValue()
        {
            var s = marshaler.CreateGenericObjectReferenceArgumentState(Value);
            var r = s.ReferenceValue;
            var o = marshaler.CreateGenericValue(ref r, JniObjectReferenceOptions.Copy);

            Assert.IsTrue(Equals(Value, o));
            if (!UsesProxy && !typeof(T).IsValueType)
            {
                Assert.AreNotSame(Value, o);
            }
            marshaler.DestroyGenericArgumentState(Value, ref s);

            Dispose(o);
        }
        public override DemoValueType CreateGenericValue(ref JniObjectReference reference, JniObjectReferenceOptions options, Type targetType)
        {
            var v = Int32Marshaler.CreateGenericValue(ref reference, options, targetType);

            return(new DemoValueType(v));
        }