Port v7@2aa0dfb2c5 - WIP

This commit is contained in:
Stephan
2018-03-21 14:40:59 +01:00
parent 41948607d0
commit 8bfb8e2b72
46 changed files with 1240 additions and 159 deletions

View File

@@ -0,0 +1,18 @@
namespace Umbraco.Core.Models
{
/// <summary>
/// Provides extension methods for the <see cref="IConsent"/> interface.
/// </summary>
public static class ConsentExtensions
{
/// <summary>
/// Determines whether the consent is granted.
/// </summary>
public static bool IsGranted(this IConsent consent) => (consent.State & ConsentState.Granted) > 0;
/// <summary>
/// Determines whether the consent is revoked.
/// </summary>
public static bool IsRevoked(this IConsent consent) => (consent.State & ConsentState.Revoked) > 0;
}
}