public void Acquire_WhenAcquiredWithDispose_ShouldReturnNew() { IEventScope firstScope = this.testee.Acquire(); firstScope.Dispose(); using (IEventScope secondScope = this.testee.Acquire()) { firstScope.Should().NotBeSameAs(secondScope); } }
public Task StopAsync(CancellationToken cancellationToken) { _eventScope?.Dispose(); return(Task.CompletedTask); }