Last active
January 16, 2020 08:40
-
-
Save ItayPodhajcer/1a0eaa16fa54027045c94115acc345b1 to your computer and use it in GitHub Desktop.
ethereum-event-azure-function-trigger/EthereumEventTriggerBindingProvider
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 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