Partager via


DTSEventFilterKind Enumeration

Describes the kind of event filter that is set on logging.

Espace de noms: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Syntaxe

'Déclaration
Public Enumeration DTSEventFilterKind
public enum DTSEventFilterKind
public enum class DTSEventFilterKind
public enum DTSEventFilterKind
public enum DTSEventFilterKind

Members

Member name Description
Exclusion Indicates that the events added to the event filter are excluded from the event log.
Inclusion Indicates that the events added to the event filter are included in the event log.

Notes

Events are included or excluded from the event log by setting the DTSEventFilterKind of the container. The DTSEventFilterKind enumeration contains two values: Exclusion and Inclusion, which indicate whether the events are included or excluded from the event log.

Exemple

The following code example enables logging on a package, adds a log provider, then displays the default value of the EventFilterKind. Using the DTSEventFilterKind enumeration, the default value is changed.

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

namespace Microsoft.SqlServer.SSIS.Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            Package pkg = new Package();
            pkg.LoggingMode = DTSLoggingMode.Enabled;
            LogProvider log1 = pkg.LogProviders.Add("DTS.LogProviderTextFile.1");
            pkg.LoggingOptions.SelectedLogProviders.Add(log1);
            LoggingOptions lOpts = pkg.LoggingOptions;
            Console.WriteLine("EventFilterKind: {0}", pkg.LoggingOptions.EventFilterKind.ToString());

            pkg.LoggingOptions.EventFilterKind = DTSEventFilterKind.Inclusion;
            Console.WriteLine("EventFilterKind: {0}", pkg.LoggingOptions.EventFilterKind.ToString());
        }
    }
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
 
Namespace Microsoft.SqlServer.SSIS.Sample
    Class Program
        Shared  Sub Main(ByVal args() As String)
            Dim pkg As Package =  New Package() 
            pkg.LoggingMode = DTSLoggingMode.Enabled
            Dim log1 As LogProvider =  pkg.LogProviders.Add("DTS.LogProviderTextFile.1") 
            pkg.LoggingOptions.SelectedLogProviders.Add(log1)
            Dim lOpts As LoggingOptions =  pkg.LoggingOptions 
            Console.WriteLine("EventFilterKind: {0}", pkg.LoggingOptions.EventFilterKind.ToString())
 
            pkg.LoggingOptions.EventFilterKind = DTSEventFilterKind.Inclusion
            Console.WriteLine("EventFilterKind: {0}", pkg.LoggingOptions.EventFilterKind.ToString())
        End Sub
    End Class
End Namespace

Sample Output:

EventFilterKind: Exclusion

EventFilterKind: Inclusion

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

Microsoft.SqlServer.Dts.Runtime Namespace