private static void RunLoadtestSimulation()
        {
            var serviceProvider   = new ServiceCollection().AddHttpClient().BuildServiceProvider();
            var httpClientFactory = serviceProvider.GetService <IHttpClientFactory>();

            /// Creating clients
            IDeviceServiceClient  deviceServiceClient  = new DeviceServiceClient(httpClientFactory);
            IScanServiceClient    scanServiceClient    = new ScanServiceClient(httpClientFactory);
            ISettingServiceClient settingServiceClient = new SettingServiceClient(httpClientFactory);

            // Read in test data
            IList <DeviceModel>    TestDevices     = FileParser.ReadTestDevices();
            IList <ScanBatchModel> scanBatchModels = ScanServiceClient.CreateScanBatchModels(FileParser.ReadScanModel().GetRange(0, 10000), 5).ToList();
            DeviceModel            device          = new DeviceModel()
            {
                Id = 1
            };

            var wifiBleDevices = FileParser.ReadClusterDevices();
            IClusterGraphScanGenerator scanGenerator = new ClusterGraphScanGenerator();

            scanGenerator.Run(device, wifiBleDevices.Item1, wifiBleDevices.Item2);

            ISimulation <SimulationResult> loadTestSimulation = new LoadTestSimulation(
                deviceServiceClient,
                settingServiceClient,
                scanServiceClient,
                TestDevices,
                scanBatchModels);

            ISimulation <SimulationResult> clusterInsertSimulation = new ClusterInsertSimulation(
                deviceServiceClient,
                settingServiceClient,
                scanServiceClient,
                scanGenerator,
                wifiBleDevices.Item1,
                wifiBleDevices.Item2);

            loadTestSimulation.Run();
        }
Beispiel #2
0
 public ViewResult <EmailTemplateModel> SaveEmailTemplate(EmailTemplateModel model)
 {
     return(SettingServiceClient.SaveEmailTemplate(model));
 }
Beispiel #3
0
 public Operate DeleteEmailTemplate(EmailTemplateModel model)
 {
     return(SettingServiceClient.DeleteEmailTemplate(model));
 }
Beispiel #4
0
 public MulitViewResult <EmailTemplateModel> GetEmailTemplates()
 {
     return(SettingServiceClient.GetEmailTemplates());
 }