logcontext/dist/logcontext.classes.logmap.js

28 lines
2.0 KiB
JavaScript
Raw Normal View History

2018-03-03 13:11:27 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./logcontext.plugins");
class LogMap {
constructor(clsNamespaceArg) {
this.paramMap = new plugins.lik.Stringmap();
this.clsNamespace = clsNamespaceArg;
}
addData(paramName, logData) {
this.paramMap.addString(paramName);
this.clsNamespace.set(paramName, logData);
}
deleteData(paramName) {
this.clsNamespace.set(paramName, null);
}
getData(paramName) {
return this.clsNamespace.get(paramName);
}
getAllData() {
let returnObject = {};
for (let stringArg of this.paramMap.getStringArray()) {
returnObject[stringArg] = this.clsNamespace.get(stringArg);
}
return returnObject;
}
}
exports.LogMap = LogMap;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nY29udGV4dC5jbGFzc2VzLmxvZ21hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2xvZ2NvbnRleHQuY2xhc3Nlcy5sb2dtYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxnREFBZ0Q7QUFLaEQ7SUFJRSxZQUFZLGVBQTBCO1FBRnRDLGFBQVEsR0FBRyxJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxFQUFFLENBQUM7UUFHckMsSUFBSSxDQUFDLFlBQVksR0FBRyxlQUFlLENBQUM7SUFDdEMsQ0FBQztJQUVELE9BQU8sQ0FBQyxTQUFpQixFQUFFLE9BQU87UUFDaEMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDbkMsSUFBSSxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQzVDLENBQUM7SUFFRCxVQUFVLENBQUMsU0FBaUI7UUFDMUIsSUFBSSxDQUFDLFlBQV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