private void Write86_ContentFilter(string n, string ns, ContentFilter o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType) { System.Type type = o.GetType(); if (type != typeof(ContentFilter)) { if (type != typeof(VirtualItemContentFilter)) { throw base.CreateUnknownTypeException(o); } this.Write87_VirtualItemContentFilter(n, ns, (VirtualItemContentFilter) o, isNullable, true); return; } } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("ContentFilter", ""); } base.WriteElementString("Options", "", this.Write70_ContentFilterOptions(o.Options)); base.WriteElementString("Comparision", "", this.Write71_ContentComparision(o.Comparision)); base.WriteElementString("Text", "", o.Text); if (o.EncodingAsString != "UTF8") { base.WriteElementString("Encoding", "", o.EncodingAsString); } base.WriteEndElement(o); } }