ResourceSet.ReadResources ResourceSet.ReadResources ResourceSet.ReadResources ResourceSet.ReadResources Method

定义

读取所有资源,并将它们存储在 Hashtable 属性中指示的 Table 中。Reads all the resources and stores them in a Hashtable indicated in the Table property.

protected:
 virtual void ReadResources();
protected virtual void ReadResources ();
abstract member ReadResources : unit -> unit
override this.ReadResources : unit -> unit
Protected Overridable Sub ReadResources ()

继承者说明

ResourceSet的派生类应显式调用ReadResources()以将中的IResourceReader所有资源加载到Table中, 通常是GetString(String)在构造函数中或在首次调用或GetObject(String)时延迟。Derived classes of ResourceSet should explicitly call ReadResources() to load all the resources from the IResourceReader into Table, generally either in the constructor or lazily on the first call to either GetString(String) or GetObject(String). 但是, 如果资源集和 IResourceReader 已具有彼此相关的信息并且具有更有效的方法来加载几个选择的资源, 则可以跳过此步骤。However, if your resource set and IResourceReader already have information about each other and have a more efficient way to load just a few select resources, this step can be skipped. 若要最大程度地减少工作集, 请以这样一种方式编写资源集: 仅查询你的应用程序请求的资源值的 IResourceReader。To minimize working set, write your resource set in such a way that it queries your IResourceReader for only the resource values requested by your application.

适用于