What is the use for Task.FromResult in C#
There are two common use cases I’ve found: When you’re implementing an interface that allows asynchronous callers, but your implementation is synchronous. When you’re stubbing/mocking asynchronous code for testing.