private void AddReference(XElement r, string projName, string projectFile) { var hint = GetHintPath(r); if (hint == null) { return; } var fullPath = ResolveFullPath(projectFile, hint); AssemblyFile asmb = Assemblies.SingleOrDefault(o => o.ActualPath == fullPath); if (asmb == null) { var time = GetFileTime(fullPath); asmb = new AssemblyFile(fullPath, time, fullPath.StartsWith(_root)); Assemblies.Add(asmb); } asmb.Projects.Add(new AssemblyReference(projName, projectFile, UsageType.Reference, hint)); }
private void AddLink(XElement r, string projName, string projectFile) { var link = r.Attribute("Include")?.Value; if (link == null) { return; } if (link.EndsWith(".dll")) { var fullPath = ResolveFullPath(projectFile, link); AssemblyFile asmb = Assemblies.SingleOrDefault(o => o.ActualPath == fullPath); if (asmb == null) { var time = GetFileTime(fullPath); asmb = new AssemblyFile(fullPath, time, fullPath.StartsWith(_root)); Assemblies.Add(asmb); } asmb.Projects.Add(new AssemblyReference(projName, projectFile, UsageType.Link, link)); } }