public int IndexOf(string name) { NodeDefinition definition = this[name]; if (definition == null) { return(-1); } return(IndexOf(definition)); }
/// <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); }
public int IndexOf(NodeDefinition definition) { return(InnerList.IndexOf(definition)); }