protected override void WriteElements(XmlWriter writer) { base.WriteElements(writer); if (ContentModel != null) { ContentModel.Write(writer); } else { Particle?.Write(writer); } }