// 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
{
///
/// Base class for OpenTAP Serializer plugins. Implement this in a public class to extend the TapSerializer with additional functionality.
///
[Display("Serializer")]
public abstract class TapSerializerPlugin : ITapSerializerPlugin
{
/// Log source for serializer plugins.
protected static TraceSource Log = OpenTap.Log.CreateSource("Serializer");
/// The object facilitating Serialization or Deserialization.
protected TapSerializer Serializer { get; private set; }
/// Creates a new TapSerializerPlugin.
public TapSerializerPlugin()
{
this.Serializer = TapSerializer.GetCurrentSerializer();
}
///
/// Priority of the serializer. Defines the order in which the serializers are used. Default is 0.
///
public virtual double Order { get { return 0; } }
///
/// Implement to deserialize an object.
///
///
///
///
///
public abstract bool Deserialize(XElement node, ITypeData t, Action