Class FinSegments
A container that holds an ordered sequence of FinSegment instances.
public class FinSegments : IEnumerable
- Inheritance
-
FinSegments
- Implements
- Inherited Members
Constructors
FinSegments()
public FinSegments()
Properties
Count
public int Count { get; }
Property Value
this[int]
Default indexer that provides convenient access to the FinSegment instances of this container.
public FinSegment this[int i] { get; }
Parameters
i
int
Property Value
Methods
Add(FinSegment)
public void Add(FinSegment aSegment)
Parameters
aSegment
FinSegment
Clear()
public void Clear()
FindSegment(string, int)
Finds the segment with the given segment type and an also given maximum acceptable segment version.
public FinSegment FindSegment(string sSegmentType, int nMaxSegmentVersion)
Parameters
sSegmentType
stringThe segment type of the segment that is sought. This must not be null. The segment type is always matched exactly.
nMaxSegmentVersion
intMaximum acceptable segment version that is sought. If this is zero, then the very first occurence of sSegmentType is returned, regardless of its version number. If this is MaxValue, then the segment with the given type and the highest version number in the collection is returned. In any other case, the first segment with a matching sSegmentType and the highest version number that is less or equal than nMaxSegmentVersion is returned.
Returns
- FinSegment
If an acceptable segment was found, then its reference is returned. If not, then
null
is returned. The version number of the segment that was actually found can be checked through the Version property of the returned FinSegment.
Exceptions
- ArgumentNullException
null
was passed for the sSegmentType parameter.- ArgumentOutOfRangeException
A negative nMaxSegmentVersion value was passed.
GetEnumerator()
Provides enumerator over the FinSegment instances that are stored in this container.
public IEnumerator GetEnumerator()
Returns
- IEnumerator
IEnumrator implementation that enumerates the data elements in this container.
GetSegment(int)
public FinSegment GetSegment(int i)
Parameters
i
int
Returns
Read(Stream, bool)
public static FinSegments Read(Stream aStream, bool fSkipWhitespace)
Parameters
Returns
Remove(FinSegment)
public void Remove(FinSegment aSegment)
Parameters
aSegment
FinSegment
Write(Stream, bool)
public void Write(Stream aStream, bool fAddWhitespace)