internal override void WriteTo(XmlWriter xml)
{
if (xml == null)
return;
xml.WriteComment(SR.GetString(SR.ServiceNameFromClient));
xml.WriteElementString("ServiceName", this.serviceBindingNameSentByClient);
xml.WriteComment(SR.GetString(SR.ServiceNameOnService));
xml.WriteStartElement("ServiceNameCollection");
if (this.serviceNameCollectionConfiguredOnServer == null || this.serviceNameCollectionConfiguredOnServer.Count < 1)
{
xml.WriteElementString("ServiceName", this.defaultServiceBindingNameOfServer);
}
else
{
foreach (string serviceName in this.serviceNameCollectionConfiguredOnServer)
{
xml.WriteElementString("ServiceName", serviceName);
}
}
xml.WriteFullEndElement();
}