Cannot resolve a service with a contract type and a name that has been registered using a function delegate and name.