protected override ServiceResult Call(
ISystemContext context,
NodeId objectId,
IList<object> inputArguments,
IList<object> outputArguments)
{
if (OnCall == null)
{
return base.Call(context, objectId, inputArguments, outputArguments);
}
ServiceResult result = null;
NodeId applicationId = (NodeId)inputArguments[0];
NodeId requestId = (NodeId)inputArguments[1];
bool cancelRequest = (bool)inputArguments[2];
string credentialId = (string)outputArguments[0];
byte[] credentialSecret = (byte[])outputArguments[1];
string certificateThumbprint = (string)outputArguments[2];
string securityPolicyUri = (string)outputArguments[3];
if (OnCall != null)
{
result = OnCall(
context,
this,
objectId,
applicationId,
requestId,
cancelRequest,
ref credentialId,
ref credentialSecret,
ref certificateThumbprint,
ref securityPolicyUri);
}
outputArguments[0] = credentialId;
outputArguments[1] = credentialSecret;
outputArguments[2] = certificateThumbprint;
outputArguments[3] = securityPolicyUri;
return result;
}