void Verify(ContextFormatter sut, ContextDetails details) { var thread = details.Threading.Thread; sut.Get(details) .Should() .Be($"[{TimestampFormatter.Default.Get(Epoch.Default)}] {details.Details.Name}: Task: {details.Task.TaskId.OrNone()}, Default/Current Scheduler: {details.Task.Default.Id}/{details.Task.Default.Id}, Thread: #{thread.ManagedThreadId} {thread.Priority} {thread.Name.OrNone()}, SynchronizationContext: {details.Threading.Synchronization.OrNone()}"); }
public OperationState(ContextDetails contextDetails, CancellationToken token = new CancellationToken()) { ContextDetails = contextDetails; Token = token; }