コード例 #1
0
ファイル: PrintSchemaWriter.cs プロジェクト: kei10in/KipSharp
        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);
            }
        }
コード例 #2
0
ファイル: PrintSchemaWriter.cs プロジェクト: kei10in/KipSharp
        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();
        }
コード例 #3
0
 /// <summary>
 /// Add the specified element to the <see cref="Option"/>.
 /// </summary>
 /// <param name="element">The <see cref="ScoredProperty"/> to add.</param>
 /// <returns>A new Option with the element added.</returns>
 public Option Add(ScoredProperty element)
 {
     return(new Option(Name, Constrained, _properties, _scoredProperties.Add(element)));
 }