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); }
/// <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); } }