Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcMethodDelegateCommand type exposes the following members.
Initializes a new instance of the OpcMethodDelegateCommand class using the executeCallback
specified.
C#
public OpcMethodDelegateCommand(OpcMethodExecuteCallback executeCallback)
Parameters
executeCallback
OpcMethodExecuteCallback
The OpcMethodExecuteCallback which is invoked whenever the method of this command is called.
Exceptions
The executeCallback
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the OpcMethodDelegateCommand class using the executeCallback
and canExecuteCallback
specified.
C#
public OpcMethodDelegateCommand(OpcMethodExecuteCallback executeCallback, OpcMethodCanExecuteCallback canExecuteCallback)
Parameters
executeCallback
OpcMethodExecuteCallback
The OpcMethodExecuteCallback which is invoked whenever the canExecuteCallback
evaluates to the value true as soon as the method of this command is called.
canExecuteCallback
OpcMethodCanExecuteCallback
The OpcMethodCanExecuteCallback which is used to evaluate whether the method of this command can be called in general and by the current user.
Exceptions
The executeCallback
or canExecuteCallback
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the OpcMethodDelegateCommand class using the executeCallback
, canExecuteCallback
and canUserExecuteCallback
specified.
C#
public OpcMethodDelegateCommand(OpcMethodExecuteCallback executeCallback, OpcMethodCanExecuteCallback canExecuteCallback, OpcMethodCanExecuteCallback canUserExecuteCallback)
Parameters
executeCallback
OpcMethodExecuteCallback
The OpcMethodExecuteCallback which is invoked whenever the canExecuteCallback
and canUserExecuteCallback
evaluate to the value true as soons as the method of this command is called.
canExecuteCallback
OpcMethodCanExecuteCallback
The OpcMethodCanExecuteCallback which is used to evaluate whether the method of this command can be called in general.
canUserExecuteCallback
OpcMethodCanExecuteCallback
The OpcMethodCanExecuteCallback which is used to evaluate whether the method of this command can be called by the current user.
Exceptions
The executeCallback
, canExecuteCallback
or canUserExecuteCallback
is a null reference (Nothing in Visual Basic).
Determines the value of the Executable attribute of the method (CanExecute) and therefore decides whether the Execute(OpcMethodContext, IList, IList) method can be called in general to execute the method implementation.
C#
public bool CanExecute(OpcContext context)
Parameters
context
OpcContext
The OpcReadAttributeValueContext in case there the Executable attribute is read or the OpcMethodContext in case there the method call is to be processed.
Returns
The value true if the method can be called; otherwise the value false.
Determines the value of the UserExecutable attribute of the method (CanUserExecute) and therefore decides wether the Execute(OpcMethodContext, IList, IList) method can be called by the current user to execute the method implementation.
C#
public bool CanUserExecute(OpcContext context)
Parameters
context
OpcContext
The OpcReadAttributeValueContext in case there the UserExecutable attribute is read or the OpcMethodContext in case there the method call is to be processed.
Returns
The value true if the method can be called; otherwise the value false.
Performs the tasks necessary to implement the logic associated with a specific method using the context
and inputArguments
specified.
C#
public void Execute(OpcMethodContext context, IList<object> inputArguments, IList<object> outputArguments)
Parameters
context
OpcMethodContext
The OpcMethodContext which provides the contextual information required to execute the method.
The generic list of Object values to use / respect during the execution of the method.
The generic list of Object values to use for out, ref (in Visual Basic ByRef) and returned values.
Remarks
Any OPC UA related result information is to be set using the Result property of the context
.
This method is (to be) only called after the call to CanExecute(OpcContext) and CanUserExecute(OpcContext) evaluates to the value true.