using System.Xml.Serialization;
namespace OpenCover.Framework.Model
{
///
/// The entity can be skipped from coverage but needs to supply a reason
///
public abstract class SkippedEntity
{
private SkippedMethod? _skippedDueTo;
///
/// If this class has been skipped then this value will describe why
///
[XmlAttribute("skippedDueTo")]
public SkippedMethod SkippedDueTo
{
get { return _skippedDueTo.GetValueOrDefault(); }
set { _skippedDueTo = value; }
}
///
/// If this class has been skipped then this value will allow the data to be serialized
///
public bool ShouldSerializeSkippedDueTo() { return _skippedDueTo.HasValue; }
///
/// Mark an entity as skipped
///
/// Provide a reason
public abstract void MarkAsSkipped(SkippedMethod reason);
}
}