29 lines
692 B
C#
29 lines
692 B
C#
using System;
|
|
namespace ln.types.odb.values
|
|
{
|
|
public class ODBDouble : ODBValue
|
|
{
|
|
public ODBDouble()
|
|
:base(0x18)
|
|
{
|
|
}
|
|
public ODBDouble(double value)
|
|
: this()
|
|
{
|
|
Value = value;
|
|
}
|
|
|
|
public override byte[] ToStorage()
|
|
{
|
|
return BitConverter.GetBytes(AsDouble);
|
|
}
|
|
|
|
static ODBDouble()
|
|
{
|
|
RegisterDeserializer(0x0018, (b, o, l) => BitConverter.ToDouble(b, o));
|
|
//RegisterValueFactory(typeof(double), v => new ODBDouble((double)v));
|
|
//RegisterValueFactory(typeof(float), v => new ODBDouble((double)v));
|
|
}
|
|
}
|
|
}
|