共用方式為


EventArgsDispatcher Class

Definition

An implementation of IEventSource that raises appropriate events for a provided BuildEventArgs object.

public ref class EventArgsDispatcher : Microsoft::Build::Framework::IEventSource
public class EventArgsDispatcher : Microsoft.Build.Framework.IEventSource
type EventArgsDispatcher = class
    interface IEventSource
Public Class EventArgsDispatcher
Implements IEventSource
Inheritance
EventArgsDispatcher
Derived
Implements

Remarks

This class is public because BinaryLogReplayEventSource is a derived class. This is abstracted into its own class because it's a useful single-purpose helper that can be used independently as a generic implementation of IEventSource.

Constructors

EventArgsDispatcher()

Methods

Dispatch(BuildEventArgs)

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

Events

AnyEventRaised

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

BuildFinished

Raised for BuildFinishedEventArgs instances

BuildStarted

Raised for BuildStartedEventArgs instances

CustomEventRaised

Raised for CustomBuildEventArgs instances

ErrorRaised

Raised for BuildErrorEventArgs instances

MessageRaised

Raised for BuildMessageEventArgs instances

ProjectFinished

Raised for ProjectFinishedEventArgs instances

ProjectStarted

Raised for ProjectStartedEventArgs instances

StatusEventRaised

Raised for BuildStatusEventArgs instances

TargetFinished

Raised for TargetFinishedEventArgs instances

TargetStarted

Raised for TargetStartedEventArgs instances

TaskFinished

Raised for TaskFinishedEventArgs instances

TaskStarted

Raised for TaskStartedEventArgs instances

WarningRaised

Raised for BuildWarningEventArgs instances

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