Пример #1
0
        protected override JniPeerMembers GetPeerMembers(IJavaPeerable value)
        {
            var peerType = GetThresholdType (value);
            if (peerType == null || value.JniPeerMembers.ManagedPeerType == peerType) {
                return base.GetPeerMembers (value);
            };

            var jniClass  = Java.Interop.TypeManager.GetClassName (GetThresholdClass (value));
            lock (LegacyPeerMembers) {
                JniPeerMembers members;
                if (!LegacyPeerMembers.TryGetValue (jniClass, out members)) {
                    members = new XAPeerMembers (jniClass, peerType);
                    LegacyPeerMembers.Add (jniClass, members);
                }
                return members;
            }
        }
Пример #2
0
        protected override JniPeerMembers GetPeerMembers(IJavaPeerable value)
        {
            var peerType = GetThresholdType(value);

            if (peerType == null || value.JniPeerMembers.ManagedPeerType == peerType)
            {
                return(base.GetPeerMembers(value));
            }
            ;

            var jniClass = Java.Interop.TypeManager.GetClassName(GetThresholdClass(value));

            lock (LegacyPeerMembers) {
                if (!LegacyPeerMembers.TryGetValue(jniClass, out var members))
                {
                    members = new XAPeerMembers(jniClass, peerType);
                    LegacyPeerMembers.Add(jniClass, members);
                }
                return(members);
            }
        }