set_proxy


Description:

public bool set_proxy (Asset? proxy)

Sets the proxy for the asset.

If proxy is among the existing proxies of the asset (see list_proxies) it will be moved to become the default proxy. Otherwise, if proxy is not null, it will be added to the list of proxies, as the new default. The previous default proxy will become 'next in line' for if the new one is removed, and so on. As such, this will **not** actually remove the previous default proxy (use unproxy for that).

Note that an asset can only act as a proxy for one other asset.

As a special case, if proxy is null, then this method will actually remove **all** proxies from the asset.

Parameters:

this

The Asset to proxy

proxy

A new default proxy for this

Returns:

true if proxy was successfully set as the default for this .