ResourceManager.InternalGetResourceSet(CultureInfo, Boolean, Boolean) 方法

定义

提供用于查找资源集的实现。

protected:
 virtual System::Resources::ResourceSet ^ InternalGetResourceSet(System::Globalization::CultureInfo ^ culture, bool createIfNotExists, bool tryParents);
protected virtual System.Resources.ResourceSet? InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents);
protected virtual System.Resources.ResourceSet InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents);
abstract member InternalGetResourceSet : System.Globalization.CultureInfo * bool * bool -> System.Resources.ResourceSet
override this.InternalGetResourceSet : System.Globalization.CultureInfo * bool * bool -> System.Resources.ResourceSet
Protected Overridable Function InternalGetResourceSet (culture As CultureInfo, createIfNotExists As Boolean, tryParents As Boolean) As ResourceSet

参数

culture
CultureInfo

要查找的区域性对象。

createIfNotExists
Boolean

true 如果尚未加载资源集,则为加载该资源集;否则,为 false.

tryParents
Boolean

true 如果无法加载资源集,则检查父 CultureInfo 对象;否则为 false

返回

指定的资源集。

例外

主程序集不包含查找资源所需的 .resources 文件。

运行时中出现内部错误。

无法找到与之 culture 关联的附属程序集。

继承者说明

此方法完成查找资源集所需的所有工作,并且可以递归和重新进入。 换句话说,此方法可能会加载程序集并触发事件 AssemblyLoad ,然后调用回 ResourceManager 尚未完全初始化的对象。 为了避免采取额外的锁,此方法不是线程安全的。 GetResourceSet(CultureInfo, Boolean, Boolean) GetString(String)GetObject(String)方法执行所有必要的同步。

适用于

另请参阅