private static void Collect(HashSet<XNamespace> result, ScoredProperty element) { result.AddXNamespaceOfXName(element.Name); Collect(result, element.Value); Collect(result, element.ParameterRef); foreach (var p in element.Properties) { Collect(result, p); } foreach (var sp in element.ScoredProperties) { Collect(result, sp); } }
private static void Write(XmlWriter writer, ScoredProperty element) { writer.WriteStartElement(Psf.ScoredProperty.LocalName, Psf.Namespace.NamespaceName); writer.WriteAttributeString("name", element.Name.ToQName(writer)); Write(writer, element.Value); Write(writer, element.ParameterRef); foreach (var p in element.Properties) { Write(writer, p); } foreach (var sp in element.ScoredProperties) { Write(writer, sp); } writer.WriteEndElement(); }