BoundsCheckableList
Overview
BoundsCheckableList is a class in Aspose.PDF FOSS for .NET.
Inherits from: System.Collections.Generic.IEnumerable<T>.
A list of T that optionally enforces container bounds on insertion: under ThrowExceptionIfDoesNotFit an item whose CheckBounds fails raises BoundsOutOfRangeException at add time.
This class declares 13 methods for BoundsCheckableList objects in .NET programs.
Available methods include: Add, BoundsCheckableList, Clear, Contains, CopyTo, GetEnumerator, IndexOf, Insert, Remove, RemoveAt, UpdateBoundsCheckMode.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Count, IsReadOnly.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Count | int | Read | Gets the number of items in the list. |
IsReadOnly | bool | Read | Gets the is read only. |
Methods
| Signature | Description |
|---|---|
BoundsCheckableList() | Creates an empty list that does not check bounds. |
BoundsCheckableList(boundsCheckMode: BoundsCheckMode, containerWidth: double, containerHeight: double) | Creates an empty list with the given bounds-check mode and container size in points. |
Add(item: T) | Appends an item; in ThrowExceptionIfDoesNotFit mode a shape that does not fit the container throws BoundsOutOfRangeException. |
Clear() | Removes all items from the list. |
Contains(item: T) | Returns true if the list contains the given item. |
CopyTo(array: T[], arrayIndex: int) | Copies the items into array, starting at position arrayIndex in that array. |
IndexOf(item: T) | Calls IndexOf(item) on this BoundsCheckableList instance. |
Insert(index: int, item: T) | Inserts an item at the given 0-based position; in ThrowExceptionIfDoesNotFit mode a shape that does not fit the container throws BoundsOutOfRangeException. |
Remove(item: T) | Removes the first occurrence of the item; returns true if it was found. |
RemoveAt(index: int) | Calls RemoveAt(index) on this BoundsCheckableList instance. |
UpdateBoundsCheckMode(boundsCheckMode: BoundsCheckMode) | Switch the bounds-check mode without changing the container. |
UpdateBoundsCheckMode(boundsCheckMode: BoundsCheckMode, containerWidth: double, containerHeight: double) | Switch the bounds-check mode and the container dimensions. |
GetEnumerator() | Calls GetEnumerator on this BoundsCheckableList instance. |