Yes, I know I am confused on this and mentioning ISagaRepository is just a reflection of that :)
So, I need to inject a repository conforming to an interface into a Saga via its constructor. Which implementation that gets injected is determined by content of the message or the message header. I think a fairly typical multi-tenant requirement? I do this effectively with (non-saga) consumers using an implementation of IConsumerFactory<T> but I am confused - as you see!. In a consumer factory for a consumer I peek at the message and/or its header and use that information to resolve the consumer with the required service injected into its constructor.
I need to do the same thing with a saga so I am looking for an interface similar to IConsumerFactory<T> that I can implement where I can peek at the sagas incoming message and resolve the required service to inject it into the saga.
I could inject a lifetime scope into the saga and resolve the required service from that inside the saga, but I would prefer not to introduce the container into my sagas.
thanks again.