SenseNet.ContentRepository.SearchFolder.WriteXml C# (CSharp) Method

WriteXml() protected method

protected WriteXml ( XmlWriter writer, bool withChildren, SerializationOptions options ) : void
writer System.Xml.XmlWriter
withChildren bool
options SerializationOptions
return void
        protected override void WriteXml(XmlWriter writer, bool withChildren, SerializationOptions options)
        {
            const string thisName = "SearchFolder";
            const string thisPath = "/Root/SearchFolder";

            writer.WriteStartElement("Content");
            base.WriteHead(writer, thisName, thisName, thisName, thisPath, true);

            if (_query != null)
            {
                writer.WriteStartElement("Query");
                writer.WriteRaw(_query.ToXml());
                writer.WriteEndElement();
            }

            if (withChildren && Children != null)
            {
                writer.WriteStartElement("Children");
                this.WriteXml(Children, writer, options);
                writer.WriteEndElement();
            }

            writer.WriteEndElement();
        }

Same methods

SearchFolder::WriteXml ( XmlWriter writer, string queryFilter, QuerySettings querySettings, SerializationOptions options ) : void
SearchFolder::WriteXml ( XmlWriter writer, string referenceMemberName, SerializationOptions options ) : void