Marlon Monroy
Aug 25, 2017 · 1 min read

Joe Erland In order to use it, youll need an instance of a dispatcher where you want to execute it, enviroment and the task. Once you have it you could do: but as you can see his using a promise so ill do it with a closure.

(im not seeing the code so is just out of a though)

………………………………………………………

let devEnv = Enviroment(name:”dev”)

let loginDispatch = NetworkDispatcher(enviroment:denEnv)

let logintask = LoginOperationTask(user:”user”, pass:”pass”)

loginTask.execute(loginDispatch, { result in

print(result)

})

……………………………………………………

If i dint miss enything i think thats how youll use it, although like i said im using a closure for the result, i hope you get the idea.

)