4 types derived from BuildEventArgs
Microsoft.Build.Framework (4)
BuildCheck\BuildCheckEventArgs.cs (1)
15internal abstract class BuildCheckEventArgs : BuildEventArgs
LazyFormattedBuildEventArgs.cs (1)
15public class LazyFormattedBuildEventArgs : BuildEventArgs
Telemetry\WorkerNodeTelemetryEventArgs.cs (1)
10internal sealed class WorkerNodeTelemetryEventArgs(IWorkerNodeTelemetryData workerNodeTelemetryData) : BuildEventArgs
TelemetryEventArgs.cs (1)
14public sealed class TelemetryEventArgs : BuildEventArgs
197 references to BuildEventArgs
Microsoft.Build (154)
BackEnd\BuildManager\BuildManager.cs (8)
208private readonly Dictionary<int, BuildEventArgs> _projectStartedEvents; 326_projectStartedEvents = new Dictionary<int, BuildEventArgs>(); 447/// public deferred-message contract; callers set it via the <see cref="BuildEventArgs"/> constructor. 449internal BuildEventArgs? BuildEvent { get; } 486/// Creates a deferred message backed by a pre-built <see cref="BuildEventArgs"/>. When the build 493public DeferredBuildMessage(BuildEventArgs buildEvent) 3007BuildEventContext buildEventContext = _projectStartedEvents.TryGetValue(result.SubmissionId, out BuildEventArgs? buildEventArgs) 3435if (_projectStartedEvents.TryGetValue(e.BuildEventContext!.SubmissionId, out var originalArgs))
BackEnd\Components\Communications\LogMessagePacket.cs (4)
35internal LogMessagePacket(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 68protected override void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 84protected override BuildEventArgs ReadEventFromStream(LoggingEventType eventType, ITranslator translator) 495protected override void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent)
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (3)
124public void Consume(BuildEventArgs buildEvent) 133public void Consume(BuildEventArgs buildEvent, int sinkId) 147LogMessagePacket logPacket = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(sinkId, buildEvent));
BackEnd\Components\Logging\CentralForwardingLogger.cs (1)
115private void EventSource_AnyEventRaised(object sender, BuildEventArgs buildEvent)
BackEnd\Components\Logging\EventRedirectorToSink.cs (1)
51void IEventRedirector.ForwardEvent(BuildEventArgs buildEvent)
BackEnd\Components\Logging\EventSourceSink.cs (3)
221public void Consume(BuildEventArgs buildEvent, int sinkId) 234public void Consume(BuildEventArgs buildEvent) 403private void RaiseAnyEvent(BuildEventArgs buildEvent)
BackEnd\Components\Logging\ILoggingService.cs (3)
405void LogBuildEvent(BuildEventArgs buildEvent); 733void Consume(BuildEventArgs buildEvent, int sinkId); 738void Consume(BuildEventArgs buildEvent);
BackEnd\Components\Logging\LoggingContext.cs (1)
290internal void LogBuildEvent(BuildEventArgs buildEvent)
BackEnd\Components\Logging\LoggingService.cs (13)
1322public void LogBuildEvent(BuildEventArgs buildEvent) 1611private static WarningsConfigKey GetWarningsConfigKey(BuildEventArgs buildEventArgs) 1805BuildEventArgs buildEventArgs = loggingEvent as BuildEventArgs ?? (loggingEvent as KeyValuePair<int, BuildEventArgs>?)?.Value; 1936if (loggingEvent is BuildEventArgs) 1940else if (loggingEvent is KeyValuePair<int, BuildEventArgs> loggingEventKeyValuePair) 1945loggingEventKeyValuePair = new KeyValuePair<int, BuildEventArgs>(loggingEventKeyValuePair.Key, buildEventArgs); 1955private void RouteBuildEvent(KeyValuePair<int, BuildEventArgs> nodeEvent) 1974private void RouteBuildEvent(BuildEventArgs eventArg) 2153private void TryRaiseProjectStartedEvent(BuildEventArgs args) 2170private void TryRaiseProjectFinishedEvent(BuildEventArgs args) 2187private string GetAndVerifyProjectFileFromContext(BuildEventArgs eventArgs, bool allowCacheMiss)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
52BuildEventArgs.ResourceStringFormatter = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword;
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
1158internal bool IsEventSerializable(BuildEventArgs e)
BackEnd\Node\OutOfProcNode.cs (1)
621BuildEventArgs buildEvent = logMessage.NodeBuildEvent.Value.Value;
BuildCheck\API\BuildCheckResult.cs (1)
30internal BuildEventArgs ToEventArgs(CheckResultSeverity severity)
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (6)
20private Dictionary<Type, Action<BuildEventArgs>> _eventHandlers; 21private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlersFull; 22private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlersRestore; 57public void HandleBuildEvent(BuildEventArgs e) 59if (_eventHandlers.TryGetValue(e.GetType(), out Action<BuildEventArgs>? handler)) 213private BuildEventContext GetBuildEventContext(BuildEventArgs e) => e.BuildEventContext
BuildCheck\Infrastructure\BuildCheckConnectorLogger.cs (1)
50private void EventSource_AnyEventRaised(object sender, BuildEventArgs e)
BuildCheck\Infrastructure\BuildCheckForwardingLogger.cs (1)
52public void EventSource_AnyEventRaised(object sender, BuildEventArgs buildEvent)
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (4)
653foreach (BuildEventArgs deferredArgs in list) 663private readonly Dictionary<int, List<BuildEventArgs>> _deferredEvalDiagnostics = new(); 680void IResultReporter.ReportResult(BuildEventArgs eventArgs, ICheckContext checkContext) 795void ReportResult(BuildEventArgs result, ICheckContext checkContext);
BuildCheck\Infrastructure\CheckContext\CheckDispatchingContext.cs (1)
31public void DispatchBuildEvent(BuildEventArgs buildEvent)
BuildCheck\Infrastructure\CheckContext\CheckLoggingContext.cs (1)
26public void DispatchBuildEvent(BuildEventArgs buildEvent)
BuildCheck\Infrastructure\CheckContext\ICheckContext.cs (2)
27/// Dispatch a <see cref="BuildEventArgs"/>. 29void DispatchBuildEvent(BuildEventArgs buildEvent);
BuildCheck\Infrastructure\CheckWrapper.cs (1)
158BuildEventArgs eventArgs = result.ToEventArgs(config.Severity);
Errors\InternalLoggerException.cs (6)
87BuildEventArgs e, 118e = (BuildEventArgs)info.GetValue("e", typeof(BuildEventArgs)); 188public BuildEventArgs BuildEventArgs 251BuildEventArgs e, 266private BuildEventArgs e;
Instance\TaskFactories\TaskHostTask.cs (1)
757BuildEventArgs buildEvent = logMessagePacket.NodeBuildEvent.Value.Value;
Instance\TaskFactoryEngineContext.cs (1)
382internal bool IsEventSerializable(BuildEventArgs e)
Logging\BinaryLogger\BinaryLogger.cs (4)
714private void EventSource_AnyEventRaised(object sender, BuildEventArgs e) 719private void Write(BuildEventArgs e, BinaryLogRecordKind? recordKind = null) 759private static bool DoNotWriteToBinlog(BuildEventArgs e) 764private void CollectImports(BuildEventArgs e)
Logging\BinaryLogger\BuildEventArgsReader.cs (46)
67typeof(BuildEventArgs).GetField("threadId", BindingFlags.Instance | BindingFlags.NonPublic); 69typeof(BuildEventArgs).GetField("senderName", BindingFlags.Instance | BindingFlags.NonPublic); 74/// <param name="binaryReader">The <see cref="BinaryReader"/> to read <see cref="BuildEventArgs"/> from.</param> 216/// The next <see cref="BuildEventArgs"/>. 219public BuildEventArgs? Read() => Read(eventFilter: null); 231public BuildEventArgs? Read(BinaryLogEventFilter? eventFilter) => Read(eventFilter, CancellationToken.None); 253internal BuildEventArgs? Read(BinaryLogEventFilter? eventFilter, CancellationToken cancellationToken) 256BuildEventArgs? result = null; 412private static Func<BuildEventArgsReader, BuildEventArgs?>? GetDeserializer(BinaryLogRecordKind recordKind) 673private BuildEventArgs ReadAssemblyResolutionSearchTraceEventArgs() 757private BuildEventArgs ReadAssemblyConflictDependencyDetailsMessageEventArgs() 776private BuildEventArgs ReadAssemblyConflictWarningEventArgs() 805private BuildEventArgs ReadProjectImportedEventArgs() 836private BuildEventArgs ReadTargetSkippedEventArgs() 891private BuildEventArgs ReadBuildStartedEventArgs() 904private BuildEventArgs ReadBuildFinishedEventArgs() 918private BuildEventArgs ReadBuildSubmissionStartedEventArgs() 941private BuildEventArgs ReadProjectEvaluationStartedEventArgs() 958private BuildEventArgs ReadProjectEvaluationFinishedEventArgs() 1016private BuildEventArgs ReadProjectStartedEventArgs() 1060private BuildEventArgs ReadProjectFinishedEventArgs() 1076private BuildEventArgs ReadTargetStartedEventArgs() 1099private BuildEventArgs ReadTargetFinishedEventArgs() 1121private BuildEventArgs ReadTaskStartedEventArgs() 1143private BuildEventArgs ReadTaskFinishedEventArgs() 1163private BuildEventArgs ReadBuildErrorEventArgs() 1168BuildEventArgs e; 1215private BuildEventArgs ReadBuildWarningEventArgs() 1220BuildEventArgs e; 1267private BuildEventArgs ReadBuildMessageEventArgs() 1271BuildEventArgs e; 1321private BuildEventArgs ReadTaskCommandLineEventArgs() 1337private BuildEventArgs ReadTaskParameterEventArgs() 1363private BuildEventArgs ReadCriticalBuildMessageEventArgs() 1367BuildEventArgs e; 1413private BuildEventArgs ReadEnvironmentVariableReadEventArgs() 1428BuildEventArgs e = new EnvironmentVariableReadEventArgs( 1439private BuildEventArgs ReadResponseFileUsedEventArgs() 1449private BuildEventArgs ReadPropertyReassignmentEventArgs() 1475private BuildEventArgs ReadUninitializedPropertyReadEventArgs() 1491private BuildEventArgs ReadPropertyInitialValueSetEventArgs() 1567private BuildEventArgs ReadBuildCheckTracingEventArgs() 1580private BuildEventArgs ReadBuildCheckAcquisitionEventArgs() 1591private BuildEventArgs ReadBuildCanceledEventArgs() 1600private BuildEventArgs ReadLoggersRegisteredEventArgs() 1771private void SetCommonFields(BuildEventArgs buildEventArgs, BuildEventArgsFields fields)
Logging\BinaryLogger\BuildEventArgsWriter.cs (6)
173public void Write(BuildEventArgs e, BinaryLogRecordKind? originalRecordKind = null) 241private BinaryLogRecordKind WriteCore(BuildEventArgs e) 313internal static BinaryLogRecordKind GetRecordKind(BuildEventArgs e) => e switch 872private void WriteBuildEventArgsFields(BuildEventArgs e, bool writeMessage = true, bool writeLineAndColumn = false) 884private void WriteBaseFields(BuildEventArgs e, BuildEventArgsFieldFlags flags) 1071private static BuildEventArgsFieldFlags GetBuildEventArgsFieldFlags(BuildEventArgs e, bool writeMessage = true)
Logging\BinaryLogger\EventArgsDispatcher.cs (1)
107public void Dispatch(BuildEventArgs buildEvent)
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
173BuildEventArgs args = new BuildMessageEventArgs(
Logging\DistributedLoggers\ConfigurableForwardingLogger.cs (3)
335private void ForwardEvent(object sender, BuildEventArgs e) 370/// <param name="e">The <see cref="BuildEventArgs"/> to forward.</param> 371protected virtual void ForwardToCentralLogger(BuildEventArgs e)
Logging\NullCentralLogger.cs (1)
54public void AnyEventRaisedHandler(object sender, BuildEventArgs e)
Logging\ParallelLogger\ParallelConsoleLogger.cs (12)
439private void ShowErrorWarningSummary(IEnumerable<BuildEventArgs> listToProcess) 442var groupByProjectEntryPoint = new Dictionary<ErrorWarningSummaryDictionaryKey, List<BuildEventArgs>>(); 445foreach (BuildEventArgs errorWarningEventArgs in listToProcess) 473errorWarningEventListByTarget = new List<BuildEventArgs>(); 483foreach (KeyValuePair<ErrorWarningSummaryDictionaryKey, List<BuildEventArgs>> valuePair in groupByProjectEntryPoint) 510foreach (BuildEventArgs errorWarningEvent in valuePair.Value) 749/// <param name="e">A <see cref="BuildEventArgs"/> object containing information about the build event.</param> 751internal void WriteProperties(BuildEventArgs e, IEnumerable properties) 816/// <param name="e">A <see cref="BuildEventArgs"/> object containing information about the build event.</param> 818internal void WriteItems(BuildEventArgs e, IEnumerable items) 1030internal string FindLogOutputProperties(BuildEventArgs e) 1383private bool WriteTargetMessagePrefix(BuildEventArgs e, BuildEventContext context, DateTime timeStamp)
Logging\ProfilerLogger.cs (1)
93private void ProjectEvaluationFinishedRaised(object sender, BuildEventArgs e)
Logging\ReusableLogger.cs (1)
600private void AnyEventRaisedHandler(object sender, BuildEventArgs e) => AnyEventRaised?.Invoke(sender, e);
Logging\TerminalLogger\ForwardingTerminalLogger.cs (1)
84public void ForwardEventUnconditionally(object sender, BuildEventArgs e)
parent\Shared\LogMessagePacketBase.cs (11)
297private BuildEventArgs _buildEvent; 311internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 348internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 352return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent); 459/// Every <see cref="BuildEventArgs"/> defines <c>WriteToStream</c> / <c>CreateFromStream</c>, so the 469protected virtual void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent) 478private BuildEventArgs GetBuildEventArgFromId() 529_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}") 539private LoggingEventType GetLoggingEventId(BuildEventArgs eventArg) 743protected virtual void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 881protected virtual BuildEventArgs ReadEventFromStream(LoggingEventType eventType, ITranslator translator)
Microsoft.Build.Framework (9)
AssemblyReferenceConflictEventArgs.cs (3)
254/// The warning <see cref="BuildEventArgs.Message"/> adds the outer wrapper. 423/// The <see cref="BuildEventArgs.Message"/> is rendered in invariant English from the structured details. 519/// The <see cref="BuildEventArgs.Message"/> is rendered in invariant English from the structured details.
AssemblyResolutionSearchTraceEventArgs.cs (1)
200/// The <see cref="BuildEventArgs.Message"/> is rendered using the invariant culture.
IEventRedirector.cs (1)
16void ForwardEvent(BuildEventArgs buildEvent);
IEventSource.cs (1)
83public delegate void AnyEventHandler(object sender, BuildEventArgs e);
Telemetry\IBuildEventArgsTelemetryProvider.cs (2)
8/// <see cref="BuildEventArgs"/> they were processing when they failed - most notably 20/// Gets the simple type name of the <see cref="BuildEventArgs"/> that was being delivered
Utilities\EventArgsFormatting.cs (1)
18internal static string GetLocalizedMessage(BuildEventArgs e)
Microsoft.Build.Tasks.Core (17)
AssemblyDependency\Node\OutOfProcRarClient.cs (1)
93internal static void DispatchBuildEvent(ResolveAssemblyReference rarTask, BuildEventArgs buildEvent)
AssemblyDependency\Node\RarNodeBuildEngine.cs (5)
46private readonly Channel<BuildEventArgs> _eventChannel; 57_eventChannel = Channel.CreateUnbounded<BuildEventArgs>(new UnboundedChannelOptions 130BuildEventArgs buildEventArgs = await _eventChannel.Reader.ReadAsync(cancellationToken).ConfigureAwait(false); 131_buildEvents.EventQueue.Add(new LogMessagePacketBase(new KeyValuePair<int, BuildEventArgs>(0, buildEventArgs))); 165private void LogEvent(BuildEventArgs e)
parent\Shared\LogMessagePacketBase.cs (11)
297private BuildEventArgs _buildEvent; 311internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 348internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 352return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent); 459/// Every <see cref="BuildEventArgs"/> defines <c>WriteToStream</c> / <c>CreateFromStream</c>, so the 469protected virtual void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent) 478private BuildEventArgs GetBuildEventArgFromId() 529_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}") 539private LoggingEventType GetLoggingEventId(BuildEventArgs eventArg) 743protected virtual void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 881protected virtual BuildEventArgs ReadEventFromStream(LoggingEventType eventType, ITranslator translator)
Microsoft.Build.Utilities.Core (1)
MuxLogger.cs (1)
1205private void RaiseAnyEvent(object sender, BuildEventArgs buildEvent)
Microsoft.NET.ProjectData.Tasks (1)
ProjectDataBuildCompletionLogger.cs (1)
98 private void OnAnyEventRaised(object sender, BuildEventArgs e)
MSBuild (12)
OutOfProcTaskHostNode.cs (2)
1993private void SendBuildEvent(BuildEventArgs e) 2010LogMessagePacketBase logMessage = new(new KeyValuePair<int, BuildEventArgs>(configuration.NodeId, e));
parent\Shared\LogMessagePacketBase.cs (10)
297private BuildEventArgs _buildEvent; 311internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 348internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 352return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent); 469protected virtual void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent) 478private BuildEventArgs GetBuildEventArgFromId() 529_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}") 539private LoggingEventType GetLoggingEventId(BuildEventArgs eventArg) 743protected virtual void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 881protected virtual BuildEventArgs ReadEventFromStream(LoggingEventType eventType, ITranslator translator)
NuGet.Build.Tasks (3)
ConsoleOutLogMessage.cs (3)
32/// <inheritdoc cref="BuildEventArgs.HelpKeyword" /> 41/// <inheritdoc cref="BuildEventArgs.Message" /> 47/// <inheritdoc cref="BuildEventArgs.SenderName" />