Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap BFTask in object #296

Open
bvirlet opened this issue May 9, 2017 · 0 comments
Open

Wrap BFTask in object #296

bvirlet opened this issue May 9, 2017 · 0 comments

Comments

@bvirlet
Copy link

bvirlet commented May 9, 2017

Hello,

I want to create a Bolt task that depends on a lot of injected parameters.

Ideally, I would like to wrap my BFTask in a class in order to pass all the dependencies by injection when instantiating my object.

But doing so is not ideal because the object wouldn't be easily retained.

Eg.

func myFunc() {
   MyBigTask(injectedParams).task().continueOnSuccessWith( … )
}

What is a good strategy to create reusable bolt tasks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant