public CapturePackets(ICapturingService capturingService) { InitializeComponent(); _capturingService = capturingService; _capturingService.PacketCaptured += _capturingService_PacketCaptured; _capturingService.StatusChanged += _capturingService_StatusChanged; _packetsCount = 0; }
public void Initialize() { _container.RegisterType<IHttpCallsProvider, HttpCallsProvider>(new ContainerControlledLifetimeManager()); httpcallsprovider = _container.Resolve<IHttpCallsProvider>(); _container.RegisterType<IKeyValuePersister<string, string>, AppKeyValuePersister<string>>(); _container.RegisterType<ICapturingService, CapturingService>(); startFiddlerCommand = new DelegateCommand(StartFiddler, CanStart); closeFiddlerCommand = new DelegateCommand(CloseFiddler, CanClose); applicationExitCommand = new DelegateCommand(ApplicationExited, CanApplicationExit); GlobalCommands.FiddlerApplicationCloseCommand.RegisterCommand(closeFiddlerCommand); GlobalCommands.FiddlerApplicationStartCommand.RegisterCommand(startFiddlerCommand); GlobalCommands.ApplicationExitCommand.RegisterCommand(applicationExitCommand); _container.RegisterType<ICertificateService, CertificateService>(new ContainerControlledLifetimeManager()); capturingService = _container.Resolve<ICapturingService>(); capturingService.Start(); }