iikoFront Api V6 Code Reference
iikoFront Api V6 Code Reference
Resto.Front.Api.Extensions
OperationServiceExtensions Class
OperationServiceExtensions Methods
AddDiscount Method
AddDiscountByCardNumber Method
AddExternalPaymentItem Method
AddFlexibleSumDiscount Method
AddFlexibleSumDiscountByCardNumber Method
AddOrderCombo Method
AddOrderExternalData Method
AddOrderGuest Method
AddOrderModifierItem Method
AddOrderProductItem Method
AddOrderServiceItem Method
AddPaymentItem Method
AddPreliminaryPaymentItem Method
BindReserveToOrder Method
CallExternalOperation(TRequest, TResponse) Method
ChangeClientAddresses Method
ChangeClientBirthDate Method
ChangeClientBlacklistInfo Method
ChangeClientCardNumber Method
ChangeClientComment Method
ChangeClientEmails Method
ChangeClientGender Method
ChangeClientIikoBizId Method
ChangeClientIikoNetId Method
ChangeClientLastOrderDate Method
ChangeClientLinkedCounteragent Method
ChangeClientMainAddressIndex Method
ChangeClientMarketingSource Method
ChangeClientName Method
ChangeClientNick Method
ChangeClientPersonalDataConsent Method
ChangeClientPhones Method
ChangeClientReceivesNotifications Method
ChangeClientSurname Method
ChangeComboAmount Method
ChangeComboPrice Method
ChangeCookingPriority Method
ChangeDeliveryActualDeliverTime Method
ChangeDeliveryAddress Method
ChangeDeliveryComment Method
ChangeDeliveryConfirmTime Method
ChangeDeliveryCourier Method
ChangeDeliveryCustomApiData Method
ChangeDeliveryDuration Method
ChangeDeliveryEmail Method
ChangeDeliveryExpectedDeliverTime Method
ChangeDeliveryLastDefaultTerminalDeliveryDurationInMinutes Method
ChangeDeliveryLastVerifiedRestrictionsHash Method
ChangeDeliveryLocation Method
ChangeDeliveryMarketingSource Method
ChangeDeliveryOperator Method
ChangeDeliveryOrderPredictedCookingCompleteTime Method
ChangeDeliveryPhone Method
ChangeDeliveryPredictedDeliveryTime Method
ChangeDeliveryProblemComment Method
ChangeDeliveryProblemStatus Method
ChangeDeliverySplitBetweenPersons Method
ChangeEstimatedOrderGuestsCount Method
ChangeExternalPaymentItemCustomData Method
ChangeOrderAppliedIikoCard5ManualConditions Method
ChangeOrderCookingItemAmount Method
ChangeOrderCookingItemCourse Method
ChangeOrderCookingItemSize Method
ChangeOrderIikoCard5Coupon Method
ChangeOrderItemComment Method
ChangeOrderItemWaiter Method
ChangeOrderModifierItemAmount Method
ChangeOrderOriginName Method
ChangeOrderPricingTime Method
ChangeOrderTables Method
ChangeOrderWaiter Method
ChangePaymentItemCustomData Method
ChangePaymentItemSum Method
ChangePreliminaryPaymentItemCustomData Method
ChangePreliminaryPaymentItemSum Method
ChangePriceCategory Method
ChangeReserveComment Method
ChangeReserveDuration Method
ChangeReserveEstimatedStartTime Method
ChangeReserveGuestsCount Method
ChangeReserveReminder Method
ChangeReserveTable Method
ChangeReserveTables Method
ChangeSelectiveDiscount Method
ChangeStreetName Method
CreateBanquet Method
CreateClient Method
CreateReserve Method
CreateStreet Method
DeleteDiscount Method
DeleteExternalPaymentItem Method
DeleteOrderCombo Method
DeleteOrderExternalData Method
DeleteOrderGuest Method
DeleteOrderItem Method
DeleteOrderItemComment Method
DeleteOrderModifierItem Method
DeleteOrRestoreStreet Method
DeletePaymentItem Method
DeletePreliminaryPaymentItem Method
DeletePrintedOrderItem Method
DeletePrintedOrderModifierItem Method
ExecuteContinuousOperation Method
GetProductGroupMenuBitmap Method
GetProductGroupMenuImage Method
GetProductMenuBitmap Method
GetProductMenuImage Method
GroupOrderCookingItems Method
MoveOrderItemToAnotherGuest Method
MoveOrderItemToAnotherOrder Method
RegisterBillChequeTaskResolver Method
RegisterExternalOperation(TRequest, TResponse) Method
RenameOrderGuest Method
ReopenReserve Method
ResetIsPrintedDeliveryBillActual Method
ResetPriceCategory Method
ServeOrderCookingItem Method
SetDeliveryConfirmed Method
SetDeliveryCustomerAuthorizedInIikoBiz Method
SetDeliveryCustomerAuthorizedInIikoNet Method
SetDeliveryDelivered Method
SetDeliveryUnconfirmed Method
SetDeliveryUndelivered Method
SetOpenPrice Method
SetOrderType Method
SplitOrderCookingItem Method
StartBanquet Method
UngroupOrderCookingItems Method
UnserveOrderCookingItem Method
UpdateOrderComboItems Method

# OperationServiceExtensions CallExternalOperation TRequest, TResponse Method

Calls an operation which is implemented in another plugin.

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

    public static TResponse CallExternalOperation<TRequest, TResponse>(
    	this IOperationService operationService,
    	string serviceName,
    	string operationName,
    	TRequest request,
    	SerializationBinder binder = null,
    	ISurrogateSelector surrogateSelector = null
    )

#### Parameters

operationService
  Type: Resto.Front.Api
  IOperationService
  Operation service.
serviceName
  Type: System
  String
  Name of the external service which is implemented in another plugin. That name have to be pre-shared with consumer plugins.
operationName
  Type: System
  String
  Name of the external operation which is implemented in another plugin and have been registered using RegisterExternalOperation
  TRequest, TResponse
  (IOperationService, String, String, Func
  TRequest, TResponse
  , SerializationBinder, ISurrogateSelector). That name have to be pre-shared between producer and consumer plugins.
request
  Type: TRequest
  The data which will be transferred as an incoming argument into the external operation.
binder (Optional)
  Type: System.Runtime.Serialization
  SerializationBinder
  A serialization binder for custom mapping between types and names. Default is null.
surrogateSelector (Optional)
  Type: System.Runtime.Serialization
  ISurrogateSelector
  The ISurrogateSelector to use for serialization. Default is null.

#### Type Parameters

TRequest
TResponse

#### Return Value

Type: TResponse
Response returned by the producer plugin.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IOperationService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions

Exception | Condition
--- | ---
ExternalOperationFailedException | When an external operation throws any kind of exception, caller receives the ExternalOperationFailedException with original message. Orignal stacktrace can be found in api.log.

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
TRequest, TResponse
(IOperationService, String, String, Func
TRequest, TResponse
, SerializationBinder, ISurrogateSelector) and consumer plugin call it using CallExternalOperation
TRequest, TResponse
(IOperationService, String, String, TRequest, SerializationBinder, ISurrogateSelector).
See Also

#### Reference

OperationServiceExtensions Class
Resto.Front.Api.Extensions Namespace
OperationServiceExtensions
RegisterExternalOperation
TRequest, TResponse
(IOperationService, String, String, Func
TRequest, TResponse
, SerializationBinder, ISurrogateSelector)