aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Services/IHasRequestFilter.cs
blob: c5c6ccf59285202ba89c059f13b272ed0bad1a5a (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
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MediaBrowser.Model.Services
{
    public interface IHasRequestFilter
    {
        /// <summary>
        /// Order in which Request Filters are executed. 
        /// &lt;0 Executed before global request filters
        /// &gt;0 Executed after global request filters
        /// </summary>
        int Priority { get; }

        /// <summary>
        /// The request filter is executed before the service.
        /// </summary>
        /// <param name="req">The http request wrapper</param>
        /// <param name="res">The http response wrapper</param>
        /// <param name="requestDto">The request DTO</param>
        void RequestFilter(IRequest req, IResponse res, object requestDto);

        /// <summary>
        /// A new shallow copy of this filter is used on every request.
        /// </summary>
        /// <returns></returns>
        IHasRequestFilter Copy();
    }
}