未验证 提交 3e875283 编写于 作者: S Stephen Toub 提交者: GitHub

Replace EventWrittenEventArgs.EmptyPayload with ReadOnlyCollection.Empty singleton (#87906)

上级 bba7a9c6
......@@ -2077,7 +2077,7 @@ private unsafe void WriteToAllListeners(EventWrittenEventArgs eventCallbackArgs,
object?[] args;
if (eventDataCount == 0)
{
eventCallbackArgs.Payload = EventWrittenEventArgs.EmptyPayload;
eventCallbackArgs.Payload = ReadOnlyCollection<object?>.Empty;
}
else
{
......@@ -4675,8 +4675,6 @@ public class EventSourceCreatedEventArgs : EventArgs
/// </summary>
public class EventWrittenEventArgs : EventArgs
{
internal static readonly ReadOnlyCollection<object?> EmptyPayload = new(Array.Empty<object>());
private ref EventSource.EventMetadata Metadata => ref EventSource.m_eventData![EventId];
/// <summary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册