Raven.Database.DocumentDatabase.AssertDeleteOperationNotVetoed C# (CSharp) Method

AssertDeleteOperationNotVetoed() private method

private AssertDeleteOperationNotVetoed ( string key, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void
key string
transactionInformation Raven.Abstractions.Data.TransactionInformation
return void
		private void AssertDeleteOperationNotVetoed(string key, TransactionInformation transactionInformation)
		{
			var vetoResult = DeleteTriggers
				.Select(trigger => new { Trigger = trigger, VetoResult = trigger.AllowDelete(key, transactionInformation) })
				.FirstOrDefault(x => x.VetoResult.IsAllowed == false);
			if (vetoResult != null)
			{
				throw new OperationVetoedException("DELETE vetoed by " + vetoResult.Trigger + " because: " + vetoResult.VetoResult.Reason);
			}
		}