コード例 #1
0
        public override int CompareSerialized(IDataInputView firstSource, IDataInputView secondSource)
        {
            var c1   = firstSource.ReadChar();
            var c2   = secondSource.ReadChar();
            var comp = (c1 < c2 ? -1 : (c1 == c2 ? 0 : 1));

            return(AscendingComparison ? comp : -comp);
        }
コード例 #2
0
        public override char[] Deserialize(IDataInputView source)
        {
            var len    = source.ReadInt();
            var result = new char[len];

            for (var i = 0; i < len; i++)
            {
                result[i] = source.ReadChar();
            }

            return(result);
        }
コード例 #3
0
 public override char Deserialize(IDataInputView source) => source.ReadChar();
コード例 #4
0
 public override void Copy(IDataInputView source, IDataOutputView target) => target.WriteChar(source.ReadChar());