TableCollection Class
Contains information about all the tables in a Windows Installer database.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| Add(item) | Adds a new table to the database. |
| Clear() | Removes all tables (and all data) from the database. |
| Contains(item) | Checks if the database contains a table with the given name. |
| CopyTo(array, arrayIndex) | Copies the table information from this collection into an array. |
| GetEnumerator() | Enumerates the tables in the database. |
| Remove(item) | Removes a table from the database. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| Count | Gets the number of tables in the database. |
| IsReadOnly | Gets a boolean value indicating whether the collection is read-only. A TableCollection is read-only when the database is read-only. |
| Item | Gets information about a given table. |
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8 |
Add(item) Method
Section titled “Add(item) Method”Adds a new table to the database.
Declaration
Section titled “Declaration”public void Add( TableInfo item)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| item | TableInfo | information about the table to be added |
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.InvalidOperationException | a table with the same name already exists in the database |
Clear() Method
Section titled “Clear() Method”Removes all tables (and all data) from the database.
Declaration
Section titled “Declaration”public void Clear()Contains(item) Method
Section titled “Contains(item) Method”Checks if the database contains a table with the given name.
Declaration
Section titled “Declaration”public bool Contains( string item)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| item | string | case-sensitive name of the table to search for |
Return value
Section titled “Return value”bool True if the table exists, false otherwise.
CopyTo(array, arrayIndex) Method
Section titled “CopyTo(array, arrayIndex) Method”Copies the table information from this collection into an array.
Declaration
Section titled “Declaration”public void CopyTo( TableInfo[] array, int arrayIndex)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| array | TableInfo[] | destination array to be filed |
| arrayIndex | int | offset into the destination array where copying begins |
GetEnumerator() Method
Section titled “GetEnumerator() Method”Enumerates the tables in the database.
Declaration
Section titled “Declaration”public IEnumerator<WixToolset.Dtf.WindowsInstaller.TableInfo> GetEnumerator()Remove(item) Method
Section titled “Remove(item) Method”Removes a table from the database.
Declaration
Section titled “Declaration”public bool Remove( string item)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| item | string | case-sensitive name of the table to be removed |
Return value
Section titled “Return value”bool true if the table was removed, false if the table did not exist
Count Property
Section titled “Count Property”Gets the number of tables in the database.
Declaration
Section titled “Declaration”public int Count { get; set; }IsReadOnly Property
Section titled “IsReadOnly Property”Gets a boolean value indicating whether the collection is read-only. A TableCollection is read-only when the database is read-only.
Declaration
Section titled “Declaration”public bool IsReadOnly { get; set; }Item Property
Section titled “Item Property”Gets information about a given table.
Declaration
Section titled “Declaration”public TableInfo Item[ string table] { get; set; }Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| table | string | case-sensitive name of the table |