An Aliases collection is used to manipulate the persistent local mappings of aliases to server names (handles) on a PI-SDK machine. There are two instances of the Aliases collection available as properties of the global Servers collection, the Servers.Aliases property and the Servers.PathAliases properties.
Servers.Aliases contains mappings of alternate serverIDs or names for a server. Each server will return a serverID that identifies it to clients. Due to upgrades on the server or older applications which stored client generated serverIDs, it is possible for a client to know a server by IDs other than the one it is currently publishing. The PI-SDK allows a user to build a table of these alternate serverIDs as aliases and stores them in the registry. The Servers.Aliases collection provides a programmatic interface to this data. Alternate serverIDs (aliases) may be added and removed, and iterated with the For Each statement. To lookup the corresponding server name(handle) for a serverID (alias) use the Item property. Aliases may also be added to be used as pseudonyms for the server. The Servers.Item method checks this table when it can't find a match for a passed index.
The Servers.PathAliases property contains a similar mapping of alias values to server names (handles). In this case the alias values represent alternate server locations. Applications that persist serverIDs and locations with other stored data, may encounter situations where the persisted location no longer matches the serverID retrieved from a server at that location or there may no longer be a server at the persisted location. In these instances the application can allow the user to choose which server should be mapped to the stored server location (if any) and store this information in the PI-SDK. Again the mapping is stored in the registry and the Servers.PathAliases property provides access to the stored table of mappings. This collection is provided for application usage. Other lookup methods in the SDK do not make use of this table.
This object supports the IRefresh interface.