Ejemplo n.º 1
0
        /// <summary>
        /// Returns the resource using a hash table indexed by the names
        /// </summary>
        /// <param name="name">Name of the resource</param>
        /// <returns>The resource or null if no resource of the given name exists</returns>
        public static BasicResource GetResourceByName(string name)
        {
            int idx = KnowledgeBase.IndexByName(name);

            if (idx == -1)
            {
                return(null);
            }

            return(GetResource(idx));
        }