Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class UserTokenExtensionProvider : IExtensionConfigProvider
{
private readonly IConfiguration _configuration;
public UserTokenExtensionProvider(IConfiguration configuration)
{
_configuration = configuration;
}
public void Initialize(ExtensionConfigContext context)
{
var serviceCollection = new ServiceCollection();
serviceCollection.RegisterDependencies();
serviceCollection.AddSingleton<IConfiguration>(_configuration);
var serviceProvider = serviceCollection.BuildServiceProvider();
context.AddBindingRule<UserTokenAttribute>().Bind(new UserTokenBindingProvider(serviceProvider));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.