ActionContext.cs 772 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace ServiceStack.Host
  3. {
  4. /// <summary>
  5. /// Context to capture IService action
  6. /// </summary>
  7. public class ActionContext
  8. {
  9. public const string AnyAction = "ANY";
  10. public string Id { get; set; }
  11. public ActionInvokerFn ServiceAction { get; set; }
  12. public MediaBrowser.Model.Services.IHasRequestFilter[] RequestFilters { get; set; }
  13. public static string Key(Type serviceType, string method, string requestDtoName)
  14. {
  15. return serviceType.FullName + " " + method.ToUpper() + " " + requestDtoName;
  16. }
  17. public static string AnyKey(Type serviceType, string requestDtoName)
  18. {
  19. return Key(serviceType, AnyAction, requestDtoName);
  20. }
  21. }
  22. }