Persistate API documentation
Section Structure
NamespacesPersistate.UtilSection

[This is preliminary documentation and is subject to change.]

Represents a section of any numerically indexed collection, including String.
Declaration Syntax
C#
public struct Section
Members
All MembersConstructorsMethodsPropertiesFields



IconMemberDescription
Section(Int32, Int32)
Creates a Section with particular start and end indexes.

ContainingLineIn(String)
Gets a Section denoting the line of text containing the start of this Section in an input string.

Contains(Int32)
Determines whether a particular position is within this section.

Contains(Section)
Determines whether a section is wholly contained within this section.

Empty
A Section which has a start value of zero and an end value of -1.

Encompass(Section)
Alters this Section to encompass both this and a given section.

Encompassing(Section)
Returns a new Section encompassing both this and a given section.

End
Gets or sets the position of the last element in the section. Setting this does not affect Start but will affect Length.

Equals(Object)
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
FirstElement()()()()
Returns a new Section denoting the first element in this section.

Flate(Int32)
Inflates or deflates this section by a given amount. The amount is subtracted from the Start and added to the End.

FlatedBy(Int32)
Creates a new Section which is this section inflated or deflated by a particular amount. The amount is subtracted from the Start and added to the End.

From(String)
Copies the substring of an input string denoted by this Section.

From<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Copies those elements of an IList denoted by this section.

From<(Of <<'(T>)>>)(array<T>[]()[][])
Copies those elements of an array denoted by this section.

GetHashCode()()()()
Returns the hash code for this instance.
(Inherited from ValueType.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
IsEmpty
Gets a value indicating whether this represents an empty section. This is true when Length is less than or equal to zero

LastElement()()()()
Returns a new Section denoting the last element in this section.

Length
Gets or sets the length of the section. Setting this does not affect Start but will affect End.

LineNumberIn(String)
Gets the line number of the line containing the start of this Section of an input string.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
PostEnd
A convenience property which is always equal to End + 1.

Shift(Int32)
Shifts this Section by a particular amount forwards or backwards. The amount is added to both Start and End.

ShiftedBy(Int32)
Creates a new Section which is this section shifted forwards or backwards by a given amount. The amount is added to both Start and End.

Start
Gets or sets the position of the first element in the Section. Setting this does not affect End but will affect Length.

ToString()()()()
Creates a short string representation of the value of this Section
(Overrides ValueType.ToString()()()().)
UpTo(Section)
Obtains a section which denotes the elements from the start of this section up to the end of another section.

Remarks
This does not contain a reference to the collection, but simply holds a start and end index. It contains methods to retrieve information such as Start, End, Length, IsEmpty. It contains methods to manipulate sections such as Flate (inflate or deflate), Shift, Encompass. it also contains a set of generic From methods to extract a Section's worth of items from strings, lists or arrays.

Assembly: Persistate.Util (Module: Persistate.Util) Version: 0.6.1.20 (0.6.1.20)