Skip to main content

SourceMediaList Class

A list of source media for an installed product or patch.

Methods

MethodDescription
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

PropertyDescription
CountGets the number of source media in the list.
IsReadOnlyGets 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

Adds or updates a disk of the media source for the product or patch.

Declaration

public void Add()

Remarks

Win32 MSI API: MsiSourceListAddMediaDisk

Clear() Method

Removes all source media from the list.

Declaration

public void Clear()

Remarks

Win32 MSI API: MsiSourceListClearAllEx

Contains(diskId) Method

Checks if the specified media disk id exists in the list.

Declaration

public bool Contains(
int diskId
)

Parameters

ParameterTypeDescription
diskIdintdisk id of the media to look for

Return value

bool true if the media exists in the list, false otherwise

CopyTo(array, arrayIndex) Method

Copies the source media info from this list into an array.

Declaration

public void CopyTo(
MediaDisk[] array,
int arrayIndex
)

Parameters

ParameterTypeDescription
arrayMediaDisk[]destination array to be filed
arrayIndexintoffset into the destination array where copying begins

GetEnumerator() Method

Enumerates the source media in the source list of the patch or product installation.

Declaration

public IEnumerator<WixToolset.Dtf.WindowsInstaller.MediaDisk> GetEnumerator()

Remarks

Win32 MSI API: MsiSourceListEnumMediaDisks

Remove(diskId) Method

Removes a specified disk from the set of registered disks.

Declaration

public bool Remove(
int diskId
)

Parameters

ParameterTypeDescription
diskIdintID of the disk to remove

Remarks

Win32 MSI API: MsiSourceListClearMediaDisk

Count Property

Gets the number of source media in the list.

Declaration

public int Count { get; set; } 

IsReadOnly Property

Gets a boolean value indicating whether the list is read-only. A SourceMediaList is never read-only.

Declaration

public bool IsReadOnly { get; set; }