public override ByteString Concat(ByteString that)
{
if (that.IsEmpty) return this;
if (this.IsEmpty) return that;
var b1C = that as ByteString1C;
if (b1C != null)
return new ByteStrings(this, b1C.ToByteString1());
var b1 = that as ByteString1;
if (b1 != null)
{
if (_bytes == b1._bytes && (_startIndex + _length == b1._startIndex))
return new ByteString1(_bytes, _startIndex, _length + b1._length);
return new ByteStrings(this, b1);
}
var bs = that as ByteStrings;
if (bs != null)
{
return Create(this, bs);
}
throw new InvalidOperationException();
}