65 types derived from EventSource
Aspire.Hosting (1)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
dotnet-dev-certs (1)
dotnet-svcutil-lib (1)
illink (1)
Microsoft.AspNetCore.ConcurrencyLimiter (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
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)
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 (8)
System.Private.Xml (1)
System.Runtime.Caching (1)
System.Security.Cryptography (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)
184 references to EventSource
Aspire.RabbitMQ.Client (4)
Http3SampleApp (2)
HttpStress (1)
Infrastructure.Common (7)
InMemory.FunctionalTests (2)
Interop.FunctionalTests (2)
InteropClient (2)
Microsoft.AspNetCore.InternalTesting (6)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.Tests (2)
Microsoft.Build.Engine.UnitTests (2)
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.Private.CoreLib (115)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (75)
466public static IEnumerable<EventSource> GetSources()
470return Array.Empty<EventSource>();
473var ret = new List<EventSource>();
478foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
480if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && !eventSource.IsDisposed)
496public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary<string, string?>? commandArguments)
1673Func<EventSource?> eventSourceFactory = () => this;
2475public OverrideEventProvider(Func<EventSource?> eventSourceFactory, EventProviderType providerType)
2489private readonly Func<EventSource?> _eventSourceFactory;
2880foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
2882if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && eventSource.Guid == m_guid && !eventSource.IsDisposed)
3111if (reflectionOnly && ret.FullName != typeof(EventSource).FullName ||
3112!reflectionOnly && ret != typeof(EventSource))
3136EventSource? source,
3228if (eventSourceType != typeof(EventSource))
3882if (!EventSource.IsSupported)
3914private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3915private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3917private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3920internal static EventSource? GetMetricsEventSource()
3935return getInstanceMethod.Invoke(null, null) as EventSource;
3940internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3958EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3976EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
3993if (!EventSource.IsSupported)
4003Func<EventSource?>[] factories;
4009foreach (Func<EventSource?> factory in factories)
4015internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4019s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4025internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4029s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4068/// of <see cref="EventSource"/>), in the current appdomain. When a new EventListener is created
4210public void EnableEvents(EventSource eventSource, EventLevel level)
4225public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
4241public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
4259public void DisableEvents(EventSource eventSource)
4280protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
4295protected internal virtual void OnEventSourceCreated(EventSource eventSource)
4329internal static void AddEventSource(EventSource newEventSource)
4344WeakReference<EventSource> weakRef = s_EventSources[i];
4356s_EventSources.Add(new WeakReference<EventSource>(newEventSource));
4392Debug.Assert(EventSource.IsSupported);
4393List<EventSource> sourcesToDispose = new List<EventSource>();
4397foreach (WeakReference<EventSource> esRef in s_EventSources)
4399if (esRef.TryGetTarget(out EventSource? es))
4409foreach (EventSource es in sourcesToDispose)
4416private static void CallDisableEventsIfNecessary(EventDispatcher eventDispatcher, EventSource eventSource)
4460WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4461foreach (WeakReference<EventSource> eventSourceRef in eventSourcesSnapshot)
4463if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4480foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4482if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
4543foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4546if (!eventSourceRef.TryGetTarget(out EventSource? eventSource))
4584Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null);
4625WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4635WeakReference<EventSource> eventSourceRef = eventSourcesSnapshot[i];
4636if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4677internal static List<WeakReference<EventSource>>? s_EventSources;
4738internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4752internal EventSource eventSource;
4775public EventSource? EventSource
4788private ref EventSource.EventMetadata Metadata => ref EventSource.m_eventData![EventId];
4815_activityId = EventSource.CurrentThreadActivityId;
4844public EventSource EventSource { get; }
4929internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4936internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
5009/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
5722bool isbitmap = EventSource.IsCustomAttributeDefinedHelper(enumType, typeof(FlagsAttribute), flags);