Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Threading.Tasks.TplEventSource Class Referencesealed

Classes

class  Keywords
 
class  Tasks
 

Public Types

enum  TaskWaitBehavior { Synchronous = 1 , Asynchronous }
 

Public Member Functions

unsafe void TaskScheduled (int OriginatingTaskSchedulerID, int OriginatingTaskID, int TaskID, int CreatingTaskID, int TaskCreationOptions, int appDomain=1)
 
void TaskStarted (int OriginatingTaskSchedulerID, int OriginatingTaskID, int TaskID)
 
unsafe void TaskCompleted (int OriginatingTaskSchedulerID, int OriginatingTaskID, int TaskID, bool IsExceptional)
 
unsafe void TaskWaitBegin (int OriginatingTaskSchedulerID, int OriginatingTaskID, int TaskID, TaskWaitBehavior Behavior, int ContinueWithTaskID)
 
void TaskWaitEnd (int OriginatingTaskSchedulerID, int OriginatingTaskID, int TaskID)
 
void TaskWaitContinuationComplete (int TaskID)
 
void TaskWaitContinuationStarted (int TaskID)
 
unsafe void AwaitTaskContinuationScheduled (int OriginatingTaskSchedulerID, int OriginatingTaskID, int ContinueWithTaskId)
 
unsafe void TraceOperationBegin (int TaskID, string OperationName, long RelatedContext)
 
void TraceOperationRelation (int TaskID, CausalityRelation Relation)
 
void TraceOperationEnd (int TaskID, AsyncCausalityStatus Status)
 
void TraceSynchronousWorkBegin (int TaskID, CausalitySynchronousWork Work)
 
unsafe void TraceSynchronousWorkEnd (CausalitySynchronousWork Work)
 
unsafe void RunningContinuation (int TaskID, object Object)
 
unsafe void RunningContinuationList (int TaskID, int Index, object Object)
 
void RunningContinuationList (int TaskID, int Index, long Object)
 
void DebugFacilityMessage (string Facility, string Message)
 
void DebugFacilityMessage1 (string Facility, string Message, string Value1)
 
void SetActivityId (Guid NewId)
 
void NewID (int TaskID)
 
void IncompleteAsyncMethod (IAsyncStateMachineBox stateMachineBox)
 
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 readonly TplEventSource Log = new TplEventSource()
 

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 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 Guid CreateGuidForTaskID (int taskID)
 
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

bool TasksSetActivityIds
 
bool Debug
 
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

override ReadOnlySpan< byte > ProviderMetadata [get]
 
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]
 
EventHandler< EventCommandEventArgs >? EventCommandExecuted
 

Private Member Functions

 TplEventSource (int _)
 
void RunningContinuation (int TaskID, long Object)
 
void IncompleteAsyncMethod (string stateMachineDescription)
 
 TplEventSource ()
 
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 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

bool DebugActivityId
 
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 string EventSourceSuppressMessage = "Parameters to this method are primitive and are trimmer safe"
 
const int DefaultAppDomainID = 1
 
const int TASKSCHEDULED_ID = 7
 
const int TASKSTARTED_ID = 8
 
const int TASKCOMPLETED_ID = 9
 
const int TASKWAITBEGIN_ID = 10
 
const int TASKWAITEND_ID = 11
 
const int AWAITTASKCONTINUATIONSCHEDULED_ID = 12
 
const int TASKWAITCONTINUATIONCOMPLETE_ID = 13
 
const int TASKWAITCONTINUATIONSTARTED_ID = 19
 
const int TRACEOPERATIONSTART_ID = 14
 
const int TRACEOPERATIONSTOP_ID = 15
 
const int TRACEOPERATIONRELATION_ID = 16
 
const int TRACESYNCHRONOUSWORKSTART_ID = 17
 
const int TRACESYNCHRONOUSWORKSTOP_ID = 18
 
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"
 

Detailed Description

Definition at line 9 of file TplEventSource.cs.


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