typescript-dotnet-core
Version:
A the core classes and utilities of a JavaScript-Friendly .NET Based TypeScript Library.
7 lines (6 loc) • 1.31 kB
JavaScript
;
/*!
* @author electricessence / https://github.com/electricessence/
* Licensing: MIT https://github.com/electricessence/TypeScript.NET-Core/blob/master/LICENSE.md
*/Object.defineProperty(exports,"__esModule",{value:!0});var tslib_1=require("tslib"),ArgumentNullException_1=require("../Exceptions/ArgumentNullException"),ReadOnlyCollectionBase_1=require("./ReadOnlyCollectionBase"),Enumerator_1=require("./Enumeration/Enumerator"),Types_1=require("../Types"),ReadOnlyCollectionWrapper=function(n){function e(e){var t=n.call(this)||this;if(!e)throw new ArgumentNullException_1.default("collection");return Types_1.default.isArrayLike(e)?(t.__getCount=function(){return e.length},t.__getEnumerator=function(){return Enumerator_1.from(e)}):(t.__getCount=function(){return e.count},t.__getEnumerator=function(){return e.getEnumerator()}),t}return tslib_1.__extends(e,n),e.prototype._getCount=function(){return this.throwIfDisposed(),this.__getCount()},e.prototype._getEnumerator=function(){return this.throwIfDisposed(),this.__getEnumerator()},e.prototype._onDispose=function(){n.prototype._onDispose.call(this),this.__getCount=null,this.__getEnumerator=null},e}(ReadOnlyCollectionBase_1.default);exports.default=ReadOnlyCollectionWrapper;
//# sourceMappingURL=ReadOnlyCollectionWrapper.js.map