Example #1
0
        /// <summary>
        /// Get an entity container based upon the strong name of the container
        /// If no entity container is found, returns null, else returns the first one/// </summary>
        /// <param name="name">name of the entity container</param>
        /// <param name="ignoreCase">true for case-insensitive lookup</param>
        /// <param name="entityContainer"></param>
        /// <exception cref="System.ArgumentNullException">if name argument is null</exception>
        public bool TryGetEntityContainer(string name, bool ignoreCase, out EntityContainer entityContainer)
        {
            EntityUtil.GenericCheckArgumentNull(name, "name");
            GlobalItem item = null;

            if (TryGetValue(name, ignoreCase, out item) && Helper.IsEntityContainer(item))
            {
                entityContainer = (EntityContainer)item;
                return(true);
            }
            entityContainer = null;
            return(false);
        }