private async Task CreateAndLoadInvestigation(InvestigationInfo investigationInfo) { var investigation = this.InvestigationFactory.Create(investigationInfo); await investigation.Initialize(); this.Investigations.Add(investigation); }
public async Task CreateAndAddNewInvestigation(InvestigationInfo investigationInfo) { investigationInfo.CreateFileStructure(); await this.CreateAndLoadInvestigation(investigationInfo); this.InvestigationsFilePaths.Add(investigationInfo.InvestigationFileRelativePath); }
public Investigation Create(InvestigationInfo investigationInfo) { var chidWc = new WindsorContainer($"Investigation-{investigationInfo.InvestigationName}-{investigationInfo.Guid}", new DefaultKernel(), new DefaultComponentInstaller()); this.Container.AddChildContainer(chidWc); chidWc.Register(Component.For <IInvestigationInfo, InvestigationInfo>().Instance(investigationInfo)); chidWc.Register(Component.For <IWindsorContainer, WindsorContainer>().Instance(chidWc)); chidWc.Install(FromAssembly.InDirectory(new AssemblyFilter("."), new InstallerFactoryFilter(typeof(IDetectiveIvestigationWindsorInstaller)))); return(chidWc.Resolve <IInvestigationFactoryInternal>().Create(investigationInfo)); }
public NewWorkspaceInvestigationWizardVm(IDirectoryInfoFactory directoryInfoManager, IWindsorContainer applicationWindsorContainer, Workspace model, InvestigationInfo investigationInfo, IInvestigationFactory investigationFactory, IDetectiveMessenger detectiveMessenger, CreateWorkspaceCommand createWorkspaceCommand, CreateInvestigationCommand createInvestigationCommand) : this(directoryInfoManager, applicationWindsorContainer, investigationInfo, investigationFactory, detectiveMessenger, createWorkspaceCommand, createInvestigationCommand) { // workaround: in some cases this constructor is executed even though it should not be if (!string.IsNullOrEmpty(model.Name)) { this.Workspace = model; this.InvestigationName = "Initial investigation"; this.WorkspaceName = model.Name; this.SqlConnectionStringBuilder = new SqlConnectionStringBuilder(model.ConnectionString); } }
public NewWorkspaceInvestigationWizardVm(IDirectoryInfoFactory directoryInfoManager, IWindsorContainer applicationWindsorContainer, InvestigationInfo investigationInfo, IInvestigationFactory investigationFactory, IDetectiveMessenger detectiveMessenger, CreateWorkspaceCommand createWorkspaceCommand, CreateInvestigationCommand createInvestigationCommand) : base(applicationWindsorContainer) { _createInvestigationCommand = createInvestigationCommand; _createWorkspaceCommand = createWorkspaceCommand; _detectiveMessenger = detectiveMessenger; _investigationFactory = investigationFactory; _directoryInfoManager = directoryInfoManager ?? throw new ArgumentNullException(nameof(directoryInfoManager)); this.InvestigationInfo = investigationInfo; this.ViewType = typeof(INewWorkspaceInvestionWizardView); var ts = DateTime.Now.Millisecond; this.SqlConnectionStringBuilder = this.CreateDefaultConnectionStringBuilder(); this.InvestigationName = $"Initial investigation - {ts}"; this.WorkspaceName = $"NFX workspace - {ts}"; }
public async Task CreateNewInvestigation(InvestigationInfo investigationInfo) { try { if (!this.IsOpened) { await this.Open(); } await this.Workspace.CreateAndAddNewInvestigation(investigationInfo); this.Logger?.Info($"Investigation created: {investigationInfo.InvestigationName}"); this.CurrentInvestigation = this.Investigations.First(); } catch (Exception ex) { this.Logger?.Error($"Unable to create investigation: {investigationInfo?.InvestigationName}", ex); } }
public InvestigationFacade(Func <InvestidationListQuery> queryFactory, IRepository <Investigation, Guid> repository, IEntityDTOMapper <Investigation, InvestigationDTO> mapper, IRepository <UserInvestigation, Guid> userInvestigationRepository, UserFacade userFacade, InvestigationInfo container, StatsFacade statsFacade) : base(queryFactory, repository, mapper) { this.InvestigationInfo = container; this.UserInvestigationRepository = userInvestigationRepository; this.UserFacade = userFacade; this.StatsFacade = statsFacade; }
public Investigation(InvestigationInfo investigationInfo) { this.InvestigationInfo = investigationInfo; this.InvestigationInfo.LastRecentlyUsed = DateTime.UtcNow; this.OperationLogs = new ConcurrentIObservableVirtualizingObservableCollection <OperationLog>(); }
public NewWorkspaceInvestigationWizardVm(IWindsorContainer applicationWindsorContainer, Workspace model, InvestigationInfo investigationInfo) : this( applicationWindsorContainer, investigationInfo) { this.Workspace = model; this.InvestigationName = "Initial investigation"; this.WorkspaceName = model.Name; this.SqlConnectionStringBuilder = new SqlConnectionStringBuilder(model.ConnectionString); }
public NewWorkspaceInvestigationWizardVm(IWindsorContainer applicationWindsorContainer, InvestigationInfo investigationInfo) : base(applicationWindsorContainer) { this.InvestigationInfo = investigationInfo; this.ViewType = typeof(INewWorkspaceInvestionWizardView); var ts = DateTime.Now.Millisecond; this.SqlConnectionStringBuilder = this.CreateDefaultConnectionStringBuilder(); this.InvestigationName = $"Initial investigation - {ts}"; this.WorkspaceName = $"NFX workspace - {ts}"; }
public CaptureFacade(NetfoxUnitOfWorkProvider uowProvider, NetfoxRepositoryProvider repositoryProvider, StatsFacade stats, InvestigationInfo investigationInfo) : base(uowProvider, repositoryProvider) { this.Stats = stats; this.InvestigationInfo = investigationInfo; }