ing
This commit is contained in:
parent
1461c2a76d
commit
795b91d4f8
|
@ -46,15 +46,26 @@ export default class LPCReducer {
|
|||
*/
|
||||
public registerReducers(reducerTypes: ClassType[]): void {
|
||||
for (let reducerType of reducerTypes) {
|
||||
this.registerReducer(reducerType);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* registerReducer
|
||||
*/
|
||||
public registerReducer(reducerType: ClassType): void {
|
||||
let clazz: Class = Class.forClass(reducerType);
|
||||
|
||||
let ra: ReducerAnnotation = clazz.getOwnAnnotation(ReducerAnnotation);
|
||||
if (undefined === ra) {
|
||||
continue;
|
||||
console.warn(`Class is not Reducer type. add @Reducer annotation to class[${reducerType.name}]`);
|
||||
return;
|
||||
}
|
||||
console.log(`name: ${ra.attributes.name}`);
|
||||
|
||||
let reducerMapping: string = null;
|
||||
let ama: ActionMappingAnnotation = clazz.getOwnAnnotation(ActionMappingAnnotation);
|
||||
if (undefined === ama) {
|
||||
continue;
|
||||
if (undefined !== ama) {
|
||||
reducerMapping = ama.attributes.value;
|
||||
}
|
||||
console.log(`actionMapping-value: ${ama.attributes.value}`);
|
||||
|
||||
|
@ -70,14 +81,4 @@ export default class LPCReducer {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* registerReducer
|
||||
*/
|
||||
public registerReducer(reducerType: ClassType): void {
|
||||
console.log(``);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user