ServiceActionBind.cs 516 B

123456789101112131415161718192021
  1. using System;
  2. namespace Cbdx
  3. {
  4. internal class ServiceActionBind
  5. {
  6. private readonly object _serviceInstance;
  7. private readonly Func<string, object, object> _bindFunc;
  8. public object Invoke(string json)
  9. {
  10. return _bindFunc(json, _serviceInstance);
  11. }
  12. public ServiceActionBind(object serviceInstance, Func<string, object, object> bindFunc)
  13. {
  14. _serviceInstance = serviceInstance;
  15. _bindFunc = bindFunc;
  16. }
  17. }
  18. }