EventCollector Constructor (NSApplication, String)
Creates and initializes an instance of the EventCollector class.
네임스페이스: Microsoft.SqlServer.NotificationServices
어셈블리: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)
구문
‘선언
Public Sub New ( _
nsApplication As NSApplication, _
providerName As String _
)
public EventCollector (
NSApplication nsApplication,
string providerName
)
public:
EventCollector (
NSApplication^ nsApplication,
String^ providerName
)
public EventCollector (
NSApplication nsApplication,
String providerName
)
public function EventCollector (
nsApplication : NSApplication,
providerName : String
)
매개 변수
- nsApplication
An NSApplication that represents the Notification Services application to which this EventCollector submits events. This value is necessary for gathering event statistics for the given event provider.
- providerName
A String containing the name of the event provider for this event collector.
예
The following examples show how to create and initialize an EventCollector object in managed code.
These examples use the Microsoft.SqlServer.NotificationServices namespace.
Dim instanceName As String = "MyInstanceName"
Dim applicationName As String = "MyApplicationName"
Dim eventProviderName As String = "MyEventProviderName"
'Create an NSInstance object.
Dim myInstance As New NSInstance(instanceName)
'Create an NSApplication object.
Dim myApplication As New NSApplication(myInstance, applicationName)
'Create an EventCollector object.
Dim myEventCollector As _
New EventCollector(myApplication, eventProviderName)
string instanceName = "MyInstanceName";
string applicationName = "MyApplicationName";
string eventProviderName = "MyEventProviderName";
//Create an NSInstance object.
NSInstance myInstance = new NSInstance(instanceName);
//Create an NSApplication object.
NSApplication myApplication =
new NSApplication(myInstance, applicationName);
//Create an EventCollector object.
EventCollector myEventCollector =
new EventCollector(myApplication, eventProviderName);
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
EventCollector Class
EventCollector Members
Microsoft.SqlServer.NotificationServices Namespace