File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -112,23 +112,23 @@ module mvc {
112
112
}
113
113
let aliasName = Singleton . GetAliasName ( fullClassName ) ;
114
114
let isProxy = ReflectUtils . IsSubclassOf ( classType , Proxy ) ;
115
- let isMediator = ReflectUtils . IsSubclassOf ( classType , Mediator ) ;
116
- if ( isProxy || isMediator ) {
117
- Singleton . RegisterClass ( classType , aliasName ) ;
118
- } else {
115
+ let isMediator :boolean ;
116
+ if ( isProxy ) {
117
+ if ( this . facade . hasProxyByName ( aliasName ) ) {
118
+ return this . facade . getProxyByName ( aliasName ) ;
119
+ }
120
+ } else if ( isMediator = ReflectUtils . IsSubclassOf ( classType , Mediator ) ) {
121
+ if ( this . facade . hasMediatorByName ( aliasName ) ) {
122
+ return this . facade . getMediatorByName ( aliasName ) ;
123
+ }
124
+ } else {
119
125
let ins = new classType ( ) ;
120
126
if ( ins [ MVCInject . INJECTABLE_FULLNAME ] ) {
121
127
ins = this . inject ( ins ) ;
122
128
}
123
129
return ins ;
124
130
}
125
131
126
- if ( isMediator && this . facade . hasMediatorByName ( aliasName ) ) {
127
- return this . facade . getMediatorByName ( aliasName ) ;
128
- } else if ( isProxy && this . facade . hasProxyByName ( aliasName ) ) {
129
- return this . facade . getProxyByName ( aliasName ) ;
130
- }
131
-
132
132
let ins = this . facade . getInjectLock ( aliasName ) ;
133
133
if ( ! ins ) {
134
134
ins = Singleton . __GetOrCreateOneInstance ( aliasName ) ;
You can’t perform that action at this time.
0 commit comments