コード例 #1
0
 /// <summary>
 /// Determines whether the <see cref="BaseInformationEntityList"/> contains a specific element.
 /// </summary>
 /// <param name="value">The <see cref="BaseInformationEntity"/> to locate in the <see cref="BaseInformationEntityList"/>.</param>
 /// <returns>
 /// <c>true</c> if the <see cref="BaseInformationEntityList"/> contains the specified value; 
 /// otherwise, <c>false</c>.
 /// </returns>
 public bool Contains(BaseInformationEntity value)
 {
     // If value is not of type Code, this will return false.
     return (List.Contains(value));
 }
コード例 #2
0
 /// <summary>
 /// Copies the elements of the <see cref="ICollection"/> to a strong-typed <c>BaseInformationEntity[]</c>, 
 /// starting at a particular <c>BaseInformationEntity[]</c> index.
 /// </summary>
 /// <param name="array">
 /// The one-dimensional <c>BaseInformationEntity[]</c> that is the destination of the elements 
 /// copied from <see cref="ICollection"/>.
 /// The <c>BaseInformationEntity[]</c> must have zero-based indexing. 
 /// </param>
 /// <param name="index">
 /// The zero-based index in array at which copying begins.
 /// </param>
 /// <remarks>
 /// Provides the strongly typed member for <see cref="ICollection"/>.
 /// </remarks>
 public void CopyTo(BaseInformationEntity[] array, int index)
 {
     ((ICollection)this).CopyTo(array, index);
 }
コード例 #3
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="BaseInformationEntity"/> from the <see cref="BaseInformationEntityList"/>.
 /// </summary>
 /// <param name="value">The <see cref="BaseInformationEntity"/> to remove from the <see cref="BaseInformationEntityList"/>.</param>
 public void Remove(BaseInformationEntity value)
 {
     List.Remove(value);
 }
コード例 #4
0
 /// <summary>
 /// Adds an object to the end of the <see cref="BaseInformationEntityList"/>.
 /// </summary>
 /// <param name="value">The <see cref="BaseInformationEntity"/> to be added to the end of the <see cref="BaseInformationEntityList"/>.</param>
 /// <returns>The <see cref="BaseInformationEntityList"/> index at which the value has been added.</returns>
 public int Add(BaseInformationEntity value)
 {
     return (List.Add(value));
 }
コード例 #5
0
 /// <summary>
 /// Inserts an <see cref="BaseInformationEntity"/> element into the <see cref="BaseInformationEntity"/> at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="value">The <see cref="BaseInformationEntityList"/> to insert.</param>
 public void Insert(int index, BaseInformationEntity value)
 {
     List.Insert(index, value);
 }
コード例 #6
0
 /// <summary>
 /// Searches for the specified <see cref="BaseInformationEntity"/> and 
 /// returns the zero-based index of the first occurrence within the entire <see cref="BaseInformationEntityList"/>.
 /// </summary>
 /// <param name="value">The <see cref="BaseInformationEntity"/> to locate in the <see cref="BaseInformationEntityList"/>.</param>
 /// <returns>
 /// The zero-based index of the first occurrence of value within the entire <see cref="BaseInformationEntityList"/>, 
 /// if found; otherwise, -1.
 /// </returns>
 public int IndexOf(BaseInformationEntity value)
 {
     return (List.IndexOf(value));
 }
コード例 #7
0
ファイル: BaseInformationEntity.cs プロジェクト: ewcasas/DVTK
 /// <summary>
 /// Add a child Entity to this.
 /// </summary>
 /// <param name="informationEntity">Child Entity being added.</param>
 public void AddChild(BaseInformationEntity informationEntity)
 {
     informationEntity._parent = this;
     _children.Add(informationEntity);
 }
コード例 #8
0
ファイル: BaseInformationEntity.cs プロジェクト: ewcasas/DVTK
        private bool IsTagFoundInParent(BaseInformationEntity infoEntity,TagType tag)
        {
            if (infoEntity.Parent == null)
                return false;
            if(IsTagFoundInParent(infoEntity.Parent,tag))
            {
                return true;
            }
            if(TagTypeList==null)
                return false;

            foreach (TagType actTag in infoEntity.Parent.TagTypeList)
            {
                if (actTag.Tag.ElementNumber == tag.Tag.ElementNumber &&
                    actTag.Tag.GroupNumber == tag.Tag.GroupNumber
                    )
                {
                    return true;
                }

            }
            return false;
        }
コード例 #9
0
ファイル: BaseInformationEntity.cs プロジェクト: ewcasas/DVTK
        private bool IsTagFoundInChildren(BaseInformationEntity infoEntity, TagType tag)
        {
            if(infoEntity.Children ==null||infoEntity.Children.Count==0)
            {
                return false;
            }
            for (int i = 0; i < infoEntity.Children.Count; i++)
            {
                if (IsTagFoundInChildren(infoEntity.Children[i], tag))
                    return true;
                foreach (TagType actTag in infoEntity.Children[i].TagTypeList)
                {
                    if (actTag.Tag.ElementNumber == tag.Tag.ElementNumber &&
                        actTag.Tag.GroupNumber == tag.Tag.GroupNumber
                        )
                    {
                        return true;
                    }

                }
            }
                return false;
        }