iikoFront Api V7 Code Reference
iikoFront Api V7 Code Reference
Resto.Front.Api
IOperationService Interface
IOperationService Methods
RegisterExternalOperation Method
RegisterExternalOperation Method (String, String, Func(ValueTuple(Byte[], String, Int32, Guid), Byte[]))
RegisterExternalOperation(TRequest, TResponse) Method (String, String, Func(ValueTuple(TRequest, String, Int32, Guid), TResponse), SerializationBinder, ISurrogateSelector)

# IOperationService RegisterExternalOperation Method (String, String, Func ValueTuple Byte , String, Int32, Guid , Byte )

Exposes a custom operation to be available for call by other plugins. The registration is not permanent, it holds true until disposing the return value, or plugin shutdown.

Namespace: Resto.Front.Api
Assembly: Resto.Front.Api.V7 (in Resto.Front.Api.V7.dll) Version: 1ca4876affdd3bc5359a98b321fc115a647d2251
Syntax
C#
Copy

    IDisposable RegisterExternalOperation(
    	string serviceName,
    	string operationName,
    	Func<(byte[] , string callerPluginName, int callerPluginModuleId, Guid callerTerminalId), byte[]> callback
    )

#### Parameters

serviceName
  Type: System
  String
  Identifies the external service, just a namespace for a set of interrelated operations, which helps to group them logically. It's recommended to choose a unique name to avoid collisions with other plugins, i.e. include company's name or plugin's name into the service name. Min length is 1, max length is 50 chars.
operationName
  Type: System
  String
  In aggregate with [!:serviceName] identifies the operation. Both names have to be pre-shared with consumer plugins, so that they will be able to call the operation referring it by service and operation name. The combination of a service name and operation name must be unique at the same time. Min length is 1, max length is 50 chars.
callback
  Type: System
  Func
  ValueTuple
  Byte
  , String, Int32, Guid
  ,
  Byte
  The operation implementation, which will be called by other plugins via CallExternalOperation(Int32, String, String,
  Byte
  , ITerminal).

#### Return Value

Type: IDisposable
Remarks
Different plugins running under the same iikoFront application instance can communicate via external operations. iikoFront just transfers requests and responses between plugins without knowing any details. Both producer and consumer plugins should understand the data structure, developers should negotiate a protocol specification, pre-share operation names, handle versioning and so on. Producer plugin registers an operation using RegisterExternalOperation(String, String, Func
ValueTuple
Byte
, String, Int32, Guid
,
Byte
) and consumer plugin call it using CallExternalOperation(Int32, String, String,
Byte
, ITerminal).
See Also

#### Reference

IOperationService Interface
RegisterExternalOperation Overload
Resto.Front.Api Namespace
IOperationService
CallExternalOperation(Int32, String, String,
Byte
, ITerminal)