diff src/implab/di/ServiceDescriptor.js @ 1:93fb6c09f2e1

minor fixes
author cin
date Fri, 02 Jun 2017 18:15:22 +0300
parents fc2517695ee1
children 00779cb63b12
line wrap: on
line diff
--- a/src/implab/di/ServiceDescriptor.js	Thu Jun 01 13:20:03 2017 +0300
+++ b/src/implab/di/ServiceDescriptor.js	Fri Jun 02 18:15:22 2017 +0300
@@ -1,14 +1,12 @@
 define(
     [
-        "dojo/_base/declare",
+        "../declare",
         "../safe",
-        "dojo/_base/lang",
-        "dojo/_base/array",
         "./Descriptor",
         "./ValueDescriptor"
     ],
 
-    function (declare, safe, lang, array, Descriptor, Value) {
+    function (declare, safe, Descriptor, Value) {
         var SINGLETON_ACTIVATION = 1,
             CONTAINER_ACTIVATION = 2,
             CONTEXT_ACTIVATION = 3,
@@ -220,7 +218,7 @@
                             };
                         } else if (this._params instanceof Array) {
                             this._factory = function () {
-                                var inst = lang.delegate(ctor.prototype);
+                                var inst = safe.create(ctor.prototype);
                                 var ret = ctor.apply(inst, arguments);
                                 return typeof (ret) === "object" ? ret : inst;
                             };
@@ -244,7 +242,7 @@
                     }
 
                     if (this._inject) {
-                        array.forEach(this._inject, function (spec) {
+                        this._inject.forEach(function (spec) {
                             for (var m in spec)
                                 injectMethod(instance, m, context, spec[m]);
                         });