Class FileTimecodeSection
(A) Time window expressed in relative TimeSpan timecodes only.
public sealed class FileTimecodeSection : IFileTimeSection, IMakeXmlSource
- Inheritance
-
FileTimecodeSection
- Implements
- Inherited Members
- Extension Methods
Constructors
FileTimecodeSection()
Initializes an empty instance.
public FileTimecodeSection()
FileTimecodeSection(FileTimecodeDateTimeSection)
Projects a both-form (C) section onto its timecode form (independent copy).
public FileTimecodeSection(FileTimecodeDateTimeSection c)
Parameters
FileTimecodeSection(string, Range<TimeSpan>)
Initializes from a file and a timecode range.
public FileTimecodeSection(string file, Range<TimeSpan> timeRange)
Parameters
FileTimecodeSection(string, TimeSpan, TimeSpan)
Initializes from a file and begin/end timecodes.
public FileTimecodeSection(string file, TimeSpan beginTimecode, TimeSpan endTimecode)
Parameters
FileTimecodeSection(XElement)
Initializes from XML; accepts new BeginTimecode and legacy BeginTime / BeginTime_s.
public FileTimecodeSection(XElement src)
Parameters
srcXElement
Fields
LegacyXName
Legacy element name; pre-rename projects wrote <FileTimeSection> for this form.
public const string LegacyXName = "FileTimeSection"
Field Value
Properties
BeginTimecode
Window start as a timecode (position from run start).
public TimeSpan BeginTimecode { get; set; }
Property Value
EndTimecode
Window end as a timecode (position from run start).
public TimeSpan EndTimecode { get; set; }
Property Value
File
Relative path of the referenced (sensor) file.
public string File { get; set; }
Property Value
TimeRange
The timecode range backing BeginTimecode / EndTimecode.
public Range<TimeSpan> TimeRange { get; set; }
Property Value
XName
XML element name for XFactory registration.
public static string XName { get; }
Property Value
Methods
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.
Reg(XFactory)
Registers this type (and its legacy element name) with the factory. Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.