This class provides utility methods in serializing and deserializing an object as xml.
More...
This class provides utility methods in serializing and deserializing an object as xml.
static object Google.Api.Ads.Common.Util.SerializationUtilities.CloneObject |
( |
object |
objToClone | ) |
|
|
inlinestatic |
Clones an object.
- Parameters
-
objToClone | The object to clone. |
- Returns
- The cloned object.
objToClone must be Serializable.
static object Google.Api.Ads.Common.Util.SerializationUtilities.DeserializeFromXmlText |
( |
string |
contents, |
|
|
Type |
contentType |
|
) |
| |
|
inlinestatic |
static object Google.Api.Ads.Common.Util.SerializationUtilities.DeserializeFromXmlTextCustomRootNs |
( |
string |
contents, |
|
|
Type |
contentType, |
|
|
string |
ns, |
|
|
string |
rootNode |
|
) |
| |
|
inlinestatic |
Deserialize an object from xml for a custom root node and xml namespace.
- Parameters
-
contents | The serialized xml. |
contentType | The type of deserialized object. |
ns | The xml namespace of the object in serialized xml. |
rootNode | The root node name for the object in serialized xml. |
- Returns
- The deserialized object or null if deserialization fails.
contentType must be XmlSerializable.
static string Google.Api.Ads.Common.Util.SerializationUtilities.SerializeAsXmlText |
( |
object |
objToSerialize | ) |
|
|
inlinestatic |
Serializes an object as xml.
- Parameters
-
objToSerialize | The object to serialize. |
- Returns
- The serialized xml string.
objToSerialize must be XmlSerializable.
The documentation for this class was generated from the following file: