Skip to content

Instantly share code, notes, and snippets.

@bbenetskyy
Created April 17, 2022 15:52
Show Gist options
  • Save bbenetskyy/f129e00a8e33d00e9bcfb29b75e62ba4 to your computer and use it in GitHub Desktop.
Save bbenetskyy/f129e00a8e33d00e9bcfb29b75e62ba4 to your computer and use it in GitHub Desktop.
/// <summary>
/// Simple Background Work Manager to set and get work delegate
/// </summary>
/// <remarks>it's too simple to show how it's implemented, LOL</remarks>
public interface IBackgroundWorkManager
{
/// <summary>
/// Get Background Work
/// </summary>
Func<Task> GetBackgroundWork();
/// <summary>
/// Set Background Work
/// </summary>
void SetBackgroundWork(Func<Task> bgWork);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment