public DvMediaReference AddDvMediaReference(DvMediaItem underlyingItem)
        {
            underlyingItem.LockReferenceList();

            DvMediaReference newItem = underlyingItem.CreateDvMediaReference();

            this.AddObject(newItem, false);

            underlyingItem.UnlockReferenceList();

            return(newItem);
        }
        public DvMediaReference CreateDvMediaReference()
        {
            lock (this.m_LockReferences)
            {
                if (this.m_Deleting == false)
                {
                    DvMediaReference newItem = new DvMediaReference(this);
                    if (m_ReferringItems == null)
                    {
                        this.m_ReferringItems = new ArrayList(1);
                    }

                    this.m_ReferringItems.Add(newItem);

                    return(newItem);
                }
                else
                {
                    throw new Error_PendingDeleteException(this);
                }
            }
        }