public AccessModule(ISubsystem accessSubsystem) { if (accessSubsystem.Type() != SubsystemType.Access) throw new ModuleLoadException("Неправильный тип подсистемы"); _accessSubsystem = (AccessSubsystem)accessSubsystem; var result = Kernel.GetKernel. SendMessage(new ServiceMessage(KernelTypes.ServiceKernel, SubsystemType.Access, SubsystemType.DataBase, DbSubsystemMessages.GetContext, new object[] {})); _context = (DBModelUnitOfWork)result.Message[0]; }
public ProjectModule(ISubsystem prodjectSubsystem) { if (prodjectSubsystem.Type() != SubsystemType.Project) throw new ModuleLoadException("Неправильный тип подсистемы"); _prodjectSubsystem = (Projectubsystem)prodjectSubsystem; context = (DBModelUnitOfWork)Kernel.GetKernel. SendMessage(new ServiceMessage(KernelTypes.ServiceKernel, SubsystemType.Project, SubsystemType.DataBase, DbSubsystemMessages.GetContext, new object[] { })).Message[0]; }