Reference
OpcMethodDelegateCommand Members
Provides an implementation of the IOpcMethodCommand interface which delegates method evaluations and method calls to a set of callback routines.
Reference
OpcMethodDelegateCommand Members
- Type
- OpcMethodDelegateCommand
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Constructors
OpcMethodDelegateCommand
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the OpcexecuteCallback specified. |
| Opc | Initializes a new instance of the OpcexecuteCallback and can specified. |
| Opc | Initializes a new instance of the OpcexecuteCallback, can and can specified. |
OpcMethodDelegateCommand(OpcMethodExecuteCallback)
Initializes a new instance of the OpcMethodDelegateCommand class using the executeCallback specified.
public OpcMethodDelegateCommand(OpcMethodExecuteCallback executeCallback)Public Sub New(executeCallback As OpcMethodExecuteCallback)Parameters
| Name | Type | Description |
|---|---|---|
executeCallback | Opc | The Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The executeCallback is a null reference ( |
OpcMethodDelegateCommand(OpcMethodExecuteCallback, OpcMethodCanExecuteCallback)
Initializes a new instance of the OpcMethodDelegateCommand class using the executeCallback and canExecuteCallback specified.
public OpcMethodDelegateCommand(
OpcMethodExecuteCallback executeCallback,
OpcMethodCanExecuteCallback canExecuteCallback)Public Sub New(
executeCallback As OpcMethodExecuteCallback,
canExecuteCallback As OpcMethodCanExecuteCallback)Parameters
| Name | Type | Description |
|---|---|---|
executeCallback | Opc | The Opccan evaluates to the value true as soon as the method of this command is called. |
can | Opc | The Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The executeCallback or can is a null reference ( |
OpcMethodDelegateCommand(OpcMethodExecuteCallback, OpcMethodCanExecuteCallback, OpcMethodCanExecuteCallback)
Initializes a new instance of the OpcMethodDelegateCommand class using the executeCallback, canExecuteCallback and canUserExecuteCallback specified.
public OpcMethodDelegateCommand(
OpcMethodExecuteCallback executeCallback,
OpcMethodCanExecuteCallback canExecuteCallback,
OpcMethodCanExecuteCallback canUserExecuteCallback)Public Sub New(
executeCallback As OpcMethodExecuteCallback,
canExecuteCallback As OpcMethodCanExecuteCallback,
canUserExecuteCallback As OpcMethodCanExecuteCallback)Parameters
| Name | Type | Description |
|---|---|---|
executeCallback | Opc | The Opccan and can evaluate to the value true as soons as the method of this command is called. |
can | Opc | The Opc |
can | Opc | The Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The executeCallback, can or can is a null reference ( |
Methods
CanExecute
Determines the value of the Executable attribute of the method (CanExecute) and therefore decides whether the Execute method can be called in general to execute the method implementation.
public bool CanExecute(OpcContext context)Public Function CanExecute(context As OpcContext) As BooleanParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The Opc |
Returns
The value true if the method can be called; otherwise the value false.
Implements
CanUserExecute
Determines the value of the UserExecutable attribute of the method (CanUserExecute) and therefore decides wether the Execute method can be called by the current user to execute the method implementation.
public bool CanUserExecute(OpcContext context)Public Function CanUserExecute(context As OpcContext) As BooleanParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The Opc |
Returns
The value true if the method can be called; otherwise the value false.
Implements
Execute
Performs the tasks necessary to implement the logic associated with a specific method using the context and inputArguments specified.
public void Execute(
OpcMethodContext context,
IList<object> inputArguments,
IList<object> outputArguments)Public Sub Execute(
context As OpcMethodContext,
inputArguments As IList(Of Object),
outputArguments As IList(Of Object))Parameters
| Name | Type | Description |
|---|---|---|
context | OpcMethodContext | The OpcMethodContext which provides the contextual information required to execute the method. |
inputArguments | IList<Object> | The generic list of object values to use / respect during the execution of the method. |
outputArguments | IList<Object> | The generic list of object values to use for out, ref ( |
Implements
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 and CanUserExecute evaluates to the value true.

