SourceMediaList Class
A list of source media for an installed product or patch.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| Add() | Adds or updates a disk of the media source for the product or patch. |
| Clear() | Removes all source media from the list. |
| Contains(diskId) | Checks if the specified media disk id exists in the list. |
| CopyTo(array, arrayIndex) | Copies the source media info from this list into an array. |
| GetEnumerator() | Enumerates the source media in the source list of the patch or product installation. |
| Remove(diskId) | Removes a specified disk from the set of registered disks. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| Count | Gets the number of source media in the list. |
| IsReadOnly | Gets a boolean value indicating whether the list is read-only. A SourceMediaList is never read-only. |
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8 |
Add() Method
Section titled “Add() Method”Adds or updates a disk of the media source for the product or patch.
Declaration
Section titled “Declaration”public void Add()Remarks
Section titled “Remarks”Win32 MSI API: MsiSourceListAddMediaDisk
Clear() Method
Section titled “Clear() Method”Removes all source media from the list.
Declaration
Section titled “Declaration”public void Clear()Remarks
Section titled “Remarks”Win32 MSI API: MsiSourceListClearAllEx
Contains(diskId) Method
Section titled “Contains(diskId) Method”Checks if the specified media disk id exists in the list.
Declaration
Section titled “Declaration”public bool Contains( int diskId)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| diskId | int | disk id of the media to look for |
Return value
Section titled “Return value”bool true if the media exists in the list, false otherwise
CopyTo(array, arrayIndex) Method
Section titled “CopyTo(array, arrayIndex) Method”Copies the source media info from this list into an array.
Declaration
Section titled “Declaration”public void CopyTo( MediaDisk[] array, int arrayIndex)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| array | MediaDisk[] | destination array to be filed |
| arrayIndex | int | offset into the destination array where copying begins |
GetEnumerator() Method
Section titled “GetEnumerator() Method”Enumerates the source media in the source list of the patch or product installation.
Declaration
Section titled “Declaration”public IEnumerator<WixToolset.Dtf.WindowsInstaller.MediaDisk> GetEnumerator()Remarks
Section titled “Remarks”Win32 MSI API: MsiSourceListEnumMediaDisks
Remove(diskId) Method
Section titled “Remove(diskId) Method”Removes a specified disk from the set of registered disks.
Declaration
Section titled “Declaration”public bool Remove( int diskId)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| diskId | int | ID of the disk to remove |
Remarks
Section titled “Remarks”Win32 MSI API: MsiSourceListClearMediaDisk
Count Property
Section titled “Count Property”Gets the number of source media in the list.
Declaration
Section titled “Declaration”public int Count { get; set; }IsReadOnly Property
Section titled “IsReadOnly Property”Gets a boolean value indicating whether the list is read-only. A SourceMediaList is never read-only.
Declaration
Section titled “Declaration”public bool IsReadOnly { get; set; }