64 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 (7)
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)
465public static IEnumerable<EventSource> GetSources()
469return Array.Empty<EventSource>();
472var ret = new List<EventSource>();
477foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
479if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && !eventSource.IsDisposed)
495public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary<string, string?>? commandArguments)
1672Func<EventSource?> eventSourceFactory = () => this;
2476public OverrideEventProvider(Func<EventSource?> eventSourceFactory, EventProviderType providerType)
2490private readonly Func<EventSource?> _eventSourceFactory;
2882foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
2884if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && eventSource.Guid == m_guid && !eventSource.IsDisposed)
3118if (reflectionOnly && ret.FullName != typeof(EventSource).FullName ||
3119!reflectionOnly && ret != typeof(EventSource))
3143EventSource? source,
3236if (eventSourceType != typeof(EventSource))
3870if (!EventSource.IsSupported)
3904private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3905private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3907private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3910internal static EventSource? GetMetricsEventSource()
3912return GetInstance(null) as EventSource;
3922internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3940EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3958EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
3975if (!EventSource.IsSupported)
3985Func<EventSource?>[] factories;
3991foreach (Func<EventSource?> factory in factories)
3997internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4001s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4007internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4011s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4050/// of <see cref="EventSource"/>), in the current appdomain. When a new EventListener is created
4192public void EnableEvents(EventSource eventSource, EventLevel level)
4207public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
4223public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
4241public void DisableEvents(EventSource eventSource)
4262protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
4277protected internal virtual void OnEventSourceCreated(EventSource eventSource)
4311internal static void AddEventSource(EventSource newEventSource)
4326WeakReference<EventSource> weakRef = s_EventSources[i];
4338s_EventSources.Add(new WeakReference<EventSource>(newEventSource));
4374Debug.Assert(EventSource.IsSupported);
4375List<EventSource> sourcesToDispose = new List<EventSource>();
4379foreach (WeakReference<EventSource> esRef in s_EventSources)
4381if (esRef.TryGetTarget(out EventSource? es))
4391foreach (EventSource es in sourcesToDispose)
4398private static void CallDisableEventsIfNecessary(EventDispatcher eventDispatcher, EventSource eventSource)
4442WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4443foreach (WeakReference<EventSource> eventSourceRef in eventSourcesSnapshot)
4445if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4462foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4464if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
4525foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4528if (!eventSourceRef.TryGetTarget(out EventSource? eventSource))
4566Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null);
4607WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4617WeakReference<EventSource> eventSourceRef = eventSourcesSnapshot[i];
4618if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4659internal static List<WeakReference<EventSource>>? s_EventSources;
4720internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4734internal EventSource eventSource;
4757public EventSource? EventSource
4770private ref EventSource.EventMetadata Metadata => ref CollectionsMarshal.GetValueRefOrNullRef(EventSource.m_eventData!, EventId);
4797_activityId = EventSource.CurrentThreadActivityId;
4826public EventSource EventSource { get; }
4911internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4918internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
4991/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
5704bool isbitmap = EventSource.IsCustomAttributeDefinedHelper(enumType, typeof(FlagsAttribute), flags);