public InvestigationVm(IWindsorContainer applicationWindsorContainer, ISnooperFactory snooperFactory, IFrameworkControllerFactory frameworkControllerFactory, Investigation model, ExportService exportService, IDetectiveMessenger messenger,
                               ISerializationPersistor <Investigation> investigationSerializationPersistor) : base(applicationWindsorContainer, model, exportService)
        {
            this.SnooperFactory      = snooperFactory;
            this.Investigation       = model;
            this.FrameworkController = frameworkControllerFactory.Create();
            this.ApplicationOrInvestigationWindsorContainer = this.InvestigationWindsorContainer;

            this.SourceLogs = new ViewModelVirtualizingIoCObservableCollection <SourceLogVm, SourceLog>(this.Investigation.SourceLogs, this.InvestigationWindsorContainer);

            this.OperationLogs = new ViewModelVirtualizingIoCObservableCollection <OperationLogVm, OperationLog>(this.Investigation.OperationLogs, this.InvestigationWindsorContainer);
            this.Captures      = new ViewModelVirtualizingIoCObservableCollection <CaptureVm, PmCaptureBase>(this.Investigation.Captures, this.InvestigationWindsorContainer);

            this.ConversationsGroups = new ViewModelVirtualizingIoCObservableCollection <ConversationsGroupVm, ConversationsGroup>(this.Investigation.ConversationsGroups,
                                                                                                                                   this.InvestigationWindsorContainer);
            this.ConversationsGroups.CollectionChanged += this.ConversationsGroups_CollectionChanged;

            this.ExportGroups = new ViewModelVirtualizingIoCObservableCollection <ExportGroupVm, ExportGroup>(this.Investigation.ExportsGroups, this.InvestigationWindsorContainer);

            this.ExportGroupName = "Exports - " + DateTime.Now;
            this.CreateSubGroup  = true;

            this._messenger = messenger;
            this._investigationSerializationPersistor = investigationSerializationPersistor;
        }
 public CreateWorkspaceCommand(IWorkspaceFactory workspaceFactory, ISerializationPersistor <Models.WorkspacesAndSessions.Workspace> workpaceSerializationPersistor,
                               IDetectiveMessenger messenger, IFileSystem fileSystem)
 {
     this._workspaceFactory = workspaceFactory ?? throw new ArgumentNullException(nameof(workspaceFactory));
     this._workspaceSerializationPersistor = workpaceSerializationPersistor ?? throw new ArgumentNullException(nameof(workpaceSerializationPersistor));
     this._messenger  = messenger ?? throw new ArgumentNullException(nameof(messenger));
     this._fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
 }
        public InvestigationsManagerVm(WindsorContainer applicationWindsorContainer) : base(applicationWindsorContainer)
        {
            DispatcherHelper.CheckBeginInvokeOnUI(() => this.View = this.ApplicationOrInvestigationWindsorContainer.Resolve <IInvestigationsManagerView>());

            this.InvestigationFactory              = this.ApplicationOrInvestigationWindsorContainer.Resolve <IInvestigationFactory>();
            this.InvestigationInfoLoader           = this.ApplicationOrInvestigationWindsorContainer.Resolve <IInvestigationInfoLoader>();
            this._fileSystem                       = this.ApplicationOrInvestigationWindsorContainer.Resolve <IFileSystem>();
            this._investigatSerializationPersistor = this.ApplicationOrInvestigationWindsorContainer.Resolve <ISerializationPersistor <Investigation> >();
            this._messenger = this.ApplicationOrInvestigationWindsorContainer.Resolve <IDetectiveMessenger>();
            this._messenger.Register <OpenedInvestigationMessage>(this, this.OpenedInvestigationMessageReceived);
            this._messenger.Register <OpenedWorkspaceMessage>(this, this.OpenedWorkspaceMessageReceived);
            this._messenger.Register <ClosedWorkspaceMessage>(this, this.ClosedWorkspaceMessageReceived);
            this._messenger.Register <CreatedInvestigationMessage>(this, this.CreatedInvestigationMessageReceived);
            this._messenger.Register <ExitedApplicationMessage>(this, this.ExitedApplicationMessageReceived);
        }
Exemple #4
0
        public WorkspacesManagerVm(WindsorContainer applicationWindsorContainer,
                                   IWorkspacesManagerView workspacesManagerView,
                                   IDetectiveMessenger messenger,
                                   ISerializationPersistor <Workspace> workspaceSerializationPersistor,
                                   IDirectoryWrapper directoryWrapper,
                                   IWorkspacePathSerializationPersistor workspacePathSerializationPersistor)
            : base(applicationWindsorContainer)
        {
            this._workspacePathSerializationPersistor = workspacePathSerializationPersistor;
            this._directoryWrapper = directoryWrapper;
            this._workspaceSerializationPersistor = workspaceSerializationPersistor;
            this.View       = workspacesManagerView;
            this.IsHidden   = false;
            this.IsSelected = true;

            this.LoadWorkspacesFromLastSession();

            this._messenger = messenger;
            this._messenger.Register <LoadedWorkspaceMessage>(this, this.LoadedWorkspaceMessageReceived);
            this._messenger.Register <ExitedApplicationMessage>(this, this.ExitedApplicationMessageReceived);
            this._messenger.Register <CreatedWorkspaceMessage>(this, this.CreatedWorkspaceMessageReceived);
        }
 public InvestigationFactory(IWindsorContainer container, IDetectiveMessenger messenger, ISerializationPersistor <Investigation> investigationSerializationPersistor)
 {
     this.Container  = container;
     this._messenger = messenger;
     this._investigationSerializationPersistor = investigationSerializationPersistor;
 }