Пример #1
0
        /// <summary>
        /// Builds an <see cref="NotOp"/>.
        /// </summary>
        /// <param name="statement">The statement.</param>
        /// <returns>
        /// The operation.
        /// </returns>
        public static NotOp Not(
            IReturningOperation <bool> statement)
        {
            var result = new NotOp(statement);

            return(result);
        }
Пример #2
0
        /// <inheritdoc />
        public async Task <bool> ExecuteAsync(
            NotOp operation)
        {
            if (operation == null)
            {
                throw new ArgumentNullException(nameof(operation));
            }

            var result = !(await this.protocolFactory.GetProtocolAndExecuteViaReflectionAsync <bool>(operation.Statement));

            return(result);
        }
Пример #3
0
        /// <inheritdoc />
        public bool Execute(
            NotOp operation)
        {
            if (operation == null)
            {
                throw new ArgumentNullException(nameof(operation));
            }

            var result = !this.protocolFactory.GetProtocolAndExecuteViaReflection <bool>(operation.Statement);

            return(result);
        }