示例#1
0
 //==============================================================================
 /// <summary>
 /// Assign the entity at the index in the list with the new entity.
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="index"></param>
 //==============================================================================
 public void storeEntity(TIDSpec entity, int index)
 {
     if ((index > 0) && (index <= infoList.Count))
     {
         infoList[index - 1] = entity;
     }
 }
示例#2
0
 //==============================================================================
 /// <summary>
 /// Swap the positions of two entities in the list
 /// </summary>
 /// <param name="indexA">1-based list index</param>
 /// <param name="indexB">1-based list index</param>
 //==============================================================================
 public void swap(int indexA, int indexB)
 {
     if ((indexA != indexB) && (indexA > 0) && (indexB > 0) &&
         (indexA <= infoList.Count) && (indexB <= infoList.Count))
     {
         TIDSpec temp = infoList[indexA - 1];
         infoList[indexA - 1] = infoList[indexB - 1];
         infoList[indexB - 1] = temp;
     }
 }
示例#3
0
        //==============================================================================
        /// <summary>
        /// Add an entity to the list.
        /// </summary>
        /// <param name="compID">Owning component</param>
        /// <param name="regID">Property or event to identify</param>
        /// <param name="sName">FQName of the component.</param>
        /// <param name="kind">Type of entity</param>
        /// <param name="sType">The DDML description</param>
        /// <param name="matchesRule">True is this entity matches the connect rule.</param>
        /// <returns>The entity that has been added to the internal list.</returns>
        //==============================================================================
        public TIDSpec add(uint compID, uint regID, String sName, int kind, String sType, bool matchesRule)
        {
            TIDSpec entity = new TIDSpec();

            entity.compID      = compID;
            entity.itemID      = regID;
            entity.name        = sName;
            entity.kind        = kind;
            entity.sType       = sType;
            entity.matchesRule = matchesRule;

            infoList.Add(entity);
            return(entity);
        }