EventLogReader.ReadEvent 方法
定义
读取从此对象中的事件查询返回的下一个事件。Reads the next event that is returned from the event query in this object.
重载
| ReadEvent() |
读取从此对象中的事件查询返回的下一个事件。Reads the next event that is returned from the event query in this object. |
| ReadEvent(TimeSpan) |
读取从此对象中的事件查询返回的下一个事件。Reads the next event that is returned from the event query in this object. |
ReadEvent()
读取从此对象中的事件查询返回的下一个事件。Reads the next event that is returned from the event query in this object.
public:
System::Diagnostics::Eventing::Reader::EventRecord ^ ReadEvent();
public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent ();
member this.ReadEvent : unit -> System.Diagnostics.Eventing.Reader.EventRecord
Public Function ReadEvent () As EventRecord
返回
返回一个 EventRecord 对象。Returns an EventRecord object.
示例
有关使用此类的代码示例,请参阅 如何:查询事件。For example code using this class, see How To: Query for Events.
适用于
ReadEvent(TimeSpan)
读取从此对象中的事件查询返回的下一个事件。Reads the next event that is returned from the event query in this object.
public:
System::Diagnostics::Eventing::Reader::EventRecord ^ ReadEvent(TimeSpan timeout);
public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent (TimeSpan timeout);
[System.Security.SecurityCritical]
public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent (TimeSpan timeout);
member this.ReadEvent : TimeSpan -> System.Diagnostics.Eventing.Reader.EventRecord
[<System.Security.SecurityCritical>]
member this.ReadEvent : TimeSpan -> System.Diagnostics.Eventing.Reader.EventRecord
Public Function ReadEvent (timeout As TimeSpan) As EventRecord
参数
- timeout
- TimeSpan
取消读取操作前允许该操作运行的最大时间。The maximum time to allow the read operation to run before canceling the operation.
返回
返回一个 EventRecord 对象。Returns an EventRecord object.
- 属性