public IProjectContent UpdateProjectContent(IParsedFile oldFile, IParsedFile newFile) { if (oldFile == null && newFile == null) { return(this); } if (oldFile != null && newFile != null) { if (!Platform.FileNameComparer.Equals(oldFile.FileName, newFile.FileName)) { throw new ArgumentException("When both oldFile and newFile are specified, they must use the same file name."); } } CppProjectContent pc = Clone(); if (newFile == null) { pc.parsedFiles.Remove(oldFile.FileName); } else { pc.parsedFiles[newFile.FileName] = newFile; } return(pc); }
public IProjectContent RemoveAssemblyReferences(IEnumerable <IAssemblyReference> references) { CppProjectContent pc = Clone(); pc.assemblyReferences.RemoveAll(r => references.Contains(r)); return(pc); }
public IProjectContent AddAssemblyReferences(IEnumerable <IAssemblyReference> references) { CppProjectContent pc = Clone(); pc.assemblyReferences.AddRange(references); return(pc); }
public IProjectContent SetAssemblyName(string newAssemblyName) { CppProjectContent pc = Clone(); pc.assemblyName = newAssemblyName; return(pc); }
public IProjectContent UpdateProjectContent(IEnumerable <IParsedFile> oldFiles, IEnumerable <IParsedFile> newFiles) { CppProjectContent pc = Clone(); if (oldFiles != null) { foreach (var oldFile in oldFiles) { pc.parsedFiles.Remove(oldFile.FileName); } } if (newFiles != null) { foreach (var newFile in newFiles) { pc.parsedFiles.Add(newFile.FileName, newFile); } } return(pc); }
protected CppProjectContent(CppProjectContent pc) { this.assemblyName = pc.assemblyName; this.parsedFiles = new Dictionary <string, IParsedFile>(pc.parsedFiles); this.assemblyReferences = new List <IAssemblyReference>(pc.assemblyReferences); }
protected CppProjectContent(CppProjectContent pc) { this.assemblyName = pc.assemblyName; this.parsedFiles = new Dictionary<string, IParsedFile>(pc.parsedFiles); this.assemblyReferences = new List<IAssemblyReference>(pc.assemblyReferences); }