LoggingOptions.EventFilterKind Property
Gets or sets a value that describes the kind of event filter that is set, whether included or excluded.
Espacio de nombres: Microsoft.SqlServer.Dts.Runtime
Ensamblado: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
Sintaxis
'Declaración
Public Property EventFilterKind As DTSEventFilterKind
public DTSEventFilterKind EventFilterKind { get; set; }
public:
property DTSEventFilterKind EventFilterKind {
DTSEventFilterKind get ();
void set (DTSEventFilterKind value);
}
/** @property */
public DTSEventFilterKind get_EventFilterKind ()
/** @property */
public void set_EventFilterKind (DTSEventFilterKind value)
public function get EventFilterKind () : DTSEventFilterKind
public function set EventFilterKind (value : DTSEventFilterKind)
Valor de propiedad
A value from the DTSEventFilterKind enumeration that indicates whether the events added to the EventFilter are included or excluded from the Event Log.
Notas
For more information, see Enabling Logging Programmatically.
Ejemplo
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
Seguridad para subprocesos
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Plataformas
Plataformas de desarrollo
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Plataformas de destino
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Vea también
Referencia
LoggingOptions Class
LoggingOptions Members
Microsoft.SqlServer.Dts.Runtime Namespace