Table of Contents

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 BoundAnchorMode

The anchor mode for the bound.

shift IStepShift

The step shift to apply.

fileLineIndex FileLineIndex

The file line index.

boundStepIndex int

The step index at the boundary.

BoundSelector(XElement, string)

Ctor.

public BoundSelector(XElement src, string baseDirectory)

Parameters

src XElement

XML source element

baseDirectory string

Base directory for resolving relative paths

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

int

FileIndex

File Index. Start on 0.

public int FileIndex { get; set; }

Property Value

int

FileLineIndex

Gets or sets the file line index.

public FileLineIndex FileLineIndex { get; set; }

Property Value

FileLineIndex

FileNo

Gets or sets the file number.

public int FileNo { get; set; }

Property Value

int

KeyAnchorMode

Gets or sets the key anchor mode that determines how the boundary is anchored.

public BoundAnchorMode KeyAnchorMode { get; set; }

Property Value

BoundAnchorMode

LineIndex

Line Index. Start on 0.

public int LineIndex { get; set; }

Property Value

int

LineNo

Gets or sets the line number.

public int LineNo { get; set; }

Property Value

int

Shift

Gets or sets the shift to apply to the step index.

public IStepShift Shift { get; set; }

Property Value

IStepShift

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

GetFileLineIndex()

public FileLineIndex GetFileLineIndex()

Returns

FileLineIndex

FileLineIndex

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 string

The base directory for resolving relative paths

relFile string

The 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.