Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class YobaFactory: IYobaFactory
- {
- private IDatabase database;
- public YobaFactory(IDatabase database)
- {
- this.typeDatabase = database;
- }
- public Guid RegisterType<T>()
- {
- return typeDatabase.RegisterType(typeof(T));
- }
- public object CreateYoba(Guid guid)
- {
- var type = Type.GetType(database.GetTypeNameFor(guid));
- return Activator.CreateInstance(type);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement