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
public static bool TryDecorate(this IServiceCollection services, DecorationStrategy strategy, bool useFactory) | |
{ | |
if (!useFactory) | |
return services.TryDecorate(strategy); | |
var decorated = false; | |
for (var i = services.Count - 1; i >= 0; i--) | |
{ | |
var serviceDescriptor = services[i]; |