Represents a resource manager that provides convenient access to culture-specific resources at run time.Security Note: Calling methods in this class with untrusted data is a security risk. Call the methods in the class only with trusted data. For more information, see Untrusted Data Security Risks. (资源卫星程序集)
ResourcesSatellite
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| GetObject | 2 | Gets the value of the specified non-string resource localized for the specified culture. |
| GetStream | 2 | Returns an unmanaged memory stream object from the specified resource, using the specified culture. |
| GetString | 2 | Returns the value of the string resource localized for the specified culture. |
| .ctor | 3 | 默认是App.HOME/Resources/assmFile |
| LoadMy | 1 | 从自身的程序集之中加载数据 |
| DirectLoadFrom | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| FileName | 1 | The file path of the resources satellite assembly. |
| Resources | 1 | ResourceManager object in the satellite assembly. |
| MyResource | 1 | Returns the cached ResourceManager instance used by this class. |
04 Members
String)Returns the value of the specified non-string resource.
| Name | Type | Description |
|---|---|---|
name | String | The name of the resource to get. |
The value of the resource localized for the caller's current culture settings. If an appropriate resource set exists but name cannot be found, the method returns null.
String, CultureInfo)Gets the value of the specified non-string resource localized for the specified culture.
| Name | Type | Description |
|---|---|---|
name | String | The name of the resource to get. |
culture | CultureInfo | The culture for which the resource is localized. If the resource is not localized for this culture, the resource manager uses fallback rules to locate an appropriate resource.If this value is null, the System.Globalization.CultureInfo object is obtained by using the System.Globalization.CultureInfo.CurrentUICulture property. |
The value of the resource, localized for the specified culture. If an appropriate resource set exists but name cannot be found, the method returns null.
String)Returns an unmanaged memory stream object from the specified resource.
| Name | Type | Description |
|---|---|---|
name | String | The name of a resource. |
An unmanaged memory stream object that represents a resource .
String, CultureInfo)Returns an unmanaged memory stream object from the specified resource, using the specified culture.
| Name | Type | Description |
|---|---|---|
name | String | The name of a resource. |
culture | CultureInfo | An object that specifies the culture to use for the resource lookup. If culture is null, the culture for the current thread is used. |
An unmanaged memory stream object that represents a resource.
String)Returns the value of the specified string resource.
| Name | Type | Description |
|---|---|---|
name | String | The name of the resource to retrieve. |
The value of the resource localized for the caller's current UI culture, or null if name cannot be found in a resource set.
String, CultureInfo)Returns the value of the string resource localized for the specified culture.
| Name | Type | Description |
|---|---|---|
name | String | The name of the resource to retrieve. |
culture | CultureInfo | An object that represents the culture for which the resource is localized. |
The value of the resource localized for the specified culture, or null if name cannot be found in a resource set.
Type)Load external resource data from current module's satellite assembly.
| Name | Type | Description |
|---|---|---|
type | Type | - |
Assembly)默认是App.HOME/Resources/assmFile
| Name | Type | Description |
|---|---|---|
assm | Assembly | - |
Type, Assembly)| Name | Type | Description |
|---|---|---|
my | Type | null |
assm | Assembly | - |
从自身的程序集之中加载数据
The file path of the resources satellite assembly.
ResourceManager object in the satellite assembly.
Returns the cached ResourceManager instance used by this class.
Assembly)