BuildEventArgs Constructors

Definition

Initializes a new instance of the BuildEventArgs class.

Overloads

BuildEventArgs()

Default constructor

BuildEventArgs(String, String, String)

This constructor allows all event data to be initialized

BuildEventArgs(String, String, String, DateTime)

This constructor allows all event data to be initialized while providing a custom timestamp.

BuildEventArgs()

Source:
BuildEventArgs.cs

Default constructor

C#
protected BuildEventArgs();

Remarks

This implementation of the BuildEventArgs constructor takes no parameters, and sets the Timestamp property to Now and the ThreadId property to the current thread.

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

BuildEventArgs(String, String, String)

Source:
BuildEventArgs.cs

This constructor allows all event data to be initialized

C#
protected BuildEventArgs(string message, string helpKeyword, string senderName);
C#
protected BuildEventArgs(string? message, string? helpKeyword, string? senderName);

Parameters

message
String

text message

helpKeyword
String

help keyword

senderName
String

name of event sender

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

BuildEventArgs(String, String, String, DateTime)

Source:
BuildEventArgs.cs

This constructor allows all event data to be initialized while providing a custom timestamp.

C#
protected BuildEventArgs(string message, string helpKeyword, string senderName, DateTime eventTimestamp);
C#
protected BuildEventArgs(string? message, string? helpKeyword, string? senderName, DateTime eventTimestamp);

Parameters

message
String

text message

helpKeyword
String

help keyword

senderName
String

name of event sender

eventTimestamp
DateTime

TimeStamp of when the event was created

Applies to

MSBuild 17 and other versions
Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17