Share via


DtsTaskAttribute Constructor

Definition

Initializes a new instance of the DtsTaskAttribute class.

public:
 DtsTaskAttribute();
public DtsTaskAttribute ();
Public Sub New ()

Examples

The following example shows a class that implements this attribute. These attributes allow the runtime to enumerate the task and associate the task's user interface with the task. The UITypeName must match the name of the task user interface in the custom task's namespace.

using System;  
using Microsoft.SqlServer.Dts.Runtime;  
namespace Microsoft.SSIS.Samples  
{  
  [DtsTask  
  (  
   DisplayName = "MyTask",  
   IconResource = "MyTask.MyTaskIcon.ico",  
   UITypeName = "My Custom Task," +  
   "Version=1.0.0.0," +  
   "Culture = Neutral," +  
   "PublicKeyToken = 12345abc6789de01",  
   TaskType = "PackageMaintenance",  
   TaskContact = "MyTask; company name; any other information",  
   RequiredProductLevel = DTSProductLevel.None  
   )]  
  public class MyTask : Task  
  {  
    // Your code here.  
  }  
}  
Imports System  
Imports Microsoft.SqlServer.Dts.Runtime  

<DtsTask(DisplayName:="MyTask", _  
 IconResource:="MyTask.MyTaskIcon.ico", _  
 UITypeName:="My Custom Task," & _  
 "Version=1.0.0.0,Culture=Neutral," & _  
 "PublicKeyToken=12345abc6789de01", _  
 TaskType:="PackageMaintenance", _  
 TaskContact:="MyTask; company name; any other information", _  
 RequiredProductLevel:=DTSProductLevel.None)> _  
Public Class MyTask  
  Inherits Task  

  ' Your code here.  

End Class 'MyTask  

Applies to