語言

IExtension.LocalizedName 屬性

定義

取得要在使用者介面中顯示的擴充功能在地名稱。

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 Framework SDK 文件中的「System.Globalization Namespace」。

注意事項

Reporting Services 的擴充類別應該總是提供該LocalizedNameAttribute屬性。 若LocalizedNameAttribute該屬性尚未套用於擴充類別,Reporting Services 引擎將嘗試檢查LocalizedName擴充類別的屬性;因為這需要建構擴充的實例,可能會造成效能損失。

適用於