// Copyright Keysight Technologies 2012-2019 // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, you can obtain one at http://mozilla.org/MPL/2.0/. using System; using System.Xml.Linq; namespace OpenTap { /// /// Species a OpenTAP Serializer plugin. /// [Display("Serializer")] public interface ITapSerializerPlugin : ITapPlugin { /// /// Called as part for the deserialization chain. Returns false if it cannot serialize the XML element. /// /// /// /// /// bool Deserialize(XElement node, ITypeData t, Action setter); /// /// Called as part for the serialization chain. Returns false if it cannot serialize the XML element. /// /// The output XML element. /// The object being deserialized. /// The expected type from deserialization. /// return true if the object could be serialized. bool Serialize(XElement node, object obj, ITypeData expectedType); /// /// Priority of the serializer. Defines the order in which the serializers are used. /// Higher order serializers are used first. Default is 0. /// double Order { get; } } }