//
// OpenCover - S Wilde
//
// This source code is released under the MIT License; see the accompanying license file.
//
using System.Linq;
using System.Xml.Serialization;
namespace OpenCover.Framework.Model
{
///
/// a branch point
///
public class BranchPoint : InstrumentationPoint, IDocumentReference
{
///
/// Line of the branching instruction
///
[XmlAttribute("sl")]
public int StartLine { get; set; }
///
/// A path that can be taken
///
[XmlAttribute("path")]
public int Path { get; set; }
///
/// List of OffsetPoints between Offset and EndOffset (exclusive)
///
[XmlAttribute("offsetchain")]
public System.Collections.Generic.List OffsetPoints { get; set; }
///
/// Should offset points be serialized
///
///
public bool ShouldSerializeOffsetPoints()
{
return OffsetPoints.Maybe(_ => _.Any());
}
///
/// Last Offset == EndOffset.
/// Can be same as Offset
///
[XmlAttribute("offsetend")]
public int EndOffset { get; set; }
///
/// The file associated with the supplied startline
///
[XmlAttribute("fileid")]
public uint FileId { get; set; }
///
/// The url to the document if an entry was not mapped to an id
///
[XmlAttribute("url")]
public string Document { get; set; }
}
}