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()加载中的所有资源IResourceReaderTable,通常在构造函数或延迟在第一个调用为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.

适用于