Dump Serializable.toBinary()

This commit is contained in:
László Monda
2016-04-03 19:18:01 +02:00
parent b0b7a642a4
commit 5c4e9d5912
2 changed files with 22 additions and 2 deletions
+10 -1
View File
@@ -6,7 +6,7 @@ class UhkBuffer {
private static isFirstElementToDump = false;
offset: number;
enableDump = false;
private _enableDump = false;
private buffer: Buffer;
private bytesToBacktrack: number;
@@ -139,6 +139,15 @@ class UhkBuffer {
return this.buffer.slice(0, this.offset);
}
get enableDump() {
return this._enableDump;
}
set enableDump(value) {
UhkBuffer.isFirstElementToDump = true;
this._enableDump = value;
}
dump(value) {
if (this.enableDump) {
if (!UhkBuffer.isFirstElementToDump) {