BinaryLogReplayEventSource Class

Definition

Provides a method to read a binary log file (*.binlog) and replay all stored BuildEventArgs by implementing IEventSource and raising corresponding events.

public ref class BinaryLogReplayEventSource sealed : Microsoft::Build::Logging::EventArgsDispatcher
public ref class BinaryLogReplayEventSource sealed : Microsoft::Build::Logging::EventArgsDispatcher, Microsoft::Build::Framework::IEventSource
public sealed class BinaryLogReplayEventSource : Microsoft.Build.Logging.EventArgsDispatcher
public sealed class BinaryLogReplayEventSource : Microsoft.Build.Logging.EventArgsDispatcher, Microsoft.Build.Framework.IEventSource
type BinaryLogReplayEventSource = class
    inherit EventArgsDispatcher
type BinaryLogReplayEventSource = class
    inherit EventArgsDispatcher
    interface IEventSource
    interface IBuildEventArgsReaderNotifications
Public NotInheritable Class BinaryLogReplayEventSource
Inherits EventArgsDispatcher
Public NotInheritable Class BinaryLogReplayEventSource
Inherits EventArgsDispatcher
Implements IEventSource
Inheritance
BinaryLogReplayEventSource
Implements

Remarks

The class is public so that we can call it from MSBuild.exe when replaying a log file.

Constructors

BinaryLogReplayEventSource()

Properties

AllowForwardCompatibility

Unknown build events or unknown parts of known build events will be ignored if this is set to true.

FileFormatVersion
MinimumReaderVersion

Methods

Dispatch(BuildEventArgs)

Raise one of the events that is appropriate for the type of the BuildEventArgs

(Inherited from EventArgsDispatcher)
OpenBuildEventsReader(BinaryReader, Boolean, Boolean)

Creates a BuildEventArgsReader for the provided binary reader over binary log file. Caller is responsible for disposing the returned reader.

OpenBuildEventsReader(String)

Creates a BinaryReader for the provided binary log file. Performs decompression and buffering in the optimal way. Caller is responsible for disposing the returned reader.

OpenReader(Stream)

Creates a BinaryReader for the provided binary log file. Performs decompression and buffering in the optimal way. Caller is responsible for disposing the returned reader.

OpenReader(String)

Creates a BinaryReader for the provided binary log file. Performs decompression and buffering in the optimal way. Caller is responsible for disposing the returned reader.

Replay(BinaryReader, Boolean, CancellationToken)

Read the provided binary log file and raise corresponding events for each BuildEventArgs

Replay(BinaryReader, CancellationToken)

Read the provided binary log file and raise corresponding events for each BuildEventArgs

Replay(BuildEventArgsReader, CancellationToken)

Read the provided binary log file and raise corresponding events for each BuildEventArgs

Replay(Stream, CancellationToken)

Read the provided binary log file opened as a stream and raise corresponding events for each BuildEventArgs

Replay(String)

Read the provided binary log file and raise corresponding events for each BuildEventArgs

Replay(String, CancellationToken)

Read the provided binary log file and raise corresponding events for each BuildEventArgs

Events

AnyEventRaised

This event is raised for all BuildEventArgs objects after a more type-specific event

(Inherited from EventArgsDispatcher)
BuildFinished

Raised for BuildFinishedEventArgs instances

(Inherited from EventArgsDispatcher)
BuildStarted

Raised for BuildStartedEventArgs instances

(Inherited from EventArgsDispatcher)
CustomEventRaised

Raised for CustomBuildEventArgs instances

(Inherited from EventArgsDispatcher)
ErrorRaised

Raised for BuildErrorEventArgs instances

(Inherited from EventArgsDispatcher)
MessageRaised

Raised for BuildMessageEventArgs instances

(Inherited from EventArgsDispatcher)
ProjectFinished

Raised for ProjectFinishedEventArgs instances

(Inherited from EventArgsDispatcher)
ProjectStarted

Raised for ProjectStartedEventArgs instances

(Inherited from EventArgsDispatcher)
RecoverableReadError

Receives recoverable errors during reading. Communicates type of the error, kind of the record that encountered the error and the message detailing the error. In case of UnknownEventData this is raised before returning the structured representation of a build event that has some extra unknown data in the binlog. In case of other error types this event is raised and the offending build event is skipped and not returned.

StatusEventRaised

Raised for BuildStatusEventArgs instances

(Inherited from EventArgsDispatcher)
TargetFinished

Raised for TargetFinishedEventArgs instances

(Inherited from EventArgsDispatcher)
TargetStarted

Raised for TargetStartedEventArgs instances

(Inherited from EventArgsDispatcher)
TaskFinished

Raised for TaskFinishedEventArgs instances

(Inherited from EventArgsDispatcher)
TaskStarted

Raised for TaskStartedEventArgs instances

(Inherited from EventArgsDispatcher)
WarningRaised

Raised for BuildWarningEventArgs instances

(Inherited from EventArgsDispatcher)

Explicit Interface Implementations

IBuildEventArgsReaderNotifications.ArchiveFileEncountered
IBuildEventArgsReaderNotifications.StringReadDone

Extension Methods

HandleAnyEventRaised(IEventSource, AnyEventHandler)

Helper method ensuring single deduplicated subscription to the AnyEventRaised event.

HandleBuildFinished(IEventSource, BuildFinishedEventHandler)

Helper method ensuring single deduplicated subscription to the BuildFinished event.

HandleBuildStarted(IEventSource, BuildStartedEventHandler)

Helper method ensuring single deduplicated subscription to the BuildStarted event.

HandleCustomEventRaised(IEventSource, CustomBuildEventHandler)

Helper method ensuring single deduplicated subscription to the CustomEventRaised event.

HandleErrorRaised(IEventSource, BuildErrorEventHandler)

Helper method ensuring single deduplicated subscription to the ErrorRaised event.

HandleMessageRaised(IEventSource, BuildMessageEventHandler)

Helper method ensuring single deduplicated subscription to the MessageRaised event.

HandleProjectFinished(IEventSource, ProjectFinishedEventHandler)

Helper method ensuring single deduplicated subscription to the ProjectFinished event.

HandleProjectStarted(IEventSource, ProjectStartedEventHandler)

Helper method ensuring single deduplicated subscription to the ProjectStarted event.

HandleStatusEventRaised(IEventSource, BuildStatusEventHandler)

Helper method ensuring single deduplicated subscription to the StatusEventRaised event.

HandleTargetFinished(IEventSource, TargetFinishedEventHandler)

Helper method ensuring single deduplicated subscription to the TargetFinished event.

HandleTargetStarted(IEventSource, TargetStartedEventHandler)

Helper method ensuring single deduplicated subscription to the TargetStarted event.

HandleTaskFinished(IEventSource, TaskFinishedEventHandler)

Helper method ensuring single deduplicated subscription to the TaskFinished event.

HandleTaskStarted(IEventSource, TaskStartedEventHandler)

Helper method ensuring single deduplicated subscription to the TaskStarted event.

HandleWarningRaised(IEventSource, BuildWarningEventHandler)

Helper method ensuring single deduplicated subscription to the WarningRaised event.

Applies to