Ejemplo n.º 1
0
        internal virtual bool IsAssociatedPeer(IDataDescriptorPeer peer)
        {
            var propertyDescriptor = this as IPropertyDescriptor;

            if (propertyDescriptor == null)
            {
                return(false);
            }

            if (peer != null)
            {
                return(peer.IsAssociatedWithDescriptor(propertyDescriptor));
            }

            return(false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Resolves the object that is considered as "Associated" with the current instance.
        /// </summary>
        internal void UpdateAssociatedPeer(IDataDescriptorPeer peer = null)
        {
            this.DetachAssociatedPeer();

            if (peer == null)
            {
                peer = this.FindAssociatedPeer();
            }

            this.DescriptorPeer = peer;

            if (peer != null)
            {
                peer.OnDescriptorAssociated(this);
            }
        }