all files / TypeScript.NET/source/System/Tasks/ TaskHandler.js

87.5% Statements 28/32
57.89% Branches 11/19
87.5% Functions 7/8
88.89% Lines 24/27
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42                      17× 17× 17×              
/*!
 * @author electricessence / https://github.com/electricessence/
 * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
 */
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) Eif (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
(function (factory) {
    Eif (typeof module === 'object' && typeof module.exports === 'object') {
        var v = factory(require, exports); Iif (v !== undefined) module.exports = v;
    }
    else if (typeof define === 'function' && define.amd) {
        define(["require", "exports", "./TaskHandlerBase", "../Exceptions/ArgumentNullException"], factory);
    }
})(function (require, exports) {
    "use strict";
    var TaskHandlerBase_1 = require("./TaskHandlerBase");
    var ArgumentNullException_1 = require("../Exceptions/ArgumentNullException");
    var TaskHandler = (function (_super) {
        __extends(TaskHandler, _super);
        function TaskHandler(_action) {
            _super.call(this);
            this._action = _action;
            if (!_action)
                throw new ArgumentNullException_1.ArgumentNullException('action');
        }
        TaskHandler.prototype._onExecute = function () {
            this._action();
        };
        TaskHandler.prototype._onDispose = function () {
            _super.prototype._onDispose.call(this);
            this._action = null;
        };
        return TaskHandler;
    }(TaskHandlerBase_1.TaskHandlerBase));
    exports.TaskHandler = TaskHandler;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = TaskHandler;
});
//# sourceMappingURL=TaskHandler.js.map