コード例 #1
0
        public LocalThreadReferenceHolder(JniEnvironment nativeEnvironment, jthread reference)
        {
            Contract.Requires <ArgumentNullException>(nativeEnvironment != null, "nativeEnvironment");

            _nativeEnvironment = nativeEnvironment;
            _reference         = (jthread)_nativeEnvironment.NewLocalReference(reference);
        }
コード例 #2
0
        public LocalClassReferenceHolder(JniEnvironment nativeEnvironment, jclass reference)
        {
            Contract.Requires<ArgumentNullException>(nativeEnvironment != null, "nativeEnvironment");

            _nativeEnvironment = nativeEnvironment;
            _reference = (jclass)_nativeEnvironment.NewLocalReference(reference);
        }
コード例 #3
0
        public LocalObjectReferenceHolder(JniEnvironment nativeEnvironment, jobject reference)
        {
            Contract.Requires <ArgumentNullException>(nativeEnvironment != null, "nativeEnvironment");

            _nativeEnvironment = nativeEnvironment;
            _reference         = _nativeEnvironment.NewLocalReference(reference);
        }
コード例 #4
0
        public LocalObjectReferenceHolder(JniEnvironment nativeEnvironment, jobject reference)
        {
            Contract.Requires<ArgumentNullException>(nativeEnvironment != null, "nativeEnvironment");

            _nativeEnvironment = nativeEnvironment;
            _reference = _nativeEnvironment.NewLocalReference(reference);
        }