Created
February 1, 2020 07:19
-
-
Save PradeepLoganathan/d901587a375097bcf90b0f1596e48511 to your computer and use it in GitHub Desktop.
Dispose services in the service container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void DisposeServices() | |
{ | |
if (_serviceProvider == null) | |
{ | |
return; | |
} | |
if (_serviceProvider is IDisposable) | |
{ | |
((IDisposable)_serviceProvider).Dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment