Пример #1
0
    public static bool Require(Action <ISecurityExpression> action)
    {
        var expression = new SecurityExpressionBuilder();

        action.Invoke(expression);
        return(expression.Eval());
    }
Пример #2
0
    public static void ExcpetionIf(Action <ISecurityExpression> action)
    {
        var expression = new SecurityExpressionBuilder();

        action.Invoke(expression);
        if (expression.Eval())
        {
            throw new SecurityException(ExceptionText);
        }
    }