Exemplo n.º 1
0
        /// <summary>
        /// Removes the specified instance as referenced by the specified parent.
        /// </summary>
        public static void RemoveNativeReference(_NativeReference instance, _NativeReference parent)
        {
            WeakReference localRef;

            if (_nativeHolders.TryGetValue(instance.Handle, out localRef))
            {
                var holder = localRef.Target as BinderReferenceHolder;

                if (holder != null && parent != null)
                {
                    holder._newReferences.Remove(parent.Handle);
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds the specified instance as referenced by the specified parent.
        /// </summary>
        public static void AddNativeReference(_NativeReference instance, _NativeReference parent)
        {
            WeakReference localRef;

            if (_nativeHolders.TryGetValue(instance.Handle, out localRef))
            {
                var holder = localRef.Target as BinderReferenceHolder;

                if (holder != null)
                {
                    holder._newReferences[parent.Handle] = Tuple.Create(parent.GetType(), new WeakReference(parent));
                }
            }
        }
 partial void runSampleClick(global::Foundation.NSObject sender);
 partial void viewSourceCodeClick(global::Foundation.NSObject sender);