bumpy-grass-5450802/17/2023, 12:07 AM
i read in the provider inputs, build up my implementation-specific http client pointed at my custom API, and store that to a private instance field. then later in
i attempt to use the http client to actually perform the actions i need to.
however, i am seeing the client is null during Create, and after some logging i see that my Provider class is being instantiated several times but only once Configured
echoing-dinner-1953102/17/2023, 9:17 AM
if that is the case, is it safe to just store my provider-specific http client inside a private static field? seems like each provider instance may be isolated in different .net processesprivate instance fields should work. I'll look into this for you! The intention is supposed to be your "Provider" object gets created once when the engine attaches, then the engine call configure allowing you to set up any instance state, and then everything else gets called. I have probably just screwed something up in the AspNet DI layer and not told it that providers should be singletons. For the time being static state will probably be a good workaround, the engine will start a whole new process for each provider instance it sees so you should be safe using static state.
bumpy-grass-5450802/17/2023, 12:17 PM
echoing-dinner-1953102/18/2023, 12:19 PM
bumpy-grass-5450802/20/2023, 3:22 PM