var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var uniflash;
(function (uniflash) {
    var LPRFCore = (function (_super) {
        __extends(LPRFCore, _super);
        function LPRFCore() {
            _super.apply(this, arguments);
        }
        //override
        LPRFCore.prototype.readMemory = function (addr, typeSize, length, format) {
            return _super.prototype.readMemory.call(this, addr, typeSize, length, format, { DoNotHandleUnlock: true });
        };
        LPRFCore.prototype.exportMemoryAsCoff = function (ranges, filePath) {
            return _super.prototype.exportMemoryAsCoff.call(this, ranges, filePath, { DoNotHandleUnlock: true });
        };
        LPRFCore.prototype.exportMemoryAsBin = function (range, mauSizeInBits, filePath) {
            return _super.prototype.exportMemoryAsBin.call(this, range, mauSizeInBits, filePath, { DoNotHandleUnlock: true });
        };
        LPRFCore.prototype.getResets = function () {
            return _super.prototype.getResets.call(this, { keepAllResets: true });
        };
        LPRFCore.prototype.performReset = function (reset) {
            var opts;
            if (reset === 'Board Reset' || reset === 'Board Reset (free run)' || reset === 'Reset Emulator') {
                opts = {
                    DisconnectBeforeReset: true
                };
            }
            return _super.prototype.performReset.call(this, reset, opts);
        };
        return LPRFCore;
    }(uniflash.DSCore));
    uniflash.LPRFCore = LPRFCore;
})(uniflash || (uniflash = {}));
