ObjectItemCollection 类

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

表示对象层的项集合的类。 该集合的实际维护的大部分实现由 ItemCollection 完成

继承层次结构

System.Object
  System.Collections.ObjectModel.ReadOnlyCollection<GlobalItem>
    System.Data.Entity.Core.Metadata.Edm.ReadOnlyMetadataCollection<GlobalItem>
      System.Data.Entity.Core.Metadata.Edm.ItemCollection
        System.Data.Entity.Core.Metadata.Edm.ObjectItemCollection

命名空间:  System.Data.Entity.Core.Metadata.Edm
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Class ObjectItemCollection _
    Inherits ItemCollection
用法
Dim instance As ObjectItemCollection
public class ObjectItemCollection : ItemCollection
public ref class ObjectItemCollection : public ItemCollection
type ObjectItemCollection =  
    class 
        inherit ItemCollection 
    end
public class ObjectItemCollection extends ItemCollection

ObjectItemCollection 类型公开以下成员。

构造函数

  名称 描述
公共方法 ObjectItemCollection 初始化 ObjectItemCollection 类的新实例。

顶部

属性

  名称 描述
公共属性 Count (继承自 ReadOnlyCollection<GlobalItem>。)
公共属性 DataSpace 获取与此项集合关联的数据模型。 (继承自 ItemCollection。)
公共属性 IsReadOnly 获取一个值,该值指示此集合是否是只读的。 (继承自 ReadOnlyMetadataCollection<T>。)
公共属性 Item[Int32] (继承自 ReadOnlyCollection<GlobalItem>。)
公共属性 Item[String] 使用指定的标识从此集合中获取一个项。 (继承自 ReadOnlyMetadataCollection<T>。)
受保护的属性 Items (继承自 ReadOnlyCollection<GlobalItem>。)

顶部

方法

  名称 描述
公共方法 Contains(String) 确定集合中是否包含具有指定标识的项。 (继承自 ReadOnlyMetadataCollection<T>。)
公共方法 Contains(T) (继承自 ReadOnlyCollection<GlobalItem>。)
公共方法 CopyTo (继承自 ReadOnlyCollection<GlobalItem>。)
公共方法 Equals (继承自 Object。)
受保护的方法 Finalize (继承自 Object。)
公共方法 GetClrType(EnumType) 该方法返回指定 OSpace 类型参数的基础 CLR 类型。如果该参数的 DataSpace 不为 OSpace,则引发 ArgumentException。
公共方法 GetClrType(StructuralType) 返回与 objectSpaceType 参数提供的 StructuralType 相对应的 CLR 类型。
公共方法 GetEntityContainer(String) 使用指定的实体容器名称返回一个 EntityContainer 对象。 (继承自 ItemCollection。)
公共方法 GetEntityContainer(String, Boolean) 使用指定的实体容器名称返回一个 EntityContainer 对象。 (继承自 ItemCollection。)
公共方法 GetEnumerator 返回一个可循环访问此集合的枚举器。 (继承自 ReadOnlyMetadataCollection<T>。)
公共方法 GetFunctions(String) 使用指定的名称从此项集合中返回所有函数重载。 (继承自 ItemCollection。)
公共方法 GetFunctions(String, Boolean) 使用指定的名称从此项集合中返回所有函数重载。 (继承自 ItemCollection。)
公共方法 GetHashCode (继承自 Object。)
公共方法 GetItem<T>(String) 使用指定的标识返回一个强类型的 GlobalItem 对象。 (继承自 ItemCollection。)
公共方法 GetItem<T>(String, Boolean) 通过使用指定的标识进行区分大小写或不区分大小写的搜索,返回一个强类型的 GlobalItem 对象。 (继承自 ItemCollection。)
公共方法 GetItems<T> 从此项集合中返回属于指定类型的所有项。 (重写 ItemCollection.GetItems<T>()。)
公共方法 GetPrimitiveTypes 返回基元类型对象集合。
公共方法 GetType() (继承自 Object。)
公共方法 GetType(String, String) 使用指定的类型名称和命名空间名称从此项集合中返回一个 EdmType 对象。 (继承自 ItemCollection。)
公共方法 GetType(String, String, Boolean) 使用指定的类型名称和命名空间名称从此项集合中返回一个 EdmType 对象。 (继承自 ItemCollection。)
公共方法 GetValue 使用指定的标识从此集合中检索一个项。 (继承自 ReadOnlyMetadataCollection<T>。)
公共方法 IndexOf 返回指定的值在此集合中的索引。 (继承自 ReadOnlyMetadataCollection<T>。)
公共方法 LoadFromAssembly(Assembly) 加载给定程序集中的元数据。
公共方法 LoadFromAssembly(Assembly, EdmItemCollection) 从指定的程序集加载元数据。
公共方法 LoadFromAssembly(Assembly, EdmItemCollection, Action<String>) 加载给定程序集中的元数据。
受保护的方法 MemberwiseClone (继承自 Object。)
公共方法 ToString (继承自 Object。)
公共方法 TryGetClrType(EnumType, Type%) 返回指定的枚举类型参数的基础 CLR 类型。如果该参数的 DataSpace 不为 OSpace,则此方法返回 false 并将 out 参数设置为 null。
公共方法 TryGetClrType(StructuralType, Type%) 返回与 objectSpaceType 参数提供的 StructuralType 相对应的 CLR 类型。
公共方法 TryGetEntityContainer(String, EntityContainer%) 使用指定的实体容器名称返回一个 EntityContainer 对象。如果不存在实体容器,该输出参数将包含 null;否则,它将包含第一个实体容器。 (继承自 ItemCollection。)
公共方法 TryGetEntityContainer(String, Boolean, EntityContainer%) 使用指定的实体容器名称返回一个 EntityContainer 对象。如果不存在实体容器,此输出参数将包含 null;否则,它将包含第一个实体容器。 (继承自 ItemCollection。)
公共方法 TryGetItem<T>(String, T%) 使用指定的标识从此项集合中返回一个强类型的 GlobalItem 对象。 (继承自 ItemCollection。)
公共方法 TryGetItem<T>(String, Boolean, T%) 使用指定的标识从此项集合中返回一个强类型的 GlobalItem 对象。 (继承自 ItemCollection。)
公共方法 TryGetType(String, String, EdmType%) 使用指定的类型名称和命名空间名称从此项集合中返回一个 EdmType 对象。 (继承自 ItemCollection。)
公共方法 TryGetType(String, String, Boolean, EdmType%) 使用指定的类型名称和命名空间名称从此项集合中返回一个 EdmType 对象。 (继承自 ItemCollection。)
公共方法 TryGetValue 使用指定的标识从此集合中检索一个项。 (继承自 ReadOnlyMetadataCollection<T>。)

顶部

扩展方法 

  名称 描述
公共扩展方法 GetAllAssociations 检索此 ItemCollection 中所有 AssociationType 元素的可枚举集合 (由 MetadataWorkspaceExtensions 定义。)
公共扩展方法 GetAllAssociationSets 检索此 ItemCollection 中所有 AssociationSet 元素的可枚举集合 (由 MetadataWorkspaceExtensions 定义。)
公共扩展方法 GetAllEntitySets 检索此 ItemCollection 中所有 EntitySet 元素的可枚举集合 (由 MetadataWorkspaceExtensions 定义。)
公共扩展方法 GetAllEntityTypes 检索此 ItemCollection 中所有 EntityType 元素的可枚举集合 (由 MetadataWorkspaceExtensions 定义。)
公共扩展方法 GetEntityContainerName 检索此 ItemCollection 中 &amp;lt;EntityContainer/&amp;gt; 元素的“Name”特性。 (由 MetadataWorkspaceExtensions 定义。)
公共扩展方法 GetNamespace 通过检查首先找到的 StructuralType 检索此 ItemCollection 的命名空间 (由 MetadataWorkspaceExtensions 定义。)

顶部

显式接口实现  

  名称 描述
显式接口实现私有方法 ICollection<T>.Add (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.Add (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 ICollection<T>.Clear (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.Clear (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.Contains (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 ICollection.CopyTo (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IEnumerable.GetEnumerator (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.IndexOf (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList<T>.Insert (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.Insert (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 IList.IsFixedSize (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 ICollection<T>.IsReadOnly (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 IList.IsReadOnly (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 ICollection.IsSynchronized (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 IList<T>.Item (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 IList.Item (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 ICollection<T>.Remove (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.Remove (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList<T>.RemoveAt (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有方法 IList.RemoveAt (继承自 ReadOnlyCollection<GlobalItem>。)
显式接口实现私有属性 ICollection.SyncRoot (继承自 ReadOnlyCollection<GlobalItem>。)

顶部

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

System.Data.Entity.Core.Metadata.Edm 命名空间