aboutsummaryrefslogtreecommitdiff
path: root/ServiceStack/Host/ActionContext.cs
blob: 9f165cff1534c0aa8b700494d13fcb1ae13afc9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;

namespace ServiceStack.Host
{
    /// <summary>
    /// Context to capture IService action
    /// </summary>
    public class ActionContext
    {
        public const string AnyAction = "ANY";

        public string Id { get; set; }

        public ActionInvokerFn ServiceAction { get; set; }
        public MediaBrowser.Model.Services.IHasRequestFilter[] RequestFilters { get; set; }

        public static string Key(Type serviceType, string method, string requestDtoName)
        {
            return serviceType.FullName + " " + method.ToUpper() + " " + requestDtoName;
        }

        public static string AnyKey(Type serviceType, string requestDtoName)
        {
            return Key(serviceType, AnyAction, requestDtoName);
        }
    }
}