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 TriggeredOrchestrationProcess | |
{ | |
public ctor(IDoSomethingFilter doSomethingFilter, | |
IPipe<DoSomethingMessage> pipe) | |
{ | |
// take in the dependencies | |
this.doSomethingFilter = doSomethingFilter | |
this.pipe = pipe | |
} | |
// this will be automatically triggered as soon | |
// as a message is recieved on the queue that this WebJob | |
// is listening on. | |
public void QueueTrigger(string message) | |
{ | |
// parse the message read from the queue | |
var inputData = DeserialiseFromJson(message) | |
// pass the parsed input data to the filter to do some processing | |
var result = doSomethingFilter.DoSomething(inputData) | |
// finally, write it out to a pipe (for e.g. queue) for the next | |
// step in the process. | |
pipe.Write(result) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment