อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


ResourceManager.InternalGetResourceSet(CultureInfo, Boolean, Boolean) Method

Definition

Provides the implementation for finding a resource set.

C#
protected virtual System.Resources.ResourceSet? InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents);
C#
protected virtual System.Resources.ResourceSet InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents);

Parameters

culture
CultureInfo

The culture object to look for.

createIfNotExists
Boolean

true to load the resource set, if it has not been loaded yet; otherwise, false.

tryParents
Boolean

true to check parent CultureInfo objects if the resource set cannot be loaded; otherwise, false.

Returns

The specified resource set.

Exceptions

The main assembly does not contain a .resources file, which is required to look up a resource.

There was an internal error in the runtime.

The satellite assembly associated with culture could not be located.

Notes to Inheritors

This method completes all the work necessary to find a resource set, and can be recursive and reentrant. In other words, this method might load an assembly and trigger an AssemblyLoad event, which then calls back into a ResourceManager object that has not been completely initialized. To avoid taking extra locks, this method is not thread safe. The GetResourceSet(CultureInfo, Boolean, Boolean), GetString(String), and GetObject(String) methods do all the necessary synchronization.

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also