dotnet-cqrs/OpenHarbor.CQRS.AspNetCore/Mvc/CommandControllerAuthorizationAttribute.cs
Mathias Beaulieu-Duncan 1c81288895 update namespaces
refactor the name of the organisation
2023-11-04 15:24:56 -04:00

21 lines
559 B
C#

using System;
using Microsoft.AspNetCore.Mvc;
namespace OpenHarbor.CQRS.AspNetCore.Mvc;
[AttributeUsage(AttributeTargets.Method)]
public class CommandControllerAuthorizationAttribute : TypeFilterAttribute
{
public CommandControllerAuthorizationAttribute() : base(typeof(CommandControllerAsyncAuthorizationFilter))
{
}
public CommandControllerAuthorizationAttribute(Type commandType) : base(typeof(CommandControllerAsyncAuthorizationFilter))
{
CommandType = commandType;
}
public Type CommandType { get; } = null;
}