EventInfo.Name 属性

定义

获取或设置 EventInfo 的名称。

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

属性值

一个字符串,其中包含该 EventInfo字符串的名称。

实现

示例

下面的代码示例返回类的属性 EventInfo ,包括 Name.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Runtime_API  
{  
    public class DumpEventInfo  
    {  
        static void Main(string[] args)  
        {  
            Package p = new Package();  
            EventInfos eis = p.EventInfos;  
            foreach (EventInfo ei in eis)  
            {  
                Console.Out.Write("Name: ");  
                Console.Out.WriteLine(ei.Name);  
                Console.Out.Write("Creation Name: ");  
                Console.Out.WriteLine(ei.CreationName);  
                Console.Out.Write("Description: ");  
                Console.Out.WriteLine(ei.Description);  
                Console.Out.WriteLine("====");  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Runtime_API  
    Public Class DumpEventInfo  
        Shared  Sub Main(ByVal args() As String)  
            Dim p As Package =  New Package()   
            Dim eis As EventInfos =  p.EventInfos   
            Dim ei As EventInfo  
            For Each ei In eis  
                Console.Out.Write("Name: ")  
                Console.Out.WriteLine(ei.Name)  
                Console.Out.Write("Creation Name: ")  
                Console.Out.WriteLine(ei.CreationName)  
                Console.Out.Write("Description: ")  
                Console.Out.WriteLine(ei.Description)  
                Console.Out.WriteLine("====")  
            Next  
        End Sub  
    End Class  
End Namespace  

示例输出:

名称:OnError

创建名称:OnError

说明:处理错误事件。 用于定义在发生错误时执行的操作。

====

名称:OnExecStatusChanged

创建名称:OnExecStatusChanged

说明:处理执行状态的更改。 用于定义执行状态更改时要执行的操作。

====

名称:OnInformation

创建名称:OnInformation

说明:处理信息事件。 信息事件的编制是任务定义的和特定于任务的任务。

====

名称:OnPostExecute

创建名称:OnPostExecute

说明:处理执行后事件。 用于定义运行包时要执行的后处理操作。

====

名称:OnPostValidate

创建名称:OnPostValidate

说明:处理验证后事件。 用于定义在验证期间要执行的后处理操作。

====

注解

此名称经常出现在图形用户界面中。

适用于