WriteAttributeValueWithPrefix method

void WriteAttributeValueWithPrefix(
  1. String namespacePrefix,
  2. String localName,
  3. Object value
)
Writes the attribute value. The namespace prefix. The local name of the attribute. The value.

Implementation

void WriteAttributeValueWithPrefix(
    String namespacePrefix, String localName, Object value) {
  OutParam<String> stringValue = new OutParam();
  if (this.TryConvertObjectToString(value, stringValue)) {
    if (!StringUtils.IsNullOrEmpty(stringValue.param)) {
      this.WriteAttributeStringWithPrefix(
          namespacePrefix, localName, stringValue.param);
    }
  } else {
    throw new ServiceXmlSerializationException(
        "AttributeValueCannotBeSerialized(${value.runtimeType}, $localName)");
  }
}