But this should never happen, these is no reason to create an unusable instance. The real instance should be resolved in the same way however the current workflow resolves it.
But this should never happen, these is no reason to create an unusable instance. The real instance should be resolved in the same way however the current workflow resolves it.
You can jump through a bunch of hoops like requiring interfaces which is what some frameworks do. But in our case, we just decided to make it easy to reference the method without invoking it or its instance.
You can parse an expression to serialize it and run it on a different server etc
See e.g. https://github.com/6bee/Remote.Linq
Of course the "Ref" pattern is user-choice/suggested-pattern, it's not a requirement in any of our calls that just take simple delegates however you can create those delegates. So I may be able to work it in there.
E.g. https://docs.hangfire.io/en/latest/background-methods/passin...
BackgroundJob.Enqueue<EmailSender>(x => x.Send(13, "Hello!"));