Class BoundSelector
- Namespace
- Hi.Numerical.StepSelectionUtils
- Assembly
- HiMech.dll
Mark on source command line for managing step.
public class BoundSelector : IFileLineIndex, IGetFileLineIndex, IMakeXmlSource
- Inheritance
-
BoundSelector
- Implements
- Inherited Members
- Extension Methods
Constructors
BoundSelector(BoundAnchorMode, IStepShift, FileLineIndex, int)
Initializes a new instance of the BoundSelector class.
public BoundSelector(BoundAnchorMode anchorMode, IStepShift shift, FileLineIndex fileLineIndex, int boundStepIndex)
Parameters
anchorMode
BoundAnchorModeThe anchor mode for the bound.
shift
IStepShiftThe step shift to apply.
fileLineIndex
FileLineIndexThe file line index.
boundStepIndex
intThe step index at the boundary.
BoundSelector(XElement, string)
Ctor.
public BoundSelector(XElement src, string baseDirectory)
Parameters
Properties
BoundStepIndex
If locale on begin, the step index should be the first step of the line; if locale on end, the step index should be the last step of the line. i.e. the index is inclusive.
public int BoundStepIndex { get; set; }
Property Value
FileIndex
File Index. Start on 0.
public int FileIndex { get; set; }
Property Value
FileLineIndex
Gets or sets the file line index.
public FileLineIndex FileLineIndex { get; set; }
Property Value
FileNo
Gets or sets the file number.
public int FileNo { get; set; }
Property Value
KeyAnchorMode
Gets or sets the key anchor mode that determines how the boundary is anchored.
public BoundAnchorMode KeyAnchorMode { get; set; }
Property Value
LineIndex
Line Index. Start on 0.
public int LineIndex { get; set; }
Property Value
LineNo
Gets or sets the line number.
public int LineNo { get; set; }
Property Value
Shift
Gets or sets the shift to apply to the step index.
public IStepShift Shift { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
GetFileLineIndex()
Get FileLineIndex.
public FileLineIndex GetFileLineIndex()
Returns
MakeXmlSource(string, string)
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)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
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.