示例#1
0
        /// <summary>
        /// Search for a type metadata with the specified name and namespace name in the given space.
        /// </summary>
        /// <param name="name">name of the type</param>
        /// <param name="namespaceName">namespace of the type</param>
        /// <param name="ignoreCase">true for case-insensitive lookup</param>
        /// <param name="type">The type that needs to be filled with the return value</param>
        /// <returns>Returns null if no match found.</returns>
        /// <exception cref="System.ArgumentNullException">if name or namespaceName argument is null</exception>
        public bool TryGetType(string name, string namespaceName, bool ignoreCase, out EdmType type)
        {
            EntityUtil.GenericCheckArgumentNull(name, "name");
            EntityUtil.GenericCheckArgumentNull(namespaceName, "namespaceName");
            GlobalItem item = null;

            TryGetValue(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase, out item);
            type = item as EdmType;
            return(type != null);
        }
示例#2
0
 /// <summary>
 /// Search for a type metadata with the specified key.
 /// </summary>
 /// <param name="name">name of the type</param>
 /// <param name="namespaceName">namespace of the type</param>
 /// <param name="ignoreCase">true for case-insensitive lookup</param>
 /// <returns>Returns null if no match found.</returns>
 /// <exception cref="System.ArgumentNullException">Thrown if name or namespaceName arguments passed in are null</exception>
 public EdmType GetType(string name, string namespaceName, bool ignoreCase)
 {
     EntityUtil.GenericCheckArgumentNull(name, "name");
     EntityUtil.GenericCheckArgumentNull(namespaceName, "namespaceName");
     return(GetItem <EdmType>(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase));
 }