CVB.Net 14.0
SampleImageList.ClassInformationCollection Class Reference

ClassInformationCollection helper class for MantoSampleImageList More...

Inherits InfoCollection< SampleImageList, ClassInformation >.

Public Member Functions

void Create (string name)
 Create a new empty class. More...
 
bool Contains (string name)
 Check if a certain name is present in the SIL More...
 
void Clear ()
 Remove all classes in the Sample image List. More...
 
bool Remove (int Index)
 Remove a class by Index. More...
 
bool Remove (string ID)
 Remove a class by ID More...
 
- Public Member Functions inherited from InfoCollection< SampleImageList, ClassInformation >
TInfo[] ToArray ()
 Converts this collection into an array. More...
 

Protected Member Functions

override int GetCount ()
 Parent class calls this method to determine the number of objects in the collection. More...
 
override ClassInformation GetInfo (int index)
 Parent class calls this method to extract one info object by index. More...
 
- Protected Member Functions inherited from InfoCollection< SampleImageList, ClassInformation >
 InfoCollection (TParent parent)
 Constructor. More...
 
abstract int GetCount ()
 Function with which the collection queries the number of elements More...
 
abstract TInfo GetInfo (int index)
 Function with which the collection retrieves the information object with the given index. More...
 

Properties

ClassInformation this[int index] [get]
 Index-based item access. More...
 
ClassInformation this[string name] [get]
 String-based item access. More...
 
- Properties inherited from InfoCollection< SampleImageList, ClassInformation >
int Count [get]
 Number of elements in the collection. More...
 

Additional Inherited Members

- Protected Attributes inherited from InfoCollection< SampleImageList, ClassInformation >
readonly TParent Parent
 Parent image reference helps keeping track of the lifetime and provides the information basis for index access
 

Detailed Description

ClassInformationCollection helper class for MantoSampleImageList

Member Function Documentation

◆ Clear()

void Clear ( )

Remove all classes in the Sample image List.

Note that this invalidates all ClassInfo objects and SampleInfo object that have been taken from this collection!

Exceptions
ObjectDisposedExceptionIf the image list has already been disposed

◆ Contains()

bool Contains ( string  name)

Check if a certain name is present in the SIL

Parameters
namename to be checked for
Returns
true/false
Exceptions
ObjectDisposedExceptionIf the image list has already been disposed

◆ Create()

void Create ( string  name)

Create a new empty class.

Parameters
nameName of the class to be created
Exceptions
ObjectDisposedExceptionIf the image list has already been disposed
InvalidOperationExceptionwhen trying to add a new class that already exists or if the name parameter contains an empty string.
ArgumentNullExceptionIf name is null

◆ GetCount()

override int GetCount ( )
protectedvirtual

Parent class calls this method to determine the number of objects in the collection.

Returns
number of objects in the collection
Exceptions
ObjectDisposedExceptionIf the SampleImageList has already been disposed

Implements InfoCollection< SampleImageList, ClassInformation >.

◆ GetInfo()

override ClassInformation GetInfo ( int  index)
protectedvirtual

Parent class calls this method to extract one info object by index.

Parameters
indexindex at which to extract
Returns
extracted object
Exceptions
ObjectDisposedExceptionIf the SampleImageList has already been disposed
ArgumentOutOfRangeExceptionIf the index is invalid

Implements InfoCollection< SampleImageList, ClassInformation >.

◆ Remove() [1/2]

bool Remove ( int  Index)

Remove a class by Index.

Parameters
Indexindex of the class to be removed
Exceptions
ObjectDisposedExceptionIf the image list has already been disposed
Returns
true if the class has been removed, false it is has not been removed or if it was not found in the image list

◆ Remove() [2/2]

bool Remove ( string  ID)

Remove a class by ID

Parameters
IDID of the class to be removed
Exceptions
ObjectDisposedExceptionIf the image list has already been disposed
Returns
true if the class has been removed, false it is has not been removed or if it was not found in the image list

Property Documentation

◆ this[int index]

ClassInformation this[int index]
get

Index-based item access.

Parameters
indexindex to be accessed
Returns
indexed class object
Exceptions
ObjectDisposedExceptionIf the SampleImageList has already been disposed
ArgumentOutOfRangeExceptionIf the index is invalid

◆ this[string name]

ClassInformation this[string name]
get

String-based item access.

Parameters
nameName to be accessed
Returns
indexed class object
Exceptions
ObjectDisposedExceptionIf the SampleImageList has already been disposed