public override int CompareSerialized(IDataInputView firstSource, IDataInputView secondSource)
        {
            var fs   = firstSource.ReadBool() ? 1 : 0;
            var ss   = secondSource.ReadBool() ? 1 : 0;
            var comp = fs - ss;

            return(AscendingComparison ? comp : -comp);
        }
예제 #2
0
        public override bool[] Deserialize(IDataInputView source)
        {
            var len    = source.ReadInt();
            var result = new bool[len];

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

            return(result);
        }
예제 #3
0
 public override bool Deserialize(bool reuse, IDataInputView source) => source.ReadBool();