using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FilterSamples.Filters
{
    public class SampleActionFilter : Attribute, IActionFilter, IOrderedFilter
    {
        public SampleActionFilter(int order)
        {
            this.Order = order;
        }

        public int Order { get; } = 0;

        public void OnActionExecuted(ActionExecutedContext context)
        {
            context.Canceled = true;
        }

        public void OnActionExecuting(ActionExecutingContext context)
        {
           
           
        }
    }
}
