C# Class EventHubAPIApp.Controllers.TriggersController.InMemoryTriggerStore

Class for the InMemoryTriggerStore. How the Logic App works, it will call the PUSH trigger endpoint with the triggerID and CallBackURL - it is the job of the API App to then call the CallbackURL when an event happens. I utilize this InMemoryTriggerStore to store the triggers I am watching, so that I don't continue to spin up new listeners whenever the Logic App asks me to register a trigger. If the API App was ever to reset or lose connection, I would know I need to register new Event Hub Listeners as the InMemoryTriggerStore would be empty.
显示文件 Open project: logicappsio/EventHubAPI

Public Methods

Method Description
GetStore ( ) : List>.IDictionary
RegisterTrigger ( EventHubInput input ) : Task

The method that registers Event Hub listeners and assigns them to a Receive event. When I receive an event from the event hub listener, I trigger the callbackURL

TriggerLogicApps ( string callbackUrl, JToken message ) : void
UnregisterTrigger ( string callbackUrl ) : void

Private Methods

Method Description
InMemoryTriggerStore ( ) : EventHubAPIApp.Models

Method Details

GetStore() public method

public GetStore ( ) : List>.IDictionary
return List>.IDictionary

RegisterTrigger() public method

The method that registers Event Hub listeners and assigns them to a Receive event. When I receive an event from the event hub listener, I trigger the callbackURL
public RegisterTrigger ( EventHubInput input ) : Task
input EventHubAPIApp.Models.EventHubInput
return Task

TriggerLogicApps() public method

public TriggerLogicApps ( string callbackUrl, JToken message ) : void
callbackUrl string
message JToken
return void

UnregisterTrigger() public method

public UnregisterTrigger ( string callbackUrl ) : void
callbackUrl string
return void