public static ValueTask EnsureDelete(this ISecurityValidator securityValidator, Session session, object entity) { if (securityValidator == null) { throw new ArgumentNullException(nameof(securityValidator)); } return(securityValidator.EnsureOperation(session, SecurityOperation.Delete, entity)); }
public static ValueTask EnsureAddOrUpdate(this ISecurityValidator securityValidator, Retrospective retrospective, object entity) { if (securityValidator == null) { throw new ArgumentNullException(nameof(securityValidator)); } return(securityValidator.EnsureOperation(retrospective, SecurityOperation.AddOrUpdate, entity)); }