Azure-docs: Unclear on where I can inject

Created on 25 May 2019  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

I followed the directions and ran into the same missing packages issues the others mentioned. But the reason for this comment is I had to change the code a lot.
I thought after following I would just be able to add the parameter to my function call. But I kept getting binding errors. So I figured it must be constructor injection. That required me to remove the static keyword from my function and class, add a constructor, private member for my type and initialize it and change function to use that member. None of that is mentioned at all. A sample of the final function would have cleared that up.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author azure-functionsvc docs-experience triaged

Most helpful comment

@DarqueWarrior - I updated the article based on your feedback. Let me know if you feel like the changes address your concern.

cc: @fplanjer, @benbelow

All 6 comments

@DarqueWarrior Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

I had the same problem and you comment saved my day!

I came to the same conclusion, and agree that adding to the documentation would be useful for future adopters

@DarqueWarrior - I updated the article based on your feedback. Let me know if you feel like the changes address your concern.

cc: @fplanjer, @benbelow

Much better. Pointing out it uses constructor injection is a great addition.

Now that the article is updated, #please-close this issue for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments