InvokeToAllTargetSites method

To invoke an IDO method at all the target sites defined in the replication rules, use the InvokeToAllTargetSites method.

This method is equivalent to the RemoteMethodForReplicationTargetsSp stored procedure. It follows the same behavior or process as the Invoke method method for both transactional and delayed replication.

Parameters required by this method

To be used correctly, these are the parameters that this method requires:

Parameter Data Type Description
IDO Name System.String This is the name of the IDO on the target site where the remote IDO method resides.
Method Name System.String This is the name of the IDO method that is to be called at the target site.
Parameters Correspond to the data types of the arguments to be passed, as expected by the remote method This is a list of a variable number of arguments to be passed to the IDO method being called.

This example invokes an IDO method at all remote sites:

var idoName = "ProductInfo";
var idoMethodName = "ProcessProductStatus";
var arg1 = -1;
var arg2 = "AllProducts";

//Call the IDO method to all target sites mapped with the current site.
RemoteMethod.InvokeToAllTargetSites( idoName, idoMethodName, arg1, arg2 );