Esempio n. 1
0
        void IDiskBasedNode.RenameForDeferredSave(string basePath, string baseNewPath)
        {
            string oldPath = Path.Combine(basePath, ItemNode.GetMetadata(ProjectFileConstants.Include));
            string newPath = Path.Combine(baseNewPath, ItemNode.GetMetadata(ProjectFileConstants.Include));

            Directory.CreateDirectory(newPath);

            ProjectMgr.UpdatePathForDeferredSave(oldPath, newPath);
        }
Esempio n. 2
0
        public AssembleFileNode(ProjectNode root, ProjectElement e)
            :       base(root, e)
        {
            ExcludeNodeFromScc = true;

            // Give it a guid if it does not already have one.

            if (string.IsNullOrEmpty(ItemNode.GetMetadata(Constants.Project.Item.Assemble.Guid.Name)))
            {
                ItemNode.SetMetadata(Constants.Project.Item.Assemble.Guid.Name, System.Guid.NewGuid().ToString("B"));
            }
        }
Esempio n. 3
0
        void IDiskBasedNode.RenameForDeferredSave(string basePath, string baseNewPath)
        {
            string oldLoc = CommonUtils.GetAbsoluteFilePath(basePath, ItemNode.GetMetadata(ProjectFileConstants.Include));
            string newLoc = CommonUtils.GetAbsoluteFilePath(baseNewPath, ItemNode.GetMetadata(ProjectFileConstants.Include));

            ProjectMgr.UpdatePathForDeferredSave(oldLoc, newLoc);
            // make sure the directory is there
            Directory.CreateDirectory(Path.GetDirectoryName(newLoc));
            if (File.Exists(oldLoc))
            {
                File.Move(oldLoc, newLoc);
            }
        }
Esempio n. 4
0
        protected string GetRelativePath()
        {
            string        relativePath = Path.GetFileName(ItemNode.GetMetadata(ProjectFileConstants.Include));
            HierarchyNode parent       = Parent;

            while (parent != null && !(parent is ProjectNode))
            {
                relativePath = Path.Combine(parent.Caption, relativePath);
                parent       = parent.Parent;
            }

            return(relativePath);
        }
Esempio n. 5
0
 public ConfigReferenceNode(ProjectNode root, ProjectElement e)
     : base(root, e)
 {
     m_name     = ItemNode.GetMetadata(ProjectFileConstants.Include);
     m_hintPath = ItemNode.GetMetadata("HintPath");
 }