IInvoke.cs 434 B

1234567891011121314151617181920212223242526
  1. namespace KYFramework;
  2. public interface IInvoke
  3. {
  4. Type Type { get; }
  5. }
  6. public abstract class AInvokeHandler<A> : IInvoke where A : struct
  7. {
  8. public Type Type
  9. {
  10. get { return typeof(A); }
  11. }
  12. public abstract void Handle(A a);
  13. }
  14. public abstract class AInvokeHandler<A, T> : IInvoke where A : struct
  15. {
  16. public Type Type
  17. {
  18. get { return typeof(A); }
  19. }
  20. public abstract T Handle(A a);
  21. }