다음을 통해 공유


BuildEventArgsReader Class

Definition

Deserializes and returns BuildEventArgs-derived objects from a BinaryReader.

public ref class BuildEventArgsReader : IDisposable
public ref class BuildEventArgsReader : IDisposable, Microsoft::Build::Logging::IBuildEventArgsReaderNotifications
public class BuildEventArgsReader : IDisposable
public class BuildEventArgsReader : IDisposable, Microsoft.Build.Logging.IBuildEventArgsReaderNotifications
type BuildEventArgsReader = class
    interface IDisposable
type BuildEventArgsReader = class
    interface IBuildEventArgsReaderNotifications
    interface IDisposable
Public Class BuildEventArgsReader
Implements IDisposable
Public Class BuildEventArgsReader
Implements IBuildEventArgsReaderNotifications, IDisposable
Inheritance
BuildEventArgsReader
Implements

Constructors

BuildEventArgsReader(BinaryReader, Int32)

Initializes a new instance of BuildEventArgsReader using a BinaryReader instance.

Properties

CloseInput

Directs whether the passed BinaryReader should be closed when this instance is disposed. Defaults to "false".

SkipUnknownEventParts

Indicates whether unread parts of BuildEvents (probably added in newer format of particular BuildEvent)should be silently skipped. Exception thrown otherwise. Parameter is supported only if the file format supports forward compatible reading (version is 18 or higher).

SkipUnknownEvents

Indicates whether unknown BuildEvents should be silently skipped. Read returns null otherwise. Parameter is supported only if the file format supports forward compatible reading (version is 18 or higher).

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Read()

Reads the next log record from the BinaryReader.

Events

ArchiveFileEncountered

An event that allows the caller to be notified when an embedded file is encountered in the binary log. When subscriber is OK with greedy reading entire content of the file and is interested only in the individual strings (e.g. for sensitive data redaction purposes), it can simplify subscribing to this event, by using handler with same signature as handler for StringReadDone and wrapping it via ToArchiveFileHandler(Action<StringReadEventArgs>) extension.

RecoverableReadError

Receives recoverable errors during reading. See RecoverableReadError for documentation on arguments. Applicable mainly when SkipUnknownEvents or SkipUnknownEventParts is set to true."/>

StringReadDone

An event that allows the subscriber to be notified when a string is read from the binary log. Subscriber may adjust the string by setting StringToBeUsed property. The passed event arg can be reused and should not be stored.

Applies to