Table of Contents

Class ResourceAttribute

Namespace
Cuemon.Globalization
Assembly
Cuemon.Core.dll

Provides a generic way to support localization on attribute decorated methods.

public abstract class ResourceAttribute : Attribute
Inheritance
ResourceAttribute
Derived
Inherited Members

Constructors

ResourceAttribute()

Initializes a new instance of the ResourceAttribute class.

protected ResourceAttribute()

Properties

ResourceType

Gets or sets the type that contains the resources for looking up localized strings.

public Type ResourceType { get; set; }

Property Value

Type

The type that contains the resources for looking up localized strings.

Methods

GetString(String)

Returns the value of the specified string resource.

protected string GetString(string name)

Parameters

name String

The name of the resource to retrieve.

Returns

String

The value of the resource localized for the callers current UI culture, or null if name cannot be found on the ResourceType.

Exceptions

InvalidOperationException

You must specify a ResourceType to perform the actual lookup of localized strings.

ArgumentException

The specified ResourceType does not contain a resource with the specified name.

See Also