Esempio n. 1
0
        /// <summary>
        ///     Returns an <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmType" /> object by using the specified type name and the namespace name from this item collection.
        /// </summary>
        /// <returns>true if there is a type that matches the search criteria; otherwise, false. </returns>
        /// <param name="name">The name of the type.</param>
        /// <param name="namespaceName">The namespace of the type.</param>
        /// <param name="ignoreCase">true to perform the case-insensitive search; otherwise, false.</param>
        /// <param name="type">
        ///     When this method returns, this output parameter contains an
        ///     <see
        ///         cref="T:System.Data.Entity.Core.Metadata.Edm.EdmType" />
        ///     object. If there is no type with the specified name and namespace name in this item collection, this output parameter contains null.
        /// </param>
        public bool TryGetType(string name, string namespaceName, bool ignoreCase, out EdmType type)
        {
            Check.NotNull(name, "name");
            Check.NotNull(namespaceName, "namespaceName");
            GlobalItem item = null;

            TryGetValue(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase, out item);
            type = item as EdmType;
            return(type != null);
        }
Esempio n. 2
0
        /// <summary>
        /// Returns an <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmType" /> object by using the specified type name and the namespace name from this item collection.
        /// </summary>
        /// <returns>true if there is a type that matches the search criteria; otherwise, false. </returns>
        /// <param name="name">The name of the type.</param>
        /// <param name="namespaceName">The namespace of the type.</param>
        /// <param name="ignoreCase">true to perform the case-insensitive search; otherwise, false.</param>
        /// <param name="type">
        /// When this method returns, this output parameter contains an
        /// <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmType" />
        /// object. If there is no type with the specified name and namespace name in this item collection, this output parameter contains null.
        /// </param>
        public bool TryGetType(string name, string namespaceName, bool ignoreCase, out EdmType type)
        {
            Check.NotNull <string>(name, nameof(name));
            Check.NotNull <string>(namespaceName, nameof(namespaceName));
            GlobalItem globalItem = (GlobalItem)null;

            this.TryGetValue(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase, out globalItem);
            type = globalItem as EdmType;
            return(type != null);
        }
 internal override void BuildIdentity(StringBuilder builder)
 {
     if (this.CacheIdentity != null)
     {
         builder.Append(this.CacheIdentity);
     }
     else
     {
         builder.Append(EdmType.CreateEdmTypeIdentity(this.NamespaceName, this.Name));
     }
 }
Esempio n. 4
0
 /// <summary>
 ///     Returns an <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmType" /> object by using the specified type name and the namespace name from this item collection.
 /// </summary>
 /// <returns>
 ///     An <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmType" /> object that represents the type that matches the specified type name and the namespace name in this item collection. If there is no matched type, this method returns null.
 /// </returns>
 /// <param name="name">The name of the type.</param>
 /// <param name="namespaceName">The namespace of the type.</param>
 /// <param name="ignoreCase">true to perform the case-insensitive search; otherwise, false.</param>
 public EdmType GetType(string name, string namespaceName, bool ignoreCase)
 {
     Check.NotNull(name, "name");
     Check.NotNull(namespaceName, "namespaceName");
     return(GetItem <EdmType>(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase));
 }