Newer
Older
RussianDoll / FilterAttribute.cs
@Derek Comartin Derek Comartin on 18 Aug 2021 538 bytes Init
using System;
using Paramore.Brighter;

namespace PipesAndFilters
{
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public class FilterAttribute : RequestHandlerAttribute
    {
        private readonly Type _handlerType;

        public FilterAttribute(int step, Type handlerType, HandlerTiming timing = HandlerTiming.Before) : base(step, timing)
        {
            _handlerType = handlerType;
        }

        public override Type GetHandlerType()
        {
            return _handlerType;
        }
    }
}