67 types derived from EventSource
Aspire.Hosting (1)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
dotnet (1)
dotnet-dev-certs (1)
dotnet-svcutil-lib (1)
dotnet-watch (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.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.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)
189 references to EventSource
Aspire.RabbitMQ.Client (4)
dotnet (1)
dotnet.Tests (1)
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.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)
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)
3915private static List<Func<EventSource?>> s_preregisteredEventSourceFactories = new List<Func<EventSource?>>();
3916private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>();
3918private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>();
3921internal static EventSource? GetMetricsEventSource()
3923return GetInstance(null) as EventSource;
3933internal static unsafe void PreregisterEventProviders(Guid id, string name, Func<EventSource?> eventSourceFactory)
3951EventSource.OverrideEventProvider etwProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.ETW);
3969EventSource.OverrideEventProvider eventPipeProvider = new EventSource.OverrideEventProvider(eventSourceFactory, EventProviderType.EventPipe);
3986if (!EventSource.IsSupported)
3996Func<EventSource?>[] factories;
4002foreach (Func<EventSource?> factory in factories)
4008internal static EventSource.OverrideEventProvider? TryGetPreregisteredEtwProvider(Guid id)
4012s_preregisteredEtwProviders.Remove(id, out EventSource.OverrideEventProvider? provider);
4018internal static EventSource.OverrideEventProvider? TryGetPreregisteredEventPipeProvider(string name)
4022s_preregisteredEventPipeProviders.Remove(name, out EventSource.OverrideEventProvider? provider);
4061/// of <see cref="EventSource"/>), in the current appdomain. When a new EventListener is created
4203public void EnableEvents(EventSource eventSource, EventLevel level)
4218public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
4234public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
4252public void DisableEvents(EventSource eventSource)
4273protected internal static int EventSourceIndex(EventSource eventSource) { return eventSource.m_id; }
4288protected internal virtual void OnEventSourceCreated(EventSource eventSource)
4322internal static void AddEventSource(EventSource newEventSource)
4337WeakReference<EventSource> weakRef = s_EventSources[i];
4349s_EventSources.Add(new WeakReference<EventSource>(newEventSource));
4385Debug.Assert(EventSource.IsSupported);
4386List<EventSource> sourcesToDispose = new List<EventSource>();
4390foreach (WeakReference<EventSource> esRef in s_EventSources)
4392if (esRef.TryGetTarget(out EventSource? es))
4402foreach (EventSource es in sourcesToDispose)
4409private static void CallDisableEventsIfNecessary(EventDispatcher eventDispatcher, EventSource eventSource)
4453WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4454foreach (WeakReference<EventSource> eventSourceRef in eventSourcesSnapshot)
4456if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4473foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4475if (eventSourceRef.TryGetTarget(out EventSource? eventSource)
4536foreach (WeakReference<EventSource> eventSourceRef in s_EventSources)
4539if (!eventSourceRef.TryGetTarget(out EventSource? eventSource))
4577Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference<EventSource>>(2), null);
4618WeakReference<EventSource>[] eventSourcesSnapshot = s_EventSources.ToArray();
4628WeakReference<EventSource> eventSourceRef = eventSourcesSnapshot[i];
4629if (eventSourceRef.TryGetTarget(out EventSource? eventSource))
4670internal static List<WeakReference<EventSource>>? s_EventSources;
4731internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
4745internal EventSource eventSource;
4768public EventSource? EventSource
4781private ref EventSource.EventMetadata Metadata => ref CollectionsMarshal.GetValueRefOrNullRef(EventSource.m_eventData!, EventId);
4808_activityId = EventSource.CurrentThreadActivityId;
4837public EventSource EventSource { get; }
4922internal EventWrittenEventArgs(EventSource eventSource, int eventId)
4929internal unsafe EventWrittenEventArgs(EventSource eventSource, int eventId, Guid* pActivityID, Guid* pChildActivityID)
5002/// Any instance methods in a class that subclasses <see cref="EventSource"/> and that return void are
5715bool isbitmap = EventSource.IsCustomAttributeDefinedHelper(enumType, typeof(FlagsAttribute), flags);
System.ServiceModel.Primitives (2)