GetEnumerator Method

DTF API

Copy image CopyHover image
Deployment Tools Foundation GetEnumerator Method
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerViewGetEnumerator()()()()
Enumerates over the Records retrieved by the View.
Declaration Syntax
C# Visual Basic Visual C++ F#
public IEnumerator<Record> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of Record)
public:
virtual IEnumerator<Record^>^ GetEnumerator() sealed
abstract GetEnumerator : unit -> IEnumerator<Record> 
override GetEnumerator : unit -> IEnumerator<Record> 
Return Value
IEnumerator<(Of <(<'Record>)>)>
An enumerator of Record objects.
Remarks

Each Record object should be Close()()()()d after use. It is best that the handle be closed manually as soon as it is no longer needed, as leaving lots of unused handles open can degrade performance. However, note that it is not necessary to complete the enumeration just for the purpose of closing handles, because Records are fetched lazily on each step of the enumeration.

Win32 MSI API: MsiViewFetch

Exceptions
Exception Condition
InstallerException The View was not Execute(Record)d before attempting the enumeration.

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)