Proxy.cs 474 B

12345678910111213141516171819202122232425
  1. namespace AmrControl.Common
  2. {
  3. /// <summary>
  4. /// 代理处理类
  5. /// </summary>
  6. public class Proxy
  7. {
  8. /// <summary>
  9. /// 执行器
  10. /// </summary>
  11. private readonly Action _action;
  12. public Proxy(Action action)
  13. {
  14. _action = action;
  15. }
  16. /// <summary>
  17. /// 执行代理逻辑
  18. /// </summary>
  19. public void Invoke()
  20. {
  21. _action();
  22. }
  23. }
  24. }