72 types derived from EventSource
dotnet-dev-certs (1)
dotnet-svcutil-lib (1)
ILCompiler.DependencyAnalysisFramework (2)
ILCompiler.ReadyToRun (1)
illink (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.Build.Framework (1)
Microsoft.Build.NuGetSdkResolver (1)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Extensions.Caching.Hybrid (1)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.Telemetry (1)
Microsoft.Extensions.Telemetry.Tests (1)
Microsoft.TestPlatform.CoreUtilities (1)
NuGet.Commands (1)
NuGet.Common (1)
NuGet.Configuration (1)
PresentationCore (1)
PresentationFramework (1)
RepoTasks (1)
System.Collections.Concurrent (1)
System.Data.Common (1)
System.Data.OleDb (1)
System.Diagnostics.DiagnosticSource (2)
System.Linq.Parallel (1)
System.Net.Http (2)
System.Net.Http.WinHttpHandler (1)
System.Net.HttpListener (1)
System.Net.Mail (1)
System.Net.NameResolution (2)
System.Net.NetworkInformation (1)
System.Net.Primitives (1)
System.Net.Quic (1)
System.Net.Requests (1)
System.Net.Security (2)
System.Net.Sockets (2)
System.Net.WebSockets (1)
System.Private.CoreLib (11)
System.Private.Xml (1)
System.Runtime.Caching (1)
System.ServiceModel.Primitives (1)
System.Threading (1)
System.Threading.Tasks.Dataflow (1)
System.Threading.Tasks.Parallel (1)
System.Transactions.Local (1)
System.Windows.Forms (1)
System.Windows.Forms.Primitives (1)
178 references to EventSource
Aspire.RabbitMQ.Client (3)
Aspire.TerminalHost (1)
Infrastructure.Common (7)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.InternalTesting (14)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Http.Diagnostics (4)
Microsoft.Extensions.Telemetry.Tests (1)
MSBuild (1)
mscorlib (1)
netstandard (1)
PresentationCore (10)
PresentationFramework (10)
System.Diagnostics.Tracing (1)
System.Net.Http (3)
System.Private.CoreLib (113)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventListener.cs (29)
11/// of <see cref="EventSource"/>), in the current appdomain. When a new EventListener is created
153public void EnableEvents(EventSource eventSource, EventLevel level)
168public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
184public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
202public void DisableEvents(EventSource eventSource)
223protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
238protected internal virtual void OnEventSourceCreated(EventSource eventSource)
272internal static void AddEventSource(EventSource newEventSource)
287WeakReference<EventSource> weakRef = s_EventSources[i];
299s_EventSources.Add(new WeakReference<EventSource>(newEventSource));
335Debug.Assert(EventSource.IsSupported);
336List<EventSource> sourcesToDispose = new List<EventSource>();
340foreach (WeakReference<EventSource> esRef in s_EventSources)
342if (esRef.TryGetTarget(out EventSource? es))
352foreach (EventSource es in sourcesToDispose)
359private static void CallDisableEventsIfNecessary(EventDispatcher eventDispatcher, EventSource eventSource)
403WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
404foreach (WeakReference<EventSource> eventSourceRef in eventSourcesSnapshot)
406if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
423foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
425if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
486foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
489if (!eventSourceRef.TryGetTarget(out EventSource? eventSource))
527Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null);
568WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
578WeakReference<EventSource> eventSourceRef = eventSourcesSnapshot[i];
579if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
620internal static List<WeakReference<EventSource>>? s_EventSources;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (44)
454public static IEnumerable<EventSource> GetSources()
461var ret = new List<EventSource>();
466foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
468if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && !eventSource.IsDisposed)
484public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary<string, string?>? commandArguments)
1689Func<EventSource?> eventSourceFactory = () => this;
2493public OverrideEventProvider(Func<EventSource?> eventSourceFactory, EventProviderType providerType)
2507private readonly Func<EventSource?> _eventSourceFactory;
2899foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
2901if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && eventSource.Guid == m_guid && !eventSource.IsDisposed)
3041EventSource? source,
3134if (eventSourceType != typeof(EventSource))
3457if (reflectionOnly && ret.FullName != typeof(EventSource).FullName ||
3458!reflectionOnly && ret != typeof(EventSource))
3883if (!EventSource.IsSupported)
3944private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3945private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3947private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3950internal static EventSource? GetMetricsEventSource()
3952return GetInstance(null) as EventSource;
3962internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3980EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3998EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
4015if (!EventSource.IsSupported)
4025Func<EventSource?>[] factories;
4031foreach (Func<EventSource?> factory in factories)
4037internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4041s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4047internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4051s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4129internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4143internal EventSource eventSource;
4166public EventSource? EventSource
4179private ref EventSource.EventMetadata Metadata => ref CollectionsMarshal.GetValueRefOrNullRef(EventSource.m_eventData!, EventId);
4206_activityId = EventSource.CurrentThreadActivityId;
4235public EventSource EventSource { get; }
4320internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4327internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
4400/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
System.ServiceModel.Primitives (2)