Microsoft Internet Security and Acceleration Server 2004 SDK

Collection Methods and Properties

All the collections that are defined in the ISA Server administration object model have a similar set of methods and properties, which are all or a combination of the following.

Method Description
Save Writes the current values of all the properties of the collection and its elements to persistent storage. Modifications made to the collection will not be saved until after this method is called.

The Save method is recursive, so calling the Save method of a collection will save the data for every subobject within the collection.

Refresh Reads the values of all the properties of the collection and its elements from persistent storage. The Refresh method does not check whether there are any unsaved changes made to the elements, so all changes made after the last Save method call will be lost. The Refresh method is useful when you want to cancel changes that have been made but not yet saved with the Save method.

The Refresh method is recursive, so calling the Refresh method of a collection will read the data for every subobject within the collection.

Add Adds an element to the collection, and returns a reference to the newly created element. This method takes a string parameter that identifies the new element. The string parameter can be used later to retrieve the element by using the Item method.

To save this new element to persistent storage, call the Save method.

Remove Removes a specified element from the collection. This method takes a string parameter or index of the element to be removed from the collection.
Item Returns the requested element from the collection. This method retrieves an element by an index that is an integer value. ISA Server collection indices are one-based, meaning that the items are numbered from 1 upward. There is no element with an index of 0. In some collections, the Item method can retrieve an element by using the name of the element, which is a string value.

Property Description
_NewEnum Retrieves an enumerator object for the collection. An enumerator object provides serial access to the elements of the collection.
Count Returns an integer value of the number of elements in the collection.
VendorParametersSets Retrieves an FPCVendorParametersSets collection for the storing and loading of custom data into the collection. The VendorParametersSets property is designed to integrate third-party extensions into ISA Server.

Most of the ISA Server collections work in the same way. For specific descriptions, see the individual collection reference pages.

With Microsoft® Visual C++®, you can browse a collection to find a particular item by using the _NewEnum property or the Item method. ISA Server collections include both the _NewEnum property and the Item method. The _NewEnum property retrieves a pointer to the IUnknown interface of an enumerator object that implements an IEnumVARIANT interface for the collection. An interface pointer to the IEnumVARIANT interface of the enumerator object can be retrieved by calling QueryInterface on the IUnknown interface returned.

Note  In Visual Basic®, you do not need to explicitly use the _NewEnum property, because it is used implicitly in For Each...In...Next constructs.