Editare

Partajați prin


ResourceManager Class

Definition

Represents a resource manager that provides convenient access to culture-specific resources at run time.

public ref class ResourceManager
public class ResourceManager
[System.Serializable]
public class ResourceManager
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class ResourceManager
type ResourceManager = class
[<System.Serializable>]
type ResourceManager = class
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ResourceManager = class
Public Class ResourceManager
Inheritance
ResourceManager
Derived
Attributes

Remarks

For more information about this API, see Supplemental API remarks for ResourceManager.

Constructors

ResourceManager()

Initializes a new instance of the ResourceManager class with default values.

ResourceManager(String, Assembly, Type)

Initializes a new instance of the ResourceManager class that uses a specified ResourceSet class to look up resources contained in files with the specified root name in the given assembly.

ResourceManager(String, Assembly)

Initializes a new instance of the ResourceManager class that looks up resources contained in files with the specified root name in the given assembly.

ResourceManager(Type)

Initializes a new instance of the ResourceManager class that looks up resources in satellite assemblies based on information from the specified type object.

Fields

BaseNameField

Specifies the root name of the resource files that the ResourceManager searches for resources.

HeaderVersionNumber

Specifies the version of resource file headers that the current implementation of ResourceManager can interpret and produce.

MagicNumber

Holds the number used to identify resource files.

MainAssembly

Specifies the main assembly that contains the resources.

ResourceSets
Obsolete.

Contains a Hashtable that returns a mapping from cultures to ResourceSet objects.

Properties

BaseName

Gets the root name of the resource files that the ResourceManager searches for resources.

FallbackLocation

Gets or sets the location from which to retrieve default fallback resources.

IgnoreCase

Gets or sets a value that indicates whether the resource manager allows case-insensitive resource lookups in the GetString(String) and GetObject(String) methods.

ResourceSetType

Gets the type of the resource set object that the resource manager uses to construct a ResourceSet object.

Methods

CreateFileBasedResourceManager(String, String, Type)

Returns a ResourceManager object that searches a specific directory instead of an assembly manifest for resources.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetNeutralResourcesLanguage(Assembly)

Returns culture-specific information for the main assembly's default resources by retrieving the value of the NeutralResourcesLanguageAttribute attribute on a specified assembly.

GetObject(String, CultureInfo)

Gets the value of the specified non-string resource localized for the specified culture.

GetObject(String)

Returns the value of the specified non-string resource.

GetResourceFileName(CultureInfo)

Generates the name of the resource file for the given CultureInfo object.

GetResourceSet(CultureInfo, Boolean, Boolean)

Retrieves the resource set for a particular culture.

GetSatelliteContractVersion(Assembly)

Returns the version specified by the SatelliteContractVersionAttribute attribute in the given assembly.

GetStream(String, CultureInfo)

Returns an unmanaged memory stream object from the specified resource, using the specified culture.

GetStream(String)

Returns an unmanaged memory stream object from the specified resource.

GetString(String, CultureInfo)

Returns the value of the string resource localized for the specified culture.

GetString(String)

Returns the value of the specified string resource.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
InternalGetResourceSet(CultureInfo, Boolean, Boolean)

Provides the implementation for finding a resource set.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReleaseAllResources()

Tells the resource manager to call the Close() method on all ResourceSet objects and release all resources.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

Thread Safety

This type is thread safe.

See also