IExtension.LocalizedName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取扩展的本地化名称,以便在用户界面中显示。
public:
property System::String ^ LocalizedName { System::String ^ get(); };
public string LocalizedName { get; }
member this.LocalizedName : string
Public ReadOnly Property LocalizedName As String
属性值
延伸线的本地名称。
示例
以下代码片段展示了 LocalizedNameAttribute 被设置在扩展类上的 :
`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`
`{`
`...`
`}`
注解
报告服务器调用该 LocalizedName 属性以获取扩展的本地化名称。 你的扩展应该根据调用线程所在的位置设置本地化名称。 你可以在 System.Globalization 命名空间中使用 CultureInfo 类来发现线程的区域设置。 欲了解更多信息,请参阅Microsoft .NET框架SDK文档中的“System.Globalization Namespace”。
注释
Reporting Services 的扩展类应始终提供该LocalizedNameAttribute属性。 如果LocalizedNameAttribute该属性尚未应用于扩展类,Reporting Services 引擎将尝试检查LocalizedName扩展类的属性;因为这需要构建扩展实例,可能会带来性能损失。