Opc.Ua.FiniteStateMachineState.InvokeCallback C# (CSharp) Method

InvokeCallback() protected method

Invokes the callback function if it has been specified.
protected InvokeCallback ( StateMachineTransitionHandler callback, ISystemContext context, StateMachineState machine, uint transitionId, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult
callback StateMachineTransitionHandler
context ISystemContext
machine StateMachineState
transitionId uint
causeId uint
inputArguments IList
outputArguments IList
return ServiceResult
        protected ServiceResult InvokeCallback(
            StateMachineTransitionHandler callback,
            ISystemContext context,
            StateMachineState machine,
            uint transitionId,
            uint causeId,
            IList<object> inputArguments,
            IList<object> outputArguments)
        {
            if (callback != null)
            {
                try
                {
                    return callback(context, this, transitionId, causeId, inputArguments, outputArguments);
                }
                catch (Exception e)
                {
                    return new ServiceResult(e);
                }
            }

            return ServiceResult.Good;
        }