Skip to content

Instantly share code, notes, and snippets.

@ItayPodhajcer
Last active January 16, 2020 08:40
Show Gist options
  • Save ItayPodhajcer/1a0eaa16fa54027045c94115acc345b1 to your computer and use it in GitHub Desktop.
Save ItayPodhajcer/1a0eaa16fa54027045c94115acc345b1 to your computer and use it in GitHub Desktop.
ethereum-event-azure-function-trigger/EthereumEventTriggerBindingProvider
public class EthereumEventTriggerBindingProvider : ITriggerBindingProvider
{
public Task<ITriggerBinding> TryCreateAsync(TriggerBindingProviderContext context)
{
var result = Task.FromResult<ITriggerBinding>(default);
var attribute = context.Parameter.GetCustomAttribute<EthereumEventTriggerAttribute>(false);
if (attribute != null)
{
result = Task.FromResult<ITriggerBinding>(new EthereumEventTriggerBinding(attribute));
}
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment