Skip to content

Commit d7e92cf

Browse files
committed
ETW custom source: fixed task names.
1 parent 5933ef0 commit d7e92cf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Diagnostics/PostSharp.Samples.Logging.Etw.CustomSource/MyEventSource.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,13 @@ internal void ExecutionPoint(string role, string type, string context, string me
169169
throw new InvalidOperationException(invalidOperationExceptionMessage);
170170
}
171171

172+
// We need to repeat this, otherwise the ETW framework for .NET will ignore the class.
173+
public new static class Tasks
174+
{
175+
public const EventTask Method = PostSharpEventSource.Tasks.Method;
176+
public const EventTask CustomActivity = PostSharpEventSource.Tasks.CustomActivity;
177+
public const EventTask Message = PostSharpEventSource.Tasks.Message;
178+
}
179+
172180
}
173181
}

0 commit comments

Comments
 (0)