Exemple #1
0
        /// <summary>
        /// Builds an <see cref="GetNumberOfSignificantDigitsOp"/>.
        /// </summary>
        /// <param name="statement">The statement.</param>
        /// <returns>
        /// The operation.
        /// </returns>
        public static GetNumberOfSignificantDigitsOp GetNumberOfSignificantDigits(
            IReturningOperation <decimal> statement)
        {
            var result = new GetNumberOfSignificantDigitsOp(statement);

            return(result);
        }
Exemple #2
0
        /// <inheritdoc />
        public async Task <int> ExecuteAsync(
            GetNumberOfSignificantDigitsOp operation)
        {
            if (operation == null)
            {
                throw new ArgumentNullException(nameof(operation));
            }

            var value = await this.protocolFactory.GetProtocolAndExecuteViaReflectionAsync <decimal>(operation.Statement);

            var result = GetNumberOfSignificantDigit(value);

            return(result);
        }