Esempio n. 1
0
        protected override DataFrames.DataNode ArrayToNode(bool[] array, DataFrames.DataNode node)
        {
            BitArray bits = new BitArray(array);

            byte[] data = new byte[(bits.Count + 7) / 8];

            bits.CopyTo(data, 0);

            node.ReplaceNode(data);

            return(node);
        }
Esempio n. 2
0
        protected override char[] NodeToArray(DataFrames.DataNode node)
        {
            DataValue value = node as DataValue;

            char[] ret = null;

            if ((value != null) && (value.Value is string))
            {
                ret = ((string)value.Value).ToCharArray();
            }
            else
            {
                if (!Config.NoConversion)
                {
                    ret = _encoding.GetChars(node.ToArray());
                }
            }

            return(ret);
        }