Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Diagnostics.DiagnosticSourceEventSource Class Referencesealed

Classes

class  CallbackObserver
 
class  FilterAndTransform
 
class  ImplicitTransformEntry
 
class  Keywords
 
class  Subscriptions
 
class  TransformSpec
 

Public Member Functions

void Message (string Message)
 
bool IsEnabled ()
 
bool IsEnabled (EventLevel level, EventKeywords keywords)
 
bool IsEnabled (EventLevel level, EventKeywords keywords, EventChannel channel)
 
stringGetTrait (string key)
 
override string ToString ()
 
void Dispose ()
 
unsafe void Write (string? eventName)
 
unsafe void Write (string? eventName, EventSourceOptions options)
 
unsafe void Write<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T > (string? eventName, T data)
 
unsafe void Write<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T > (string? eventName, EventSourceOptions options, T data)
 
unsafe void Write<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T > (string? eventName, ref EventSourceOptions options, ref T data)
 
unsafe void Write<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T > (string? eventName, ref EventSourceOptions options, ref Guid activityId, ref Guid relatedActivityId, ref T data)
 

Static Public Member Functions

static Guid GetGuid (Type eventSourceType)
 
static string GetName (Type eventSourceType)
 
static ? string GenerateManifest ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type eventSourceType, string? assemblyPathToIncludeInManifest)
 
static ? string GenerateManifest ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type eventSourceType, string? assemblyPathToIncludeInManifest, EventManifestOptions flags)
 
static IEnumerable< EventSourceGetSources ()
 
static void SendCommand (EventSource eventSource, EventCommand command, IDictionary< string, string?>? commandArguments)
 
static void SetCurrentThreadActivityId (Guid activityId)
 
static void SetCurrentThreadActivityId (Guid activityId, out Guid oldActivityThatWillContinue)
 

Static Public Attributes

static DiagnosticSourceEventSource Log = new DiagnosticSourceEventSource()
 

Protected Member Functions

override void OnEventCommand (EventCommandEventArgs command)
 
unsafe void WriteEvent (int eventId)
 
unsafe void WriteEvent (int eventId, int arg1)
 
unsafe void WriteEvent (int eventId, int arg1, int arg2)
 
unsafe void WriteEvent (int eventId, int arg1, int arg2, int arg3)
 
unsafe void WriteEvent (int eventId, long arg1)
 
unsafe void WriteEvent (int eventId, long arg1, long arg2)
 
unsafe void WriteEvent (int eventId, long arg1, long arg2, long arg3)
 
unsafe void WriteEvent (int eventId, string? arg1)
 
unsafe void WriteEvent (int eventId, string? arg1, string? arg2)
 
unsafe void WriteEvent (int eventId, string? arg1, string? arg2, string? arg3)
 
unsafe void WriteEvent (int eventId, string? arg1, int arg2)
 
unsafe void WriteEvent (int eventId, string? arg1, int arg2, int arg3)
 
unsafe void WriteEvent (int eventId, string? arg1, long arg2)
 
unsafe void WriteEvent (int eventId, long arg1, string? arg2)
 
unsafe void WriteEvent (int eventId, int arg1, string? arg2)
 
unsafe void WriteEvent (int eventId, byte[]? arg1)
 
unsafe void WriteEvent (int eventId, long arg1, byte[]? arg2)
 
unsafe void WriteEvent (int eventId, params object?[] args)
 
unsafe void WriteEventCore (int eventId, int eventDataCount, EventData *data)
 
unsafe void WriteEventWithRelatedActivityIdCore (int eventId, Guid *relatedActivityId, int eventDataCount, EventData *data)
 
unsafe void WriteEventWithRelatedActivityId (int eventId, Guid relatedActivityId, params object?[] args)
 
virtual void Dispose (bool disposing)
 

Package Types

enum  ActivityEvents { None = 0 , ActivityStart = 1 , ActivityStop = 2 , All = 3 }
 

Package Functions

void SendCommand (EventListener listener, EventProviderType eventProviderType, int perEventSourceSessionId, int etwSessionId, EventCommand command, bool enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary< string, string > commandArguments)
 
void DispatchToAllListeners (EventWrittenEventArgs eventCallbackArgs)
 
void DoCommand (EventCommandEventArgs commandArgs)
 
bool EnableEventForDispatcher (EventDispatcher dispatcher, EventProviderType eventProviderType, int eventId, bool value)
 
void AddListener (EventListener listener)
 
void ReportOutOfBandMessage (string msg)
 
unsafe void WriteMultiMerge (string eventName, ref EventSourceOptions options, TraceLoggingEventTypes eventTypes, Guid *activityID, Guid *childActivityID, EventData *data)
 

Static Package Functions

static EventOpcode GetOpcodeWithDefault (EventOpcode opcode, string eventName)
 
static bool IsCustomAttributeDefinedHelper (MemberInfo member, Type attributeType, EventManifestOptions flags=EventManifestOptions.None)
 
static Attribute GetCustomAttributeHelper (MemberInfo member, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.PublicProperties)] Type attributeType, EventManifestOptions flags=EventManifestOptions.None)
 

Package Attributes

int m_id
 
volatile EventMetadata[] m_eventData
 
EventLevel m_level
 
EventKeywords m_matchAnyKeyword
 
volatile EventDispatcher m_Dispatchers
 
volatile ulong[] m_channelData
 

Static Package Attributes

const string s_ActivityStartSuffix = "Start"
 
const string s_ActivityStopSuffix = "Stop"
 
const string DuplicateSourceNamesSwitch = "System.Diagnostics.Tracing.EventSource.AllowDuplicateSourceNames"
 

Properties

static bool IsSupported = InitializeIsSupported() [get]
 
string Name [get]
 
Guid Guid [get]
 
EventSourceSettings Settings [get]
 
ExceptionConstructionException [get]
 
static Guid CurrentThreadActivityId [get]
 
bool IsDisposed [get]
 
bool ThrowOnEventWriteErrors [get]
 
bool SelfDescribingEvents [get]
 
virtual ReadOnlySpan< byte > ProviderMetadata [get]
 
EventHandler< EventCommandEventArgs >? EventCommandExecuted
 

Private Member Functions

void Event (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void Activity1Start (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void Activity1Stop (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void Activity2Start (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void Activity2Stop (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void RecursiveActivity1Start (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void RecursiveActivity1Stop (string SourceName, string EventName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void NewDiagnosticListener (string SourceName)
 
void ActivityStart (string SourceName, string ActivityName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
void ActivityStop (string SourceName, string ActivityName, IEnumerable< KeyValuePair< string, string > > Arguments)
 
 DiagnosticSourceEventSource ()
 
void BreakPointWithDebuggerFuncEval ()
 
unsafe void DefineEventPipeEvents ()
 
unsafe void WriteEventRaw (string eventName, ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid *activityID, Guid *relatedActivityID, int dataCount, IntPtr data)
 
unsafe void Initialize (Guid eventSourceGuid, string eventSourceName, string[] traits)
 
EventDispatcher GetDispatcher (EventListener listener)
 
unsafe void WriteEventVarargs (int eventId, Guid *childActivityID, object[] args)
 
object[] SerializeEventArgs (int eventId, object[] args)
 
void LogEventArgsMismatches (int eventId, object[] args)
 
unsafe void WriteToAllListeners (EventWrittenEventArgs eventCallbackArgs, int eventDataCount, EventData *data)
 
unsafe void WriteToAllListeners (string eventName, ref EventDescriptor eventDescriptor, EventTags tags, Guid *pActivityId, Guid *pChildActivityId, EventPayload payload)
 
unsafe void WriteEventString (string msgString)
 
void WriteStringToAllListeners (string eventName, string msg)
 
bool IsEnabledByDefault (int eventNum, bool enable, EventLevel currentLevel, EventKeywords currentMatchAnyKeyword)
 
bool IsEnabledCommon (bool enabled, EventLevel currentLevel, EventKeywords currentMatchAnyKeyword, EventLevel eventLevel, EventKeywords eventKeywords, EventChannel eventChannel)
 
void ThrowEventSourceException (string eventName, Exception innerEx=null)
 
bool AnyEventEnabled ()
 
void EnsureDescriptorsInitialized ()
 
unsafe void SendManifest (byte[] rawManifest)
 
unsafe void WriteMultiMerge (string eventName, ref EventSourceOptions options, TraceLoggingEventTypes eventTypes, Guid *activityID, Guid *childActivityID, params object[] values)
 
unsafe void WriteMultiMergeInner (string eventName, ref EventSourceOptions options, TraceLoggingEventTypes eventTypes, Guid *activityID, Guid *childActivityID, params object[] values)
 
unsafe void WriteImpl (string eventName, ref EventSourceOptions options, object data, Guid *pActivityId, Guid *pRelatedActivityId, TraceLoggingEventTypes eventTypes)
 
void InitializeProviderMetadata ()
 
NameInfo UpdateDescriptor (string name, TraceLoggingEventTypes eventInfo, ref EventSourceOptions options, out EventDescriptor descriptor)
 

Static Private Member Functions

static string NewLineSeparate (string str1, string str2)
 
static bool InitializeIsSupported ()
 
static string GetName (Type eventSourceType, EventManifestOptions flags)
 
static Guid GenerateGuidFromName (string name)
 
static unsafe void DecodeObjects (object[] decodedObjects, Type[] parameterTypes, EventData *data)
 
static unsafe void AssertValidString (EventData *data)
 
static bool AttributeTypeNamesMatch (Type attributeType, Type reflectedAttributeType)
 
static Type GetEventSourceBaseType (Type eventSourceType, bool allowEventSourceOverride, bool reflectionOnly)
 
static byte[] CreateManifestAndDescriptors ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type eventSourceType, string eventSourceDllName, EventSource source, EventManifestOptions flags=EventManifestOptions.None)
 
static bool RemoveFirstArgIfRelatedActivityId (ref ParameterInfo[] args)
 
static void AddProviderEnumKind (ManifestBuilder manifest, FieldInfo staticField, string providerEnumKind)
 
static void AddEventDescriptor ([NotNull] ref EventMetadata[] eventData, string eventName, EventAttribute eventAttribute, ParameterInfo[] eventParameters, bool hasRelatedActivityID)
 
static void TrimEventDescriptors (ref EventMetadata[] eventData)
 
static void DebugCheckEvent (ref Dictionary< string, string > eventsByName, EventMetadata[] eventData, MethodInfo method, EventAttribute eventAttribute, ManifestBuilder manifest, EventManifestOptions options)
 
static int GetHelperCallFirstArg (MethodInfo method)
 
static EventSourceSettings ValidateSettings (EventSourceSettings settings)
 
static unsafe void WriteCleanup (GCHandle *pPins, int cPins)
 
static int AddValueToMetaData (List< byte > metaData, string value)
 
static int HexDigit (char c)
 

Private Attributes

readonly string AspNetCoreHostingKeywordValue = "Microsoft.AspNetCore/Microsoft.AspNetCore.Hosting.BeginRequest@Activity1Start:-httpContext.Request.Method;httpContext.Request.Host;httpContext.Request.Path;httpContext.Request.QueryString\nMicrosoft.AspNetCore/Microsoft.AspNetCore.Hosting.EndRequest@Activity1Stop:-httpContext.TraceIdentifier;httpContext.Response.StatusCode"
 
readonly string EntityFrameworkCoreCommandsKeywordValue = "Microsoft.EntityFrameworkCore/Microsoft.EntityFrameworkCore.BeforeExecuteCommand@Activity2Start:-Command.Connection.DataSource;Command.Connection.Database;Command.CommandText\nMicrosoft.EntityFrameworkCore/Microsoft.EntityFrameworkCore.AfterExecuteCommand@Activity2Stop:-"
 
volatile bool _false
 
FilterAndTransform _specs
 
FilterAndTransform _activitySourceSpecs
 
ActivityListener _activityListener
 
string m_name
 
Guid m_guid
 
volatile byte[] m_rawManifest
 
EventHandler< EventCommandEventArgs > m_eventCommandExecuted
 
readonly EventSourceSettings m_config
 
bool m_eventSourceDisposed
 
bool m_eventSourceEnabled
 
volatile OverrideEventProvider m_etwProvider
 
object m_createEventLock
 
IntPtr m_writeEventStringEventHandle = IntPtr.Zero
 
volatile OverrideEventProvider m_eventPipeProvider
 
bool m_completelyInited
 
Exception m_constructionException
 
byte m_outOfBandMessageCount
 
EventCommandEventArgs m_deferredCommands
 
string[] m_traits
 
ActivityTracker m_activityTracker
 
byte[] m_providerMetadata
 
readonly TraceLoggingEventHandleTable m_eventHandleTable
 

Static Private Attributes

const DynamicallyAccessedMemberTypes ManifestMemberTypes = DynamicallyAccessedMemberTypes.All
 
static byte m_EventSourceExceptionRecurenceCount
 
static readonly bool AllowDuplicateSourceNames = AppContext.TryGetSwitch("System.Diagnostics.Tracing.EventSource.AllowDuplicateSourceNames", out var isEnabled) && isEnabled
 
const string EventSourceRequiresUnreferenceMessage = "EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type"
 
const string EventSourceSuppressMessage = "Parameters to this method are primitive and are trimmer safe"
 

Detailed Description

Definition at line 14 of file DiagnosticSourceEventSource.cs.


The documentation for this class was generated from the following file: