public World() { _scripts = new List<IScript>(); _stopLoopSource = new CancellationTokenSource(); GlobalObjectRoot = new DRecord(); GlobalObjectRoot["test"] = new DNumber(3); }
public void TestSerializeDNumber() { DipMessageFormat_Accessor fmt = new DipMessageFormat_Accessor(); Bencoder_Accessor e = new Bencoder_Accessor(); DNumber n = new DNumber(123.45m); fmt.SerializeDNumber(e, n); Utils.AssertBytewiseIdentical(Utils.Bs("Nn123.45ee"), e.Encoded); }
private void SerializeDNumber(Bencoder e, DNumber n) { e.StartDNumber().Number(n.Value).FinishDNumber(); }
public override void InsertNumber(decimal dec) { Debug.Assert(_key != null); Debug.Assert(_key is string); _rec[(string)_key] = new DNumber(dec); _key = null; }