BreakpointTarget.Owner Property

Definition

为拥有断点的任务返回 IDTSBreakpointSiteReturns an IDTSBreakpointSite for the task that owns the breakpoint.

public:
 property Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite ^ Owner { Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite Owner { get; }
member this.Owner : Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite
Public ReadOnly Property Owner As IDTSBreakpointSite

Property Value

IDTSBreakpointSite

一个 IDTSBreakpointSite 接口。An IDTSBreakpointSite interface.

Examples

下面的代码示例从包中检索断点目标集合, 并循环访问断点, 并显示每个断点的属性, 包括OwnerThe following code example retrieves the breakpoint target collection from the package and iterates through the breakpoints, displaying the properties for each breakpoint, including Owner.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;  
  
namespace Breakpoint_API  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package pkg = new Package();  
            TaskHost taskHost = (TaskHost)pkg.Executables.Add("STOCK:FileSystemTask");  
            BreakpointTargets bptargets = pkg.GetBreakpointTargets(taskHost, false);  
            foreach (BreakpointTarget bpt in bptargets)  
                {  
                Console.WriteLine("BreakOnExpressionChange? {0}", bpt.BreakOnExpressionChange.ToString());  
                Console.WriteLine("Description              {0}", bpt.Description);  
                Console.WriteLine("Enabled?                 {0}", bpt.Enabled);  
                Console.WriteLine("HitCount                 {0}", bpt.HitCount);  
                Console.WriteLine("HitTarget                {0}", bpt.HitTarget);  
                Console.WriteLine("HitTest                  {0}", bpt.HitTest);  
                Console.WriteLine("ID                       {0}", bpt.ID);  
                Console.WriteLine("Owner                    {0}", bpt.Owner);  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
Imports Microsoft.SqlServer.Dts.Tasks.BulkInsertTask  
  
Namespace Breakpoint_API  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim pkg As Package =  New Package()   
            Dim taskHost As TaskHost = CType(pkg.Executables.Add("STOCK:FileSystemTask"), TaskHost)  
            Dim bptargets As BreakpointTargets =  pkg.GetBreakpointTargets(taskHost,False)   
            Dim bpt As BreakpointTarget  
            For Each bpt In bptargets  
                Console.WriteLine("BreakOnExpressionChange? {0}", bpt.BreakOnExpressionChange.ToString())  
                Console.WriteLine("Description              {0}", bpt.Description)  
                Console.WriteLine("Enabled?                 {0}", bpt.Enabled)  
                Console.WriteLine("HitCount                 {0}", bpt.HitCount)  
                Console.WriteLine("HitTarget                {0}", bpt.HitTarget)  
                Console.WriteLine("HitTest                  {0}", bpt.HitTest)  
                Console.WriteLine("ID                       {0}", bpt.ID)  
                Console.WriteLine("Owner                    {0}", bpt.Owner)  
            Next  
        End Sub  
    End Class  
End Namespace  

示例输出:Sample Output:

BreakOnExpressionChange?BreakOnExpressionChange? FalseFalse

当容器接收到 OnPreExecute 事件时的说明中断Description Break when the container receives the OnPreExecute event

能够?Enabled? FalseFalse

点击次数0HitCount 0

HitTarget 0HitTarget 0

System.windows.media.visualtreehelper.hittestHitTest Always

ID-2147483647ID -2147483647

TaskHost 的所有者。Owner Microsoft.SqlServer.Dts.Runtime.TaskHost

Remarks

断点站点是提供断点的任务。The breakpoint site is the task that is providing the breakpoint. 提供断点的任务实现IDTSBreakpointSite接口。Tasks that provide breakpoints implement the IDTSBreakpointSite interface. Owner属性指向创建断点目标的任务。This Owner property points back to the task that created the breakpoint target.

Applies to