public AgentEngine( int settingsID ):this( ) { using( DatabaseDataContext db = new DatabaseDataContext() ) { foreach (var executionSlotData in db.ExecutionSlot_GetBy( null, settingsID, null, null ) ) { IAllocationDefinition definition = new AllocationDefinition(Convert.ToUInt32(executionSlotData.MaxSlots)); foreach (var pluginInfo in db.PluginInfo_GetBy(null, executionSlotData.ID, null, null, null, null, null, null, null, null)) definition.Add(pluginInfo); AddDefinition( definition ); } } }