Share via


BreakpointTarget.Owner Propriété

Définition

Retourne un objet IDTSBreakpointSite pour la tâche qui détient le point d'arrêt.

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

Valeur de propriété

Interface IDTSBreakpointSite.

Exemples

L’exemple de code suivant récupère la collection cible de points d’arrêt à partir du package et effectue une itération dans les points d’arrêt, affichant les propriétés de chaque point d’arrêt, y compris 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  

Exemple de sortie :

BreakOnExpressionChange? False

Arrêt de description lorsque le conteneur reçoit l’événement OnPreExecute

Activé ? False

HitCount 0

HitTarget 0

HitTest Always

ID -2147483647

Propriétaire Microsoft.SqlServer.Dts.Runtime.TaskHost

Remarques

Le site de point d’arrêt est la tâche qui fournit le point d’arrêt. Les tâches qui fournissent des points d’arrêt implémentent l’interface IDTSBreakpointSite . Cette Owner propriété pointe vers la tâche qui a créé la cible de point d’arrêt.

S’applique à