internal static List<FeedbackController> GetDefaultControllers() { var cpuController = new FeedbackController( FeedbackName.CpuUsage, new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, 20 }, { FeedbackLevel.Low, 35 }, { FeedbackLevel.Normal, 50 }, { FeedbackLevel.High, 70 }, { FeedbackLevel.Highest, 90 } }, 0, FeedbackLevel.Lowest); const int megaByte = 1024 * 1024; var thresholdValues = new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, megaByte }, { FeedbackLevel.Normal, 4 * megaByte }, { FeedbackLevel.High, 8 * megaByte }, { FeedbackLevel.Highest, 10 * megaByte } }; var bandwidthController = new FeedbackController(FeedbackName.Bandwidth, thresholdValues, 0, FeedbackLevel.Lowest); return new List<FeedbackController> { cpuController, bandwidthController }; }
internal static List<FeedbackController> GetDefaultControllers() { var cpuController = new FeedbackController( FeedbackName.CpuUsage, new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, 20 }, { FeedbackLevel.Low, 35 }, { FeedbackLevel.Normal, 50 }, { FeedbackLevel.High, 70 }, { FeedbackLevel.Highest, 90 } }, 0, FeedbackLevel.Lowest); var businessLogicQueueController = new FeedbackController( FeedbackName.BusinessLogicQueueLength, new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, 10 }, { FeedbackLevel.Low, 100 }, { FeedbackLevel.Normal, 200 }, { FeedbackLevel.High, 400 }, { FeedbackLevel.Highest, 500 } }, 0, FeedbackLevel.Lowest); var enetQueueController = new FeedbackController( FeedbackName.ENetQueueLength, new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, 10 }, { FeedbackLevel.Low, 100 }, { FeedbackLevel.Normal, 200 }, { FeedbackLevel.High, 400 }, { FeedbackLevel.Highest, 500 } }, 0, FeedbackLevel.Lowest); const int megaByte = 1024 * 1024; var thresholdValues = new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, megaByte }, { FeedbackLevel.Normal, 4 * megaByte }, { FeedbackLevel.High, 8 * megaByte }, { FeedbackLevel.Highest, 10 * megaByte } }; var bandwidthController = new FeedbackController(FeedbackName.Bandwidth, thresholdValues, 0, FeedbackLevel.Lowest); var latencyControllerTcp = new FeedbackController( FeedbackName.LatencyTcp, new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, 5 }, { FeedbackLevel.Low, 20 }, { FeedbackLevel.Normal, 40 }, { FeedbackLevel.High, 70 }, { FeedbackLevel.Highest, 150 } }, 0, FeedbackLevel.Lowest); var latencyControllerUdp = new FeedbackController( FeedbackName.LatencyUdp, new Dictionary<FeedbackLevel, int> { { FeedbackLevel.Lowest, 5 }, { FeedbackLevel.Low, 20 }, { FeedbackLevel.Normal, 40 }, { FeedbackLevel.High, 70 }, { FeedbackLevel.Highest, 150 } }, 0, FeedbackLevel.Lowest); return new List<FeedbackController> { cpuController, bandwidthController, latencyControllerTcp, latencyControllerUdp, businessLogicQueueController, enetQueueController }; }
void Awake() { refurbishmentTab = controller.transform.FindChild ("RefurbishmentCTR").gameObject.GetComponent<Refurbishment>(); staffMenu = GameObject.FindGameObjectWithTag ("StaffingController").GetComponent<StaffMenu> (); bankingTab = controller.transform.FindChild ("BankingController").gameObject.GetComponent<BankingReport>(); emsTab = controller.transform.FindChild("EMSController").gameObject.GetComponent<EMSReport>(); revenueManagementTab = controller.transform.FindChild("RevenueManagerCTR").GetComponent<RevenueManagement>(); randomEvent = controller.transform.FindChild("EventController").GetComponent<RandomEvent>(); rateSetup = controller.transform.FindChild("RatesSetUp").GetComponent<RatesSetup>(); groupController = controller.transform.FindChild("GroupBooking").GetComponent<GroupBookController>(); calendarController = controller.transform.FindChild("CalendarController").GetComponent<CalendarController>(); feedbackController = controller.transform.FindChild("FeedBackController").GetComponent<FeedbackController>(); dataProcessor = GameObject.Find("DataCollection").GetComponent<Serializer_Deserializer>(); assetSwapper = controller.transform.FindChild("AssetController").GetComponent<AssetSwapper>(); toolbar = GameObject.FindGameObjectWithTag("UI").transform.FindChild("OverWorld").GetComponent<ToolbarOptions>(); adController = controller.transform.FindChild("AdvertController").gameObject.GetComponent<Advertisment>(); SingletonCheck(); if(monthlyReports == null){ monthlyReports = new List<MonthlyReport>();//create list on first run. } //Ensure there's a log for this week (special case for 1st time run) if (receptionLogs == null) { receptionLogs = new List<ReceptionLog> (); } if(restaurantBooks == null){ restaurantBooks = new List<RestaurantBook>();//create a new list on first run. } //Ensure there's a log for this week (special case for 1st time run) if (staffingLogs == null) { staffingLogs = new List<StaffingLog> (); } //create the log once. if(balanceSheets == null){ balanceSheets = new List<BalanceSheet>();//create new balance sheet list on first run. } GenerateNewMonthReports (); firstGeneration = true; medianRoomCostWD = rateSetup.medianRoomCostWD; medianRoomCostWE = rateSetup.medianRoomCostWE; }
public void Setup() { repository = Substitute.For<IFeedbackRepository>(); mapperFactory = Substitute.For<MapperFactory>(); sut = new FeedbackController(repository, mapperFactory); }