/// <summary>
        /// Initializes a new instance of the <see cref="SolutionExplorerOperation"/> class.
        /// </summary>
        /// <param name="root">The solution root.</param>
        protected SolutionExplorerOperation(ISolutionRoot root)
        {
            Root = root;

            IsExecuted         = false;
            ExpandedFolderList = new Collection <ISolutionFolder>();
        }
Esempio n. 2
0
        protected AddRemoveOperation(ISolutionRoot root, IReadOnlyDictionary <ITreeNodePath, IPathConnection> pathTable)
            : base(root)
        {
            Assert.ValidateReference(pathTable);

            this.PathTable = pathTable;
        }
Esempio n. 3
0
        protected AddSingleOperation(ISolutionRoot root, IFolderPath destinationFolderPath, ITreeNodePath newPath, ITreeNodeProperties newProperties)
            : base(root, destinationFolderPath, newPath, newProperties)
        {
            Assert.ValidateReference(destinationFolderPath);

            this.DestinationFolderPath = destinationFolderPath;
        }
Esempio n. 4
0
        protected SolutionExplorerOperation(ISolutionRoot root)
        {
            Assert.ValidateReference(root);

            this.Root = root;

            IsExecuted         = false;
            ExpandedFolderList = new Collection <ISolutionFolder>();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AddSingleOperation"/> class.
        /// </summary>
        /// <param name="root">The root path.</param>
        /// <param name="destinationFolderPath">The destination folder path.</param>
        /// <param name="newPath">The path of the added item.</param>
        /// <param name="newProperties">The properties of the added item.</param>
        protected AddSingleOperation(ISolutionRoot root, IFolderPath destinationFolderPath, ITreeNodePath newPath, ITreeNodeProperties newProperties)
            : base(root, destinationFolderPath, newPath, newProperties)
        {
            if (destinationFolderPath == null)
            {
                throw new ArgumentNullException(nameof(destinationFolderPath));
            }

            this.DestinationFolderPath = destinationFolderPath;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AddRemoveOperation"/> class.
        /// </summary>
        /// <param name="root">The root path.</param>
        /// <param name="pathTable">The table of paths.</param>
        protected AddRemoveOperation(ISolutionRoot root, IReadOnlyDictionary <ITreeNodePath, IPathConnection> pathTable)
            : base(root)
        {
            if (pathTable == null)
            {
                throw new ArgumentNullException(nameof(pathTable));
            }

            PathTable = pathTable;
        }
Esempio n. 7
0
        public RenameOperation(ISolutionRoot root, ITreeNodePath path, string newName)
            : base(root)
        {
            Assert.ValidateReference(path);
            Assert.ValidateReference(newName);

            this.Path    = path;
            this.OldName = Path.FriendlyName;
            this.NewName = newName;
        }
Esempio n. 8
0
        public MoveOperation(ISolutionRoot root, ITreeNodePath path, ISolutionFolder oldParent, ISolutionFolder newParent)
            : base(root)
        {
            Assert.ValidateReference(path);
            Assert.ValidateReference(oldParent);
            Assert.ValidateReference(newParent);

            this.Path      = path;
            this.OldParent = oldParent;
            this.NewParent = newParent;
        }
Esempio n. 9
0
        /// <summary>
        /// Initalizes the editsolution document viewmodel with data from the supplied solution.
        /// </summary>
        /// <param name="solution"></param>
        public void InitDocument(ISolutionRoot root, ISolutionItem solution)
        {
            SolutionRoot = solution as SolutionRootViewModel;
            if (SolutionRoot == null)
            {
                throw new System.NotSupportedException("Only SolutionRootViewModel parameter is supported.");
            }

            RaisePropertyChanged(() => SolutionChildren);

            mRoot = root;

            IsDirty = false;
        }
Esempio n. 10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RenameOperation"/> class.
        /// </summary>
        /// <param name="root">The root path.</param>
        /// <param name="path">The path of the renamed item.</param>
        /// <param name="newName">The new name.</param>
        public RenameOperation(ISolutionRoot root, ITreeNodePath path, string newName)
            : base(root)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (newName == null)
            {
                throw new ArgumentNullException(nameof(newName));
            }

            this.Path    = path;
            this.OldName = Path.FriendlyName;
            this.NewName = newName;
        }
Esempio n. 11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoveOperation"/> class.
        /// </summary>
        /// <param name="root">The root path.</param>
        /// <param name="path">The path to the moved node.</param>
        /// <param name="oldParent">The old parent.</param>
        /// <param name="newParent">The new parent.</param>
        public MoveOperation(ISolutionRoot root, ITreeNodePath path, ISolutionFolder oldParent, ISolutionFolder newParent)
            : base(root)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (oldParent == null)
            {
                throw new ArgumentNullException(nameof(oldParent));
            }
            if (newParent == null)
            {
                throw new ArgumentNullException(nameof(newParent));
            }

            this.Path      = path;
            this.OldParent = oldParent;
            this.NewParent = newParent;
        }
        /// <summary>
        /// Initalizes the editsolution document viewmodel with data from the supplied solution.
        /// </summary>
        /// <param name="solution"></param>
        public void InitDocument(ISolutionRoot root, ISolutionItem project)
        {
            Project = project as ProjectViewModel;
            if (Project == null)
            {
                throw new System.NotSupportedException("Only ProjectViewModel parameter is supported.");
            }

            mRoot = root;

            UpdateTargetFiles = new UpdateProjectTargetFilesViewModel(Project, this, this);

            mUpdateTargetFiles.DirtyFlagChangedEvent -= UpdateTargetFiles_DirtyFlagChangedEvent;

            //// Wrap this.SourceFilePathName => this.mProject.SourceFile.Path;
            //// this.Comment                 => this.mProject.SourceFile.Comment;

            IsDirty = mUpdateTargetFiles.IsDirty = false;
            mUpdateTargetFiles.DirtyFlagChangedEvent += UpdateTargetFiles_DirtyFlagChangedEvent;
        }
Esempio n. 13
0
 public AddFolderOperation(ISolutionRoot root, IFolderPath destinationFolderPath, IFolderPath newPath, IFolderProperties newProperties)
     : base(root, destinationFolderPath, newPath, newProperties)
 {
 }
Esempio n. 14
0
 protected AddRemoveTreeOperation(ISolutionRoot root, IReadOnlyDictionary <ITreeNodePath, IPathConnection> pathTable)
     : base(root, pathTable)
 {
 }
Esempio n. 15
0
 protected AddRemoveSingleOperation(ISolutionRoot root, IFolderPath parentPath, ITreeNodePath path, ITreeNodeProperties properties)
     : base(root, CreateSinglePathTable(parentPath, path, properties))
 {
 }
Esempio n. 16
0
 public AddTreeOperation(ISolutionRoot root, IReadOnlyDictionary <ITreeNodePath, IPathConnection> pathTable)
     : base(root, pathTable)
 {
 }