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 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); } }