Esempio n. 1
0
        private static XElement CreateCompileElement(CmpNode n)
        {
            var xElement = new XElement(Ns + "Compile", new XAttribute("Include", n.FullName));

            if (n.DependentUpon != "")
            {
                xElement.Add(new XElement(Ns + "DependentUpon",
                                          Path.GetFileName(n.DependentUpon)));
            }
            return(xElement);
        }
Esempio n. 2
0
 private bool Equals(CmpNode other)
 {
     return(string.Equals(DependentUpon, other.DependentUpon, OrdinalIgnoreCase) &&
            string.Equals(FullName, other.FullName, OrdinalIgnoreCase));
 }
Esempio n. 3
0
 private static XElement Find(this XContainer doc, CmpNode node) =>
 doc.XPathSelectElements($"//ns:ItemGroup/ns:Compile[@Include='{node.FullName}']", M)
 .SingleOrDefault(x => (x.GetDependentUpon() ?? "") == node.DependentUpon);