It does, but the way you're doing it isn't the proper way. You're trying to inject the service in a method. The runtime (SDK) finding your timer trigger isn't going to pass the service because it isn't aware of it. The service needs to be injected in the constructor of your TimerFunctions
class.
public class Functions
{
private readonly IMyClass diTest;
public Functions(IMyClass diTest)
{
this.diTest = diTest;
}
public void ProcesTimerTrigger([TimerTrigger("*/5 * * * *")] TimerInfo timer, ILogger logger)
{
diTest.WorkIt();
logger.LogInformation("Timer elapsed...");
}
public void ProcessQueueMessage([QueueTrigger("queue")] string message, ILogger log)
{
diTest.WorkIt();
log.LogInformation(message);
}
}
Also, you don't need to use a TimerTrigger. You can configure your web job as a triggered job at your desired interval.