public MyListener(ITriggeredFunctionExecutor executor, MyCustomTriggerAttribute attribute)
        {
            _attribute = attribute;

            _timer = new Timer(s =>
            {
                // Set trigger value here...
                executor.TryExecuteAsync(new TriggeredFunctionData {
                    TriggerValue = DateTime.UtcNow.ToString("o")
                },
                                         CancellationToken.None);
            },
                               null, TimeSpan.FromSeconds(300), TimeSpan.FromSeconds(_attribute.Interval));
        }
Example #2
0
 public MyTriggerBinding(MyCustomTriggerAttribute attribute)
 {
     _attribute = attribute;
 }