Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,16 @@ public void Close_AfterXPathNavigatorTraced()
[Fact]
public void ListenerWithFilter()
{
int processId;
// Ensure we use an arbitrary ID that doesn't match the process ID or thread ID.
int traceTransferId = 1;
using (Process p = Process.GetCurrentProcess())
{
processId = p.Id;
while (traceTransferId == p.Id || traceTransferId == Environment.CurrentManagedThreadId)
{
traceTransferId++;
}
}

// Ensure we use an arbitrary ID that doesn't match the process ID.
int traceTransferId = processId + 1;

string file = GetTestFilePath();
Guid guid = Guid.NewGuid();
using (var listener = new XmlWriterTraceListener(file))
Expand Down