private IValueBinder CreateValueBinder(Type type, AzureClientAttribute attribute) { return((IValueBinder)Activator.CreateInstance( typeof(AzureClientValueProvider <>).MakeGenericType(type), _serviceProvider, _nameResolver.ResolveWholeString(attribute.Connection))); }
private IValueBinder CreateValueBinder(Type type, AzureClientAttribute attribute) { var name = _nameResolver.ResolveWholeString(attribute.Connection); var section = _configuration.GetWebJobsConnectionStringSection(name); if (!section.Exists()) { throw new InvalidOperationException($"Unable to find a configuration section with the name {name} to configure the client with."); } return(new AzureClientValueProvider( type, _componentFactory, section)); }