igniteui-react-core
Version:
Ignite UI React Core.
51 lines (50 loc) • 1.88 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, BaseError, String_$type, Delegate_$type, markType, TypeRegistrar } from "./type";
import { Dictionary$2 } from "./Dictionary$2";
/**
* @hidden
*/
export let DVContainer = /*@__PURE__*/ (() => {
class DVContainer extends Base {
static get instance() {
if (DVContainer.a == null) {
DVContainer.a = new DVContainer();
}
return DVContainer.a;
}
constructor() {
super();
this.d = new Dictionary$2(String_$type, Delegate_$type, 0);
}
registerFactory(a, b) {
if (!this.d.containsKey(a.typeName)) {
this.d.addItem(a.typeName, b);
}
}
createInstance(a, b) {
if (this.d.containsKey(a.typeName)) {
return this.d.item(a.typeName)();
}
throw new BaseError(1, b());
}
registerIfLoaded(typeName_) {
if (TypeRegistrar.isRegistered(typeName_)) {
TypeRegistrar.callRegister(typeName_);
}
}
checkLoaded(typeName_) {
if (TypeRegistrar.isRegistered(typeName_)) {
return true;
}
return false;
}
}
DVContainer.$t = /*@__PURE__*/ markType(DVContainer, 'DVContainer');
DVContainer.a = null;
return DVContainer;
})();