Skip to content

Commit 4f0f3e3

Browse files
committed
Revert "Turn scope by default for testing purposes"
This reverts commit bd6134c.
1 parent c06f4fe commit 4f0f3e3

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ExceptionHandlerOptions
2222
/// replace it on <see cref="HttpContext.RequestServices"/> when re-executing the request to handle an error.
2323
/// </summary>
2424
/// <remarks>The default value is <see langword="false"/>.</remarks>
25-
public bool CreateScopeForErrors { get; set; } = true;
25+
public bool CreateScopeForErrors { get; set; }
2626

2727
/// <summary>
2828
/// The <see cref="RequestDelegate" /> that will handle the exception. If this is not

src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerMiddlewareTest.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -396,29 +396,7 @@ private class TestServiceProvider : IServiceProvider
396396
{
397397
public object GetService(Type serviceType)
398398
{
399-
if (serviceType == typeof(IServiceScopeFactory))
400-
{
401-
return new TestServiceScopeFactory();
402-
}
403-
404399
throw new NotImplementedException();
405400
}
406401
}
407-
408-
private class TestServiceScopeFactory : IServiceScopeFactory
409-
{
410-
public IServiceScope CreateScope()
411-
{
412-
return new TestServiceScope();
413-
}
414-
}
415-
416-
private class TestServiceScope : IServiceScope
417-
{
418-
public IServiceProvider ServiceProvider => new TestServiceProvider();
419-
420-
public void Dispose()
421-
{
422-
}
423-
}
424402
}

0 commit comments

Comments
 (0)