LocalizedNameAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供扩展的本地名称。
public ref class LocalizedNameAttribute : Attribute
public class LocalizedNameAttribute : Attribute
type LocalizedNameAttribute = class
inherit Attribute
Public Class LocalizedNameAttribute
Inherits Attribute
- 继承
-
LocalizedNameAttribute
示例
以下代码片段展示了 LocalizedNameAttribute 被设置在扩展类上的 :
[C#]
namespace PolygonsCRI
{
[LocalizedName("Polygons")]
[Editor(typeof(CustomEditor), typeof(ComponentEditor))]
[ToolboxBitmap(typeof(PolygonsDesigner),"Polygons.ico")]
// this CRI-specific attribute sets the name of the
// custom report item which is referenced by the config
// files and saved in the report definition language
[CustomReportItem("Polygons")]
// the main class for our CRI design-time component
public class PolygonsDesigner : CustomReportItemDesigner
{
...
}
注解
该 LocalizedNameAttribute 类允许调用者在不加载分机的情况下确定分机的本地名称。
注释 要给扩展命名且依赖于用户语言,必须覆盖该 GetLocalizedString 方法。
构造函数
| 名称 | 说明 |
|---|---|
| LocalizedNameAttribute() |
初始化 LocalizedNameAttribute 类的新实例。 |
| LocalizedNameAttribute(String) |
初始化 LocalizedNameAttribute 类的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| Name |
它会获得扩展的本地名称。 |
方法
| 名称 | 说明 |
|---|---|
| Equals(Object) |
判断所提供的对象是否与当前对象相同。 |
| GetHashCode() |
返回该对象的唯一哈希码。 |
| GetLocalizedString(String) |
返回正确的本地化扩展名。 |