System.Data.ExpressionNode.Eval C# (CSharp) Метод

Eval() абстрактный приватный Метод

abstract private Eval ( ) : object
Результат object
        internal abstract object Eval();
        internal abstract object Eval(DataRow row, DataRowVersion version);

Same methods

ExpressionNode::Eval ( DataRow row, DataRowVersion version ) : object
ExpressionNode::Eval ( int recordNos ) : object

Usage Example

        internal object Evaluate(DataRow row, DataRowVersion version)
        {
            object result;

            if (!_bound)
            {
                Bind(_table);
            }
            if (_expr != null)
            {
                result = _expr.Eval(row, version);
                // if the type is a SqlType (StorageType.Uri < _storageType), convert DBNull values.
                if (result != DBNull.Value || StorageType.Uri < _storageType)
                {
                    // we need to convert the return value to the column.Type;
                    try
                    {
                        if (StorageType.Object != _storageType)
                        {
                            result = SqlConvert.ChangeType2(result, _storageType, _dataType, _table.FormatProvider);
                        }
                    }
                    catch (Exception e) when(ADP.IsCatchableExceptionType(e))
                    {
                        ExceptionBuilder.TraceExceptionForCapture(e);
                        throw ExprException.DatavalueConvertion(result, _dataType, e);
                    }
                }
            }
            else
            {
                result = null;
            }
            return(result);
        }
All Usage Examples Of System.Data.ExpressionNode::Eval