79484751

Date: 2025-03-04 20:05:16
Score: 1
Natty:
Report link

Since hosted services are registered as singleton, one good approach may be to create a separate singleton class to hold the shared data. So your background service (MyService) can inject this class and update its state. Then you can use anywhere in your API to read this data.

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: NenadM