Пример #1
0
        public void Encode(object row)
        {
            var val = _getFunc(row);

            if (_nullable && val == null)
            {
                _builder.AppendNull();
            }
            else
            {
                var stringVal = Enum.GetName(_enumType, val);
                _size += stringVal.Length;
                _builder.Append(stringVal);
            }
        }
Пример #2
0
        public void Encode(object row)
        {
            var val = _getFunc(row);

            if (_nullable && val == null)
            {
                _builder.AppendNull();
            }
            else
            {
                var stringVal = (string)val;
                _size += stringVal.Length;
                _builder.Append(stringVal);
            }
        }