Class Feed<T>
Represents a List with a given range of elements that are currently accessible
Inheritance
System.Object
Feed<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug
Assembly: ladybug.dll
Syntax
public class Feed<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceFeed(List<T>, Int32, Int32)
Creates a new Feed
Declaration
public Feed(List<T> list, int maxLines, int startOffset = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | list | Source list |
System.Int32 | maxLines | Size of the View |
System.Int32 | startOffset | Initial View position |
Feed(Int32)
Creates a new Feed
Declaration
public Feed(int maxLines)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxLines | Size of the View |
Properties
| Improve this Doc View SourceMaxLines
Size of the View
Declaration
public int MaxLines { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxOffset
Maximum possible offset value considering total item count and size of the View
Declaration
public int MaxOffset { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
View
List representing the current accessible items in the Feed
Declaration
public IList<T> View { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<T> |
Methods
| Improve this Doc View SourceAddLine(T, Boolean)
Adds an item to the Feed
Declaration
public void AddLine(T item, bool preventScroll = false)
Parameters
Type | Name | Description |
---|---|---|
T | item | |
System.Boolean | preventScroll |
Reset()
Resets the Feed, clearing all items and returning the View position to the beginning of the Feed
Declaration
public void Reset()
ResetPosition()
Resets the View to the beginning of the Feed
Declaration
public void ResetPosition()
Scroll(Int32)
Moves the View relative to its current position
Declaration
public void Scroll(int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | offset | Direction and distance to move the View |
ScrollTo(Int32)
Moves the View to the specified position
Declaration
public void ScrollTo(int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | offset |
ScrollToEnd()
Moves the View to the furthest possible position
Declaration
public void ScrollToEnd()
SetMaxLines(Int32)
Sets the maximum size of the View
Declaration
public void SetMaxLines(int maxLines)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxLines |