You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
700 B
25 lines
700 B
using Connected.Data.DataProtection;
|
|
using Connected.Data.EntityProtection;
|
|
using Connected.Middleware;
|
|
using Connected.ServiceModel;
|
|
using Logistics.Documents.Receive;
|
|
|
|
namespace Logistics.Documents.Protection;
|
|
internal sealed class ReceiveProtector : MiddlewareComponent, IEntityProtector<IReceiveDocument>
|
|
{
|
|
public ReceiveProtector(IReceiveDocumentService documents)
|
|
{
|
|
Documents = documents;
|
|
}
|
|
|
|
public IReceiveDocumentService Documents { get; }
|
|
|
|
public async Task Invoke(EntityProtectionArgs<IReceiveDocument> args)
|
|
{
|
|
if (await Documents.Select(new PrimaryKeyArgs<int> { Id = args.Entity.Id }) is not IReceiveDocument document)
|
|
return;
|
|
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|