Serializing/deserializing OpenTAP objects. This class mostly just orchestrates a number of serializer plugins. MacroString
More...
|
void | PushError (XElement element, string message) |
| Pushes a message to the list of errors for things that happened during load. More...
|
|
void | PushError (XElement element, string message, Exception e) |
| Pushes an error to the list of errors for things that happened during load. Includes optional Exception value.
|
|
object | Deserialize (XDocument document, ITypeData type=null, bool autoFlush=true, string path=null) |
| Deserializes an object from a XDocument. More...
|
|
void | Flush () |
| Needed by defered loading. Only required to be called if autoFlush is set to false during deserialization.
|
|
object | Deserialize (Stream stream, bool flush=true, ITypeData type=null, string path=null) |
| Deserializes an object from a stream. More...
|
|
object | DeserializeFromString (string text, ITypeData type=null, bool flush=true, string path=null) |
| Deserializes an object from an xml text string. More...
|
|
object | DeserializeFromFile (string file, ITypeData type=null, bool flush=true) |
| Deserializes an object from a XML file. More...
|
|
ITapSerializerPlugin[] | GetSerializers () |
| Get all the serializers loaded by this TapSerializer.
|
|
T | GetSerializer< T > () |
| Gets a serializer from the stack of active serializers. Returns null if there is no serializer of that type on the stack. More...
|
|
void | AddSerializers (IEnumerable< ITapSerializerPlugin > _serializers) |
| Adds new serializers to the serializer. Will insert them based on the order property. More...
|
|
| TapSerializer () |
| Creates a new serializer instance.
|
|
void | DeferLoad (Action deferred) |
| Pushes a deferred load action onto a queue of deferred loads.
More...
|
|
bool | Deserialize (XElement element, Action< object > setter, Type t=null) |
| Deserializes an object from an XElement. Calls the setter action with the result. returns true on success. Optionally, the type can be added. More...
|
|
bool | Deserialize (XElement element, Action< object > setter, ITypeData t) |
| Deserializes an object from XML. More...
|
|
void | Serialize (Stream stream, object obj) |
| Serialize an object to a stream. More...
|
|
void | Serialize (XmlWriter writer, object obj) |
| Serializes an object to a XML writer. More...
|
|
string | SerializeToString (object obj) |
| Serializes an object to a string. More...
|
|
bool | Serialize (XElement elem, object obj, ITypeData expectedType=null) |
| Serializes an object to XML.
|
|
object | Clone (object obj) |
| Clones an object using the serializer. Skips generating and parsing XML text, so it is faster than a full serialize/deserialize. More...
|
|
IEnumerable< ITypeData > | GetUsedTypes () |
| Gets the types this TapSerializer instance has encountered until now.
|
|
IEnumerable< string > | GetUsedFiles () |
| Gets the FilePath strings this instance has encountered until now.
|
|
|
IEnumerable< ITapSerializerPlugin > | SerializerStack [get] |
| The stack of serializers. Changes during serialization depending on the order of serializers used.
|
|
bool | IgnoreErrors = false [getset] |
| True if errors should be ignored.
|
|
IEnumerable< string > | Errors [get] |
| Get the errors associated with deserialization. The errors only persists between calls to Serialize/Deserialize. See XmlErrors for more detailed information.
|
|
IEnumerable< XmlError > | XmlErrors [get] |
| Gets a list of exceptions tha occured while loading the test plan.
|
|
bool | WriteFragments [getset] |
| If set to true, Serialize will write a section of XML instead of an entire document. In other words, it will skip writing the start of the document.
|
|
string | ReadPath [get] |
| The path where the current file is being loaded from. This might be null in cases where it's being loaded from a stream.
|
|
Serializing/deserializing OpenTAP objects. This class mostly just orchestrates a number of serializer plugins. MacroString