21 lines
439 B
TypeScript
21 lines
439 B
TypeScript
import { UserManagementServer } from "../UserManagementServer";
|
|
import { ReminderApp } from "./reminder/ReminderApp";
|
|
import { UserApp } from "./UserApp";
|
|
|
|
export class UserAppFactory
|
|
{
|
|
static create( id:string, ums:UserManagementServer ):UserApp<any>
|
|
{
|
|
let constructors = [ ReminderApp ];
|
|
|
|
for ( let c of constructors )
|
|
{
|
|
if ( c.id === id )
|
|
{
|
|
return new c( ums );
|
|
}
|
|
}
|
|
|
|
return null;
|
|
};
|
|
} |