Ejemplo n.º 1
0
        public int IndexOf(string name)
        {
            NodeDefinition definition = this[name];

            if (definition == null)
            {
                return(-1);
            }
            return(IndexOf(definition));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Add the NodeDefinition to the collection.
        /// If a NodeDefinition already exists with the specified name, it will
        /// be removed before the new NodeDefinition is added.
        /// </summary>
        /// <param name="definition"></param>
        public void Add(NodeDefinition definition)
        {
            NodeDefinition existingDefinition = this[definition.Name];

            if (existingDefinition != null)
            {
                InnerList.Remove(existingDefinition);
            }
            InnerList.Add(definition);
        }
Ejemplo n.º 3
0
 public int IndexOf(NodeDefinition definition)
 {
     return(InnerList.IndexOf(definition));
 }