EventLogSession EventLogSession EventLogSession EventLogSession Constructors

定義

多載

EventLogSession() EventLogSession() EventLogSession()

初始化新的 EventLogSession 物件,並建立與本機事件記錄服務的連線。Initializes a new EventLogSession object, establishes a connection with the local Event Log service.

EventLogSession(String) EventLogSession(String) EventLogSession(String) EventLogSession(String)

初始化新的 EventLogSession 物件,並建立與指定電腦上事件記錄服務的連線。Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. 呼叫方法之使用者的認證 (使用者名稱和密碼) 會當做存取遠端電腦的認證來使用。The credentials (user name and password) of the user who calls the method is used for the credentials to access the remote computer.

EventLogSession(String, String, String, SecureString, SessionAuthentication) EventLogSession(String, String, String, SecureString, SessionAuthentication) EventLogSession(String, String, String, SecureString, SessionAuthentication) EventLogSession(String, String, String, SecureString, SessionAuthentication)

初始化新的 EventLogSession 物件,並建立與指定電腦上事件記錄服務的連線。Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. 指定的認證 (使用者名稱和密碼) 會當做存取遠端電腦的認證來使用。The specified credentials (user name and password) are used for the credentials to access the remote computer.

EventLogSession() EventLogSession() EventLogSession()

初始化新的 EventLogSession 物件,並建立與本機事件記錄服務的連線。Initializes a new EventLogSession object, establishes a connection with the local Event Log service.

public:
 EventLogSession();
[System.Security.SecurityCritical]
public EventLogSession ();
Public Sub New ()
另請參閱

EventLogSession(String) EventLogSession(String) EventLogSession(String) EventLogSession(String)

初始化新的 EventLogSession 物件,並建立與指定電腦上事件記錄服務的連線。Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. 呼叫方法之使用者的認證 (使用者名稱和密碼) 會當做存取遠端電腦的認證來使用。The credentials (user name and password) of the user who calls the method is used for the credentials to access the remote computer.

public:
 EventLogSession(System::String ^ server);
public EventLogSession (string server);
new System.Diagnostics.Eventing.Reader.EventLogSession : string -> System.Diagnostics.Eventing.Reader.EventLogSession
Public Sub New (server As String)

參數

server
String String String String

要連接至事件記錄服務的電腦名稱。The name of the computer on which to connect to the Event Log service.

另請參閱

EventLogSession(String, String, String, SecureString, SessionAuthentication) EventLogSession(String, String, String, SecureString, SessionAuthentication) EventLogSession(String, String, String, SecureString, SessionAuthentication) EventLogSession(String, String, String, SecureString, SessionAuthentication)

初始化新的 EventLogSession 物件,並建立與指定電腦上事件記錄服務的連線。Initializes a new EventLogSession object, and establishes a connection with the Event Log service on the specified computer. 指定的認證 (使用者名稱和密碼) 會當做存取遠端電腦的認證來使用。The specified credentials (user name and password) are used for the credentials to access the remote computer.

public:
 EventLogSession(System::String ^ server, System::String ^ domain, System::String ^ user, System::Security::SecureString ^ password, System::Diagnostics::Eventing::Reader::SessionAuthentication logOnType);
[System.Security.SecurityCritical]
public EventLogSession (string server, string domain, string user, System.Security.SecureString password, System.Diagnostics.Eventing.Reader.SessionAuthentication logOnType);
new System.Diagnostics.Eventing.Reader.EventLogSession : string * string * string * System.Security.SecureString * System.Diagnostics.Eventing.Reader.SessionAuthentication -> System.Diagnostics.Eventing.Reader.EventLogSession
Public Sub New (server As String, domain As String, user As String, password As SecureString, logOnType As SessionAuthentication)

參數

server
String String String String

要連接至事件記錄服務的電腦名稱。The name of the computer on which to connect to the Event Log service.

domain
String String String String

指定之使用者的網域。The domain of the specified user.

user
String String String String

用來連接遠端電腦的使用者名稱。The user name used to connect to the remote computer.

password
SecureString SecureString SecureString SecureString

用來連接遠端電腦的密碼。The password used to connect to the remote computer.

logOnType
SessionAuthentication SessionAuthentication SessionAuthentication SessionAuthentication

用來連接遠端電腦的連線類型。The type of connection to use for the connection to the remote computer.

另請參閱

適用於