public FiddlerCapture(FiddlerCaptureUrlConfiguration fiddlerCaptureUrlConfiguration) { if (fiddlerCaptureUrlConfiguration == null) { throw new ArgumentNullException("fiddlerCaptureUrlConfiguration"); } FiddlerCaptureUrlConfiguration = fiddlerCaptureUrlConfiguration; }
public MainWindowViewModel() { ManagerDbConnectionString = ConfigurationManager.ConnectionStrings["ManagerConnectionString"].ConnectionString; ManagerDbRepository = new ManagerDbRepository(ManagerDbConnectionString); //--------------------------------------- // Set up Fiddler. //--------------------------------------- FiddlerCaptureUrlConfiguration = new FiddlerCaptureUrlConfiguration(); FiddlerCapture = new FiddlerCapture(FiddlerCaptureUrlConfiguration); FiddlerCapture.NewDataCapturedEventHandler += NewDataCapturedEventHandler; StartFiddlerCaptureCommand = new StartFiddlerCaptureCommand(FiddlerCapture); StopFiddlerCaptureCommand = new StopFiddlerCaptureCommand(FiddlerCapture); FiddlerCaptureInformation = new ObservableCollection<FiddlerCaptureInformation>(); InstallCertificateCommand = new InstallCertificateCommand(); UnInstallCertificateCommand = new UnInstallCertificateCommand(); //--------------------------------------- // Manager console host. //--------------------------------------- StartHostCommand = new StartHostCommand(this); ShutDownHostCommand = new ShutDownHostCommand(this); NumberOfManagers = Settings.Default.NumberOfManagers; NumberOfNodes = Settings.Default.NumberOfNodes; IsConsoleHostStarted = false; //--------------------------------------- // Do the rest. //--------------------------------------- GetData(); ClearLoggingTableInDatabaseCommand = new ClearLoggingTableInDatabaseCommand(this); ClearManagerTablesInDatabaseCommand = new ClearManagerTablesInDatabaseCommand(this); ToggleRefreshCommand = new ToggleRefreshCommand(this); CreateNewJobCommand = new CreateNewJobCommand(); Create20NewJobCommand = new CreateNewJobCommand(20); StartUpNewManagerCommand = new StartUpNewManagerCommand(); StartUpNewNodeCommand = new StartUpNewNodeCommand(); StartDurationTestCommand = new StartDurationTestCommand(this); CancelDurationTestCommand = new CancelDurationTestCommand(this); RefreshTimer = new Timer(5000); RefreshTimer.Elapsed += RefreshTimerOnElapsed; RefreshTimer.Start(); RefreshEnabled = true; CheckManagerDbTimer = new Timer(2000); CheckManagerDbTimer.Elapsed += CheckManagerDbTimer_Elapsed; }