23 lines
593 B
C#
23 lines
593 B
C#
using System;
|
|
using System.Text;
|
|
using System.Globalization;
|
|
|
|
namespace ln.objects.catalog
|
|
{
|
|
public class ODBStringValue : ODBValue
|
|
{
|
|
|
|
public ODBStringValue(string s)
|
|
: base(0x01, s)
|
|
{ }
|
|
|
|
public override byte[] Serialize() => Encoding.UTF8.GetBytes((string)Value);
|
|
protected override int compare(ODBEntity other) => ((string)Value).CompareTo((other as ODBValue).Value);
|
|
|
|
static ODBStringValue()
|
|
{
|
|
RegisterDeserializer(0x01, (b, o, l) => new ODBStringValue(Encoding.UTF8.GetString(b, o, l)));
|
|
}
|
|
}
|
|
}
|