66 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.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Shared.Tests (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 (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)
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.Diagnostics (1)
Microsoft.AspNetCore.InternalTesting (6)
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 (115)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (75)
459public static IEnumerable<EventSource> GetSources()
463return Array.Empty<EventSource>();
466var ret = new List<EventSource>();
471foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
473if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && !eventSource.IsDisposed)
489public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary<string, string?>? commandArguments)
1694Func<EventSource?> eventSourceFactory = () => this;
2506public OverrideEventProvider(Func<EventSource?> eventSourceFactory, EventProviderType providerType)
2520private readonly Func<EventSource?> _eventSourceFactory;
2912foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
2914if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && eventSource.Guid == m_guid && !eventSource.IsDisposed)
3148if (reflectionOnly && ret.FullName != typeof(EventSource).FullName ||
3149!reflectionOnly && ret != typeof(EventSource))
3173EventSource? source,
3266if (eventSourceType != typeof(EventSource))
3900if (!EventSource.IsSupported)
3936private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3937private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3939private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3942internal static EventSource? GetMetricsEventSource()
3944return GetInstance(null) as EventSource;
3954internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3972EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3990EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
4007if (!EventSource.IsSupported)
4017Func<EventSource?>[] factories;
4023foreach (Func<EventSource?> factory in factories)
4029internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4033s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4039internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4043s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4082/// of <see cref="EventSource"/>), in the current appdomain. When a new EventListener is created
4224public void EnableEvents(EventSource eventSource, EventLevel level)
4239public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
4255public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
4273public void DisableEvents(EventSource eventSource)
4294protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
4309protected internal virtual void OnEventSourceCreated(EventSource eventSource)
4343internal static void AddEventSource(EventSource newEventSource)
4358WeakReference<EventSource> weakRef = s_EventSources[i];
4370s_EventSources.Add(new WeakReference<EventSource>(newEventSource));
4406Debug.Assert(EventSource.IsSupported);
4407List<EventSource> sourcesToDispose = new List<EventSource>();
4411foreach (WeakReference<EventSource> esRef in s_EventSources)
4413if (esRef.TryGetTarget(out EventSource? es))
4423foreach (EventSource es in sourcesToDispose)
4430private static void CallDisableEventsIfNecessary(EventDispatcher eventDispatcher, EventSource eventSource)
4474WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4475foreach (WeakReference<EventSource> eventSourceRef in eventSourcesSnapshot)
4477if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4494foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4496if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
4557foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4560if (!eventSourceRef.TryGetTarget(out EventSource? eventSource))
4598Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null);
4639WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4649WeakReference<EventSource> eventSourceRef = eventSourcesSnapshot[i];
4650if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4691internal static List<WeakReference<EventSource>>? s_EventSources;
4752internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4766internal EventSource eventSource;
4789public EventSource? EventSource
4802private ref EventSource.EventMetadata Metadata => ref CollectionsMarshal.GetValueRefOrNullRef(EventSource.m_eventData!, EventId);
4829_activityId = EventSource.CurrentThreadActivityId;
4858public EventSource EventSource { get; }
4943internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4950internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
5023/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
5736bool isbitmap = EventSource.IsCustomAttributeDefinedHelper(enumType, typeof(FlagsAttribute), flags);
System.ServiceModel.Primitives (2)