WriteUserConfigurationNameToXml static method

void WriteUserConfigurationNameToXml(
  1. EwsServiceXmlWriter writer,
  2. XmlNamespace xmlNamespace,
  3. String? name,
  4. FolderId? parentFolderId,
)
Writes to Xml. The writer. The XML namespace. The user configuration name. The Id of the folder containing the user configuration.

Implementation

static void WriteUserConfigurationNameToXml(
  EwsServiceXmlWriter writer,
  XmlNamespace xmlNamespace,
  String? name,
  FolderId? parentFolderId,
) {
  EwsUtilities.Assert(
    name != null,
    "UserConfiguration.WriteUserConfigurationNameToXml",
    "name is null",
  );
  EwsUtilities.Assert(
    parentFolderId != null,
    "UserConfiguration.WriteUserConfigurationNameToXml",
    "parentFolderId is null",
  );

  writer.WriteStartElement(
    xmlNamespace,
    XmlElementNames.UserConfigurationName,
  );

  writer.WriteAttributeValue(XmlAttributeNames.Name, name);

  parentFolderId!.WriteToXmlElemenetName(writer);

  writer.WriteEndElement();
}