This interface is implemented by the connection collection object.
interface IConnectionCollection extends ${IDispatch} {
// Properties
${Count}: number;
[${Item}: number]: ${IConnection};
}
public interface IConnectionCollection : ${IDispatch}
{
// Properties
int ${Count} { get; set; }
${IConnection} ${Item}[int Index] { get; set; }
}
struct IConnectionCollection : IDispatch
{
// Properties
long ${Count}; // get set
${IConnectionPtr#IConnection} ${Item}(_variant_t Index); // get set
};
Count: number;
int Count { get; set; }
long Count; // get set
Returns the number of connections in the collection.
[Item: number]: ${IConnection};
${IConnection} Item[int Index] { get; set; }
${IConnectionPtr#IConnection} Item(_variant_t Index); // get set
Returns the connection from the collection. Index must be an integer number. In most languages, this method may be called using the array indexing operator.
Obtaining the last connection:
$dms = New-Object -ComObject 'dmssrv.MonitoringSite'
$connections = $dms.Connections
$connection = $connections[0]