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
187 references to BuildEventArgs
Microsoft.Build (149)
BackEnd\BuildManager\BuildManager.cs (9)
207private readonly Dictionary<int, BuildEventArgs> _projectStartedEvents; 314_projectStartedEvents = new Dictionary<int, BuildEventArgs>(); 435/// public deferred-message contract; callers set it via the <see cref="BuildEventArgs"/> constructor. 437internal BuildEventArgs? BuildEvent { get; } 474/// Creates a deferred message backed by a pre-built <see cref="BuildEventArgs"/>. When the build 481public DeferredBuildMessage(BuildEventArgs buildEvent) 1149foreach (KeyValuePair<int, BuildEventArgs> projectStartedEvent in _projectStartedEvents) 2792BuildEventContext buildEventContext = _projectStartedEvents.TryGetValue(result.SubmissionId, out BuildEventArgs? buildEventArgs) 3201if (_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)
397void LogBuildEvent(BuildEventArgs buildEvent); 725void Consume(BuildEventArgs buildEvent, int sinkId); 730void Consume(BuildEventArgs buildEvent);
BackEnd\Components\Logging\LoggingContext.cs (1)
288internal void LogBuildEvent(BuildEventArgs buildEvent)
BackEnd\Components\Logging\LoggingService.cs (13)
1275public void LogBuildEvent(BuildEventArgs buildEvent) 1448private static WarningsConfigKey GetWarningsConfigKey(BuildEventArgs buildEventArgs) 1642BuildEventArgs buildEventArgs = loggingEvent as BuildEventArgs ?? (loggingEvent as KeyValuePair<int, BuildEventArgs>?)?.Value; 1773if (loggingEvent is BuildEventArgs) 1777else if (loggingEvent is KeyValuePair<int, BuildEventArgs> loggingEventKeyValuePair) 1782loggingEventKeyValuePair = new KeyValuePair<int, BuildEventArgs>(loggingEventKeyValuePair.Key, buildEventArgs); 1792private void RouteBuildEvent(KeyValuePair<int, BuildEventArgs> nodeEvent) 1811private void RouteBuildEvent(BuildEventArgs eventArg) 1990private void TryRaiseProjectStartedEvent(BuildEventArgs args) 2007private void TryRaiseProjectFinishedEvent(BuildEventArgs args) 2024private string GetAndVerifyProjectFileFromContext(BuildEventArgs eventArgs, bool allowCacheMiss)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
52BuildEventArgs.ResourceStringFormatter = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword;
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
1116internal bool IsEventSerializable(BuildEventArgs e)
BackEnd\Node\OutOfProcNode.cs (1)
607BuildEventArgs buildEvent = logMessage.NodeBuildEvent.Value.Value;
BuildCheck\API\BuildCheckResult.cs (1)
30internal BuildEventArgs ToEventArgs(CheckResultSeverity severity)
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (6)
18private Dictionary<Type, Action<BuildEventArgs>> _eventHandlers; 19private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlersFull; 20private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlersRestore; 55public void HandleBuildEvent(BuildEventArgs e) 57if (_eventHandlers.TryGetValue(e.GetType(), out Action<BuildEventArgs>? handler)) 211private 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)
652foreach (BuildEventArgs deferredArgs in list) 662private readonly Dictionary<int, List<BuildEventArgs>> _deferredEvalDiagnostics = new(); 679void IResultReporter.ReportResult(BuildEventArgs eventArgs, ICheckContext checkContext) 794void ReportResult(BuildEventArgs result, ICheckContext checkContext);
BuildCheck\Infrastructure\CheckContext\CheckDispatchingContext.cs (1)
30public void DispatchBuildEvent(BuildEventArgs buildEvent)
BuildCheck\Infrastructure\CheckContext\CheckLoggingContext.cs (1)
25public void DispatchBuildEvent(BuildEventArgs buildEvent)
BuildCheck\Infrastructure\CheckContext\ICheckContext.cs (2)
26/// Dispatch a <see cref="BuildEventArgs"/>. 28void 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)
687BuildEventArgs buildEvent = logMessagePacket.NodeBuildEvent.Value.Value;
Instance\TaskFactoryEngineContext.cs (1)
381internal bool IsEventSerializable(BuildEventArgs e)
Logging\BinaryLogger\BinaryLogger.cs (4)
586private void EventSource_AnyEventRaised(object sender, BuildEventArgs e) 591private void Write(BuildEventArgs e) 613private static bool DoNotWriteToBinlog(BuildEventArgs e) 618private void CollectImports(BuildEventArgs e)
Logging\BinaryLogger\BuildEventArgsReader.cs (41)
60typeof(BuildEventArgs).GetField("threadId", BindingFlags.Instance | BindingFlags.NonPublic); 62typeof(BuildEventArgs).GetField("senderName", BindingFlags.Instance | BindingFlags.NonPublic); 67/// <param name="binaryReader">The <see cref="BinaryReader"/> to read <see cref="BuildEventArgs"/> from.</param> 209/// The next <see cref="BuildEventArgs"/>. 212public BuildEventArgs? Read() 215BuildEventArgs? result = null; 299private BuildEventArgs? ReadBuildEventArgs(BinaryLogRecordKind recordKind) 524private BuildEventArgs ReadProjectImportedEventArgs() 555private BuildEventArgs ReadTargetSkippedEventArgs() 610private BuildEventArgs ReadBuildStartedEventArgs() 623private BuildEventArgs ReadBuildFinishedEventArgs() 637private BuildEventArgs ReadBuildSubmissionStartedEventArgs() 660private BuildEventArgs ReadProjectEvaluationStartedEventArgs() 677private BuildEventArgs ReadProjectEvaluationFinishedEventArgs() 735private BuildEventArgs ReadProjectStartedEventArgs() 779private BuildEventArgs ReadProjectFinishedEventArgs() 795private BuildEventArgs ReadTargetStartedEventArgs() 818private BuildEventArgs ReadTargetFinishedEventArgs() 840private BuildEventArgs ReadTaskStartedEventArgs() 862private BuildEventArgs ReadTaskFinishedEventArgs() 882private BuildEventArgs ReadBuildErrorEventArgs() 887BuildEventArgs e; 934private BuildEventArgs ReadBuildWarningEventArgs() 939BuildEventArgs e; 986private BuildEventArgs ReadBuildMessageEventArgs() 990BuildEventArgs e; 1040private BuildEventArgs ReadTaskCommandLineEventArgs() 1056private BuildEventArgs ReadTaskParameterEventArgs() 1082private BuildEventArgs ReadCriticalBuildMessageEventArgs() 1086BuildEventArgs e; 1132private BuildEventArgs ReadEnvironmentVariableReadEventArgs() 1147BuildEventArgs e = new EnvironmentVariableReadEventArgs( 1158private BuildEventArgs ReadResponseFileUsedEventArgs() 1168private BuildEventArgs ReadPropertyReassignmentEventArgs() 1194private BuildEventArgs ReadUninitializedPropertyReadEventArgs() 1210private BuildEventArgs ReadPropertyInitialValueSetEventArgs() 1286private BuildEventArgs ReadBuildCheckTracingEventArgs() 1299private BuildEventArgs ReadBuildCheckAcquisitionEventArgs() 1310private BuildEventArgs ReadBuildCanceledEventArgs() 1319private BuildEventArgs ReadLoggersRegisteredEventArgs() 1483private void SetCommonFields(BuildEventArgs buildEventArgs, BuildEventArgsFields fields)
Logging\BinaryLogger\BuildEventArgsWriter.cs (5)
144public void Write(BuildEventArgs e) 203private BinaryLogRecordKind WriteCore(BuildEventArgs e) 678private void WriteBuildEventArgsFields(BuildEventArgs e, bool writeMessage = true, bool writeLineAndColumn = false) 690private void WriteBaseFields(BuildEventArgs e, BuildEventArgsFieldFlags flags) 877private 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)
578private void AnyEventRaisedHandler(object sender, BuildEventArgs e) => AnyEventRaised?.Invoke(sender, e);
Logging\TerminalLogger\ForwardingTerminalLogger.cs (1)
84public void ForwardEventUnconditionally(object sender, BuildEventArgs e)
src\msbuild\src\Shared\LogMessagePacketBase.cs (11)
282private BuildEventArgs _buildEvent; 296internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 333internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 337return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent); 444/// Every <see cref="BuildEventArgs"/> defines <c>WriteToStream</c> / <c>CreateFromStream</c>, so the 454protected virtual void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent) 463private BuildEventArgs GetBuildEventArgFromId() 511_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}") 521private LoggingEventType GetLoggingEventId(BuildEventArgs eventArg) 713protected virtual void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 851protected virtual BuildEventArgs ReadEventFromStream(LoggingEventType eventType, ITranslator translator)
Microsoft.Build.Framework (4)
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
Microsoft.Build.Tasks.Core (17)
AssemblyDependency\Node\OutOfProcRarClient.cs (1)
76BuildEventArgs buildEvent = logMessagePacket.NodeBuildEvent?.Value!;
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)
src\msbuild\src\Shared\LogMessagePacketBase.cs (11)
282private BuildEventArgs _buildEvent; 296internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 333internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 337return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent); 444/// Every <see cref="BuildEventArgs"/> defines <c>WriteToStream</c> / <c>CreateFromStream</c>, so the 454protected virtual void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent) 463private BuildEventArgs GetBuildEventArgFromId() 511_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}") 521private LoggingEventType GetLoggingEventId(BuildEventArgs eventArg) 713protected virtual void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 851protected virtual BuildEventArgs ReadEventFromStream(LoggingEventType eventType, ITranslator translator)
Microsoft.Build.Utilities.Core (1)
MuxLogger.cs (1)
1205private void RaiseAnyEvent(object sender, BuildEventArgs buildEvent)
MSBuild (13)
OutOfProcTaskHostNode.cs (2)
1821private void SendBuildEvent(BuildEventArgs e) 1837LogMessagePacketBase logMessage = new(new KeyValuePair<int, BuildEventArgs>(_currentConfiguration.NodeId, e));
src\msbuild\src\Shared\LogMessagePacketBase.cs (11)
282private BuildEventArgs _buildEvent; 296internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent) 333internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 337return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent); 444/// Every <see cref="BuildEventArgs"/> defines <c>WriteToStream</c> / <c>CreateFromStream</c>, so the 454protected virtual void TranslateAdditionalProperties(ITranslator translator, LoggingEventType eventType, BuildEventArgs buildEvent) 463private BuildEventArgs GetBuildEventArgFromId() 511_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}") 521private LoggingEventType GetLoggingEventId(BuildEventArgs eventArg) 713protected virtual void WriteEventToStream(BuildEventArgs buildEvent, LoggingEventType eventType, ITranslator translator) 851protected 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" />