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];
string credentialId = (string)inputArguments[1];
string credentialSecret = (string)inputArguments[2];
string resourceId = (string)inputArguments[3];
string accessToken = (string)outputArguments[0];
if (OnCall != null)
{
result = OnCall(
context,
this,
objectId,
applicationId,
credentialId,
credentialSecret,
resourceId,
ref accessToken);
}
outputArguments[0] = accessToken;
return result;
}