Last updated
Last updated
PUT
Subscribe(Event newEvent)
Invoking this method will subscribe the parameter passed to the list of subscribers for this Attempt; these subscribers get invoked when it succeeds.
PUT
AddTrier(TryDelegate trier)
Invoking this method will allow you to add a trier to the attempt; triers are functions of type bool that decide whether this attempt succeeds or not.
POST
Try()
Invoking this method will try to invoke the listeners on the Attempt, but it will only do it if the trier allows for it.
OPTIONS
Debug(bool debugAttempts = false, string name = "Debug")
Logs the names of the methods subscribed to this Attempt, and the Triers added.
Trier
object
Function that will be added as a trier for the attempt. Can be any function that returns a boolean.
Name
string
Simple name that you can give this debug, making it easier to not confuse it when debugging other things.
DebugAttempts
boolean
Determines whether you want to debug the triers of this attempt, or only the listeners.
NewEvent
object
Method we are trying to subscribe to this Attempt. Has to be of type Event.