71 types derived from EventSource
Aspire.Hosting (1)
dotnet-dev-certs (1)
dotnet-svcutil-lib (1)
illink (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.InternalTesting.Tests (6)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis (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)
PresentationCore (1)
PresentationFramework (1)
RepoTasks (1)
System.Collections.Concurrent (1)
System.Data.Common (1)
System.Diagnostics.DiagnosticSource (2)
System.Linq.Parallel (1)
System.Net.Http (2)
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 (9)
System.Private.Xml (1)
System.Runtime.Caching (1)
System.Security.Cryptography (1)
System.ServiceModel.Primitives (1)
System.Threading (1)
System.Threading.Tasks.Dataflow (1)
System.Threading.Tasks.Parallel (1)
System.Transactions.Local (1)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
190 references to EventSource
Aspire.RabbitMQ.Client (3)
Http3SampleApp (2)
HttpStress (1)
Infrastructure.Common (7)
InMemory.FunctionalTests (2)
Interop.FunctionalTests (2)
InteropClient (2)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.InternalTesting (14)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.Tests (2)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Http.Diagnostics (4)
Microsoft.Extensions.Telemetry.Tests (1)
mscorlib (1)
netstandard (1)
PresentationCore (10)
PresentationFramework (10)
System.Diagnostics.Tracing (1)
System.Private.CoreLib (114)
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\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;
2496public OverrideEventProvider(Func<EventSource?> eventSourceFactory, EventProviderType providerType)
2510private readonly Func<EventSource?> _eventSourceFactory;
2902foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
2904if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && eventSource.Guid == m_guid && !eventSource.IsDisposed)
3044EventSource? source,
3137if (eventSourceType != typeof(EventSource))
3460if (reflectionOnly && ret.FullName != typeof(EventSource).FullName ||
3461!reflectionOnly && ret != typeof(EventSource))
3886if (!EventSource.IsSupported)
3937private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3938private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3940private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3943internal static EventSource? GetMetricsEventSource()
3945return GetInstance(null) as EventSource;
3955internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3973EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3991EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
4008if (!EventSource.IsSupported)
4018Func<EventSource?>[] factories;
4024foreach (Func<EventSource?> factory in factories)
4030internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4034s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4040internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4044s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4122internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4136internal EventSource eventSource;
4159public EventSource? EventSource
4172private ref EventSource.EventMetadata Metadata => ref CollectionsMarshal.GetValueRefOrNullRef(EventSource.m_eventData!, EventId);
4199_activityId = EventSource.CurrentThreadActivityId;
4228public EventSource EventSource { get; }
4313internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4320internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
4393/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
System.ServiceModel.Primitives (2)