共用方式為


EventSourceExtensions.HandleMessageRaised Method

Definition

Helper method ensuring single deduplicated subscription to the MessageRaised event.

public:
[System::Runtime::CompilerServices::Extension]
 static void HandleMessageRaised(Microsoft::Build::Framework::IEventSource ^ eventSource, Microsoft::Build::Framework::BuildMessageEventHandler ^ handler);
public static void HandleMessageRaised (this Microsoft.Build.Framework.IEventSource eventSource, Microsoft.Build.Framework.BuildMessageEventHandler handler);
static member HandleMessageRaised : Microsoft.Build.Framework.IEventSource * Microsoft.Build.Framework.BuildMessageEventHandler -> unit
<Extension()>
Public Sub HandleMessageRaised (eventSource As IEventSource, handler As BuildMessageEventHandler)

Parameters

eventSource
IEventSource
handler
BuildMessageEventHandler

Handler to the event. If this handler is already subscribed, single subscription will be ensured.

Applies to