语言

DtsLogProviderAttribute.IconResource 属性

定义

获取或设置与日志提供者关联的图标。

public:
 property System::String ^ IconResource { System::String ^ get(); void set(System::String ^ value); };
public string IconResource { get; set; }
member this.IconResource : string with get, set
Public Property IconResource As String

属性值

一个字符串,用于识别日志提供者的图标资源。

示例

以下示例展示了一个日志提供者类,它提供图标资源。 在这个例子中,图标文件被命名 MyLogProviderIcon.ico为 ,汇编名为 MyLogProvider

using System;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Microsoft.Samples.SqlServer.Dts  
{  
[DtsLogProvider(LogProviderType = "MyLOG",   
  DisplayName = "MyCustomLogProvider ",   
  Description = "Custom Log Provider")]  
public class MyCustomLogProvider : LogProviderBase  
{  
    // Your custom log provider code here.  
}  
}  
Imports System  
Imports Microsoft.SqlServer.Dts.Runtime  

<DtsLogProvider(LogProviderType:="MyLOG", _  
DisplayName:="MyCustomLogProvider ", _  
Description:="Custom Log Provider")> _  
Public Class MyCustomLogProvider  
  Inherits LogProviderBase  
  ' Your custom log provider code here.  
End Class  

注解

当指定时,该属性识别日志提供者显示时在 SQL Server Data Tools(SSDT)中显示的图标。

字符串应包含汇编的名称和图标文件的名称。 要将图标文件嵌入到装配中,使用Visual Studio .NET,将图标的构建动作属性设置为嵌入式资源

适用于