/// <summary>
        /// Initializes a new instance of the <see cref="FileExplorerNodeParameters"/> class.
        /// </summary>
        /// <param name="physicalPath">The physical file system object that the node represents.</param>
        /// <param name="project">The project data.</param>
        /// <param name="viewModelFactory">The view model factory for creating view models.</param>
        /// <param name="fileSystemService">The file system service used to manipulate the underlying file system.</param>
        /// <exception cref="ArgumentNullException">Thrown when any of the parameters are <b>null</b>.</exception>
        public FileExplorerNodeParameters(string physicalPath, IProject project, ViewModelFactory viewModelFactory, IFileSystemService fileSystemService)
            : base(viewModelFactory)
        {
            Project = project ?? throw new ArgumentNullException(nameof(project));

            PhysicalPath = physicalPath ?? throw new ArgumentNullException(nameof(physicalPath));

            if (string.IsNullOrWhiteSpace(PhysicalPath))
            {
                throw new ArgumentEmptyException(nameof(physicalPath));
            }

            FileSystemService = fileSystemService ?? throw new ArgumentNullException(nameof(fileSystemService));
        }
 /// <summary>Initializes a new instance of the MainParameters class.</summary>
 /// <param name="newProject">The new project view model.</param>
 /// <param name="recent">The recent files view model.</param>
 /// <param name="contentCreators">A list of content plug ins that can create their own content.</param>
 /// <param name="viewModelFactory">The view model factory for creating view models.</param>
 /// <param name="openDialog">A dialog service used for opening files.</param>
 /// <param name="saveDialog">A dialog service used for saving files.</param>
 /// <exception cref="ArgumentNullException">Thrown when any of the parameters are <b>null</b>.</exception>
 public MainParameters(IStageNewVm newProject,
                       IRecentVm recent,
                       IEditorSettingsVm editorSettings,
                       IReadOnlyList <IContentPlugInMetadata> contentCreators,
                       ViewModelFactory viewModelFactory,
                       IEditorFileOpenDialogService openDialog,
                       IEditorFileSaveAsDialogService saveDialog)
     : base(viewModelFactory)
 {
     OpenDialog      = openDialog ?? throw new ArgumentNullException(nameof(openDialog));
     SaveDialog      = saveDialog ?? throw new ArgumentNullException(nameof(saveDialog));
     NewProject      = newProject ?? throw new ArgumentNullException(nameof(newProject));
     RecentFiles     = recent ?? throw new ArgumentNullException(nameof(recent));
     SettingsVm      = editorSettings ?? throw new ArgumentNullException(nameof(editorSettings));
     ContentCreators = contentCreators ?? throw new ArgumentNullException(nameof(contentCreators));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewModelCommonParameters"/> class.
 /// </summary>
 /// <param name="viewModelFactory">The view model factory for creating view models.</param>
 /// <exception cref="ArgumentNullException">Thrown when <paramref name="viewModelFactory"/> parameter is <b>null</b>.</exception>
 public ViewModelCommonParameters(ViewModelFactory viewModelFactory) =>
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectVmParameters" /> class.
 /// </summary>
 /// <param name="projectData">The project data.</param>
 /// <param name="viewModelFactory">The view model factory.</param>
 /// <exception cref="ArgumentNullException">Thrown when any of the parameters are <b>null</b>.</exception>
 public ProjectVmParameters(IProject projectData, ViewModelFactory viewModelFactory)
     : base(viewModelFactory) => Project = projectData ?? throw new ArgumentNullException(nameof(projectData));
 /// <summary>
 /// Initializes a new instance of the <see cref="FileExplorerParameters" /> class.
 /// </summary>
 /// <param name="fileSystemService">The file system service to use for manipulating the virtual file system.</param>
 /// <param name="fileSearch">The service used to search for files in the file explorer.</param>
 /// <param name="rootNode">The root node for the file system tree.</param>
 /// <param name="viewModelFactory">The view model factory.</param>
 /// <param name="project">The project data.</param>
 /// <exception cref="ArgumentNullException">Thrown when any of the parameters are <b>null</b>.</exception>
 public FileExplorerParameters(IFileSystemService fileSystemService, ISearchService <IFileExplorerNodeVm> fileSearch, IFileExplorerNodeVm rootNode, IProject project, ViewModelFactory viewModelFactory)
     : base(viewModelFactory)
 {
     Project           = project ?? throw new ArgumentNullException(nameof(project));
     FileSystemService = fileSystemService ?? throw new ArgumentNullException(nameof(fileSystemService));
     RootNode          = rootNode ?? throw new ArgumentNullException(nameof(rootNode));
     FileSearch        = fileSearch ?? throw new ArgumentNullException(nameof(fileSearch));
 }
 /// <summary>Initializes a new instance of the <see cref="T:Gorgon.Editor.ViewModels.ContentPreviewVmParameters"/> class.</summary>
 /// <param name="fileExplorer">The file explorer view model.</param>
 /// <param name="contentFileManager">The file manager used for content files.</param>
 /// <param name="thumbDirectory">The thumbnail directory for the previewer.</param>
 /// <param name="viewModelFactory">The view model factory for creating view models.</param>
 /// <exception cref="ArgumentNullException">Thrown when any of the parameters are <b>null</b>.</exception>
 public ContentPreviewVmParameters(IFileExplorerVm fileExplorer, IContentFileManager contentFileManager, DirectoryInfo thumbDirectory, ViewModelFactory viewModelFactory)
     : base(viewModelFactory)
 {
     FileExplorer       = fileExplorer ?? throw new ArgumentNullException(nameof(fileExplorer));
     ContentFileManager = contentFileManager ?? throw new ArgumentNullException(nameof(contentFileManager));
     ThumbDirectory     = thumbDirectory ?? throw new ArgumentNullException(nameof(thumbDirectory));
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StageNewVmParameters"/> class.
 /// </summary>
 /// <param name="projectManager">The project manager for the application.</param>
 /// <param name="viewModelFactory">The view model factory for creating view models.</param>
 /// <param name="settings">The settings for the editor.</param>
 /// <param name="messageDisplay">The message display service to use.</param>
 /// <param name="busyService">The busy state service to use.</param>
 public StageNewVmParameters(ViewModelFactory viewModelFactory)
     : base(viewModelFactory)
 {
 }