all files / TypeScript.NET/source/System/Disposable/ ObjectDisposedException.js

73.68% Statements 28/38
40% Branches 10/25
80% Functions 8/10
77.42% Lines 24/31
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 43 44 45 46 47 48 49                                                 
/*!
 * @author electricessence / https://github.com/electricessence/
 * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
 * Based upon: https://msdn.microsoft.com/en-us/library/System.Exception%28v=vs.110%29.aspx
 */
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 __());
};
(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", "../Exceptions/InvalidOperationException"], factory);
    }
})(function (require, exports) {
    "use strict";
    var InvalidOperationException_1 = require("../Exceptions/InvalidOperationException");
    var NAME = 'ObjectDisposedException';
    var ObjectDisposedException = (function (_super) {
        __extends(ObjectDisposedException, _super);
        function ObjectDisposedException(objectName, message, innerException) {
            Eif (message === void 0) { message = null; }
            Eif (innerException === void 0) { innerException = null; }
            _super.call(this, message, innerException, function (_) {
                _.objectName = objectName;
            });
        }
        ObjectDisposedException.prototype.getName = function () {
            return NAME;
        };
        ObjectDisposedException.prototype.toString = function () {
            var _ = this, oName = _.objectName;
            oName = oName ? ('{' + oName + '} ') : '';
            return '[' + _.name + ': ' + oName + _.message + ']';
        };
        ObjectDisposedException.throwIfDisposed = function (disposable, objectName, message) {
            if (disposable.wasDisposed)
                throw new ObjectDisposedException(objectName, message);
        };
        return ObjectDisposedException;
    }(InvalidOperationException_1.InvalidOperationException));
    exports.ObjectDisposedException = ObjectDisposedException;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = ObjectDisposedException;
});
//# sourceMappingURL=ObjectDisposedException.js.map