Ejemplo n.º 1
0
        /// <summary>
        /// Returns item with specified name from given collection, if found
        /// </summary>
        public static ProjectItem GetItem(this ProjectItems items, string name)
        {
            if (items == null)
            {
                return(null);
            }

            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }
            else
            {
                if (items.ContainsItem(name))
                {
                    return(items.Item(name));
                }
                else
                {
                    return(null);
                }
            }
        }