51 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.HttpListener (1)
System.Net.Mail (1)
System.Private.CoreLib (7)
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)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
182 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 (2)
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)
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)
1675Func<EventSource?> eventSourceFactory = () => this;
2485public OverrideEventProvider(Func<EventSource?> eventSourceFactory, EventProviderType providerType)
2499private readonly Func<EventSource?> _eventSourceFactory;
2891foreach (WeakReference<EventSource> eventSourceRef in EventListener.s_EventSources)
2893if (eventSourceRef.TryGetTarget(out EventSource? eventSource) && eventSource.Guid == m_guid && !eventSource.IsDisposed)
3127if (reflectionOnly && ret.FullName != typeof(EventSource).FullName ||
3128!reflectionOnly && ret != typeof(EventSource))
3152EventSource? source,
3245if (eventSourceType != typeof(EventSource))
3879if (!EventSource.IsSupported)
3913private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3914private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3916private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3919internal static EventSource? GetMetricsEventSource()
3921return GetInstance(null) as EventSource;
3931internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3949EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3967EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
3984if (!EventSource.IsSupported)
3994Func<EventSource?>[] factories;
4000foreach (Func<EventSource?> factory in factories)
4006internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4010s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4016internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4020s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4059/// of <see cref="EventSource"/>), in the current appdomain. When a new EventListener is created
4201public void EnableEvents(EventSource eventSource, EventLevel level)
4216public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
4232public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
4250public void DisableEvents(EventSource eventSource)
4271protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
4286protected internal virtual void OnEventSourceCreated(EventSource eventSource)
4320internal static void AddEventSource(EventSource newEventSource)
4335WeakReference<EventSource> weakRef = s_EventSources[i];
4347s_EventSources.Add(new WeakReference<EventSource>(newEventSource));
4383Debug.Assert(EventSource.IsSupported);
4384List<EventSource> sourcesToDispose = new List<EventSource>();
4388foreach (WeakReference<EventSource> esRef in s_EventSources)
4390if (esRef.TryGetTarget(out EventSource? es))
4400foreach (EventSource es in sourcesToDispose)
4407private static void CallDisableEventsIfNecessary(EventDispatcher eventDispatcher, EventSource eventSource)
4451WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4452foreach (WeakReference<EventSource> eventSourceRef in eventSourcesSnapshot)
4454if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4471foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4473if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
4534foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4537if (!eventSourceRef.TryGetTarget(out EventSource? eventSource))
4575Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null);
4616WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4626WeakReference<EventSource> eventSourceRef = eventSourcesSnapshot[i];
4627if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4668internal static List<WeakReference<EventSource>>? s_EventSources;
4729internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4743internal EventSource eventSource;
4766public EventSource? EventSource
4779private ref EventSource.EventMetadata Metadata => ref CollectionsMarshal.GetValueRefOrNullRef(EventSource.m_eventData!, EventId);
4806_activityId = EventSource.CurrentThreadActivityId;
4835public EventSource EventSource { get; }
4920internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4927internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
5000/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
5713bool isbitmap = EventSource.IsCustomAttributeDefinedHelper(enumType, typeof(FlagsAttribute), flags);
System.ServiceModel.Primitives (2)