Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
Shirro
Posts
Comments
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Great thank you @TeBeConsulting
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Yep
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
So in that lamba (factory) it's fine to use another factory ?
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Also they have Factory.CreateClient(... differents keys) so I'm still DI compliant
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Ok that's what I thought about. Thank you @TeBeConsulting
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
I can't add a constructor take my Options
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
that's the problem
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Well I don't have the hand on the Client class
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
using a Options class ?
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Oh ok
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
I would like to centralize the configuration inside that lambda
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Well, then what's the point if it's only to create a non configurated Client
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
services.AddTransient(sp => {// code to create and configure my client ?} );
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Now I would like to know how do I implement that ?
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
This is not the case here, Transient is fine.
86 replies
C
C#
•
Created by Shirro on 1/27/2023 in
#help
❔ Client Api class best way to handle with depency injection
Ok so I will go transient, it's not a big deal
86 replies