Syrve POS API SDK

Folder structure

Overview

Each plugin is installed in its own folder within the Plugins folder (V6+). One folder ‒ one plugin. At least two files must be in the folder: a plugin DLL file and Manifest.xml. Along with these files, the plugin folder and subfolders may include additional libraries, configuration files, resources, and others.

The Syrve POS app receives complete details on the plugin from the Manifest.xml file.

Syrve POS API contract files (Resto.Front.Api.Vx.dll, Resto.Front.Api.Vx.xml) are needed only during plugin development and compilation phase, they should not be distributed and installed with the plugin, in runtime contracts will be used from Syrve POS application folder directly. At connecting the contracts to the project via direct link to the dll-file should be set to Copy Local = False. When NuGet-packege is connected via PackageReference for versions before V7Preview2 copying needs to be disabled via <PrivateAssets>all</PrivateAssets> (description), beginning with V7Preview2 copying is automatically deactivated.

Manifest.xml file structure

Required Parameters

Additional Parameters

Outdated Approach for V4/V5

V5 API and earlier versions used another approach that implied several DLL files to be placed in the plugin folder (the plugin and its dependencies). Syrve POS scanned all such DLLs to find the class that implemen IFrontPlugin marker interface and read additional parameters from the found class attributes. This approach had a number of shortcomings and, starting from V6, the manifest was used instead. The manifest is required for V6, but V4/V5 API versions support both: if there is no manifest, DLL files are scanned, but if there is the Manifest.xml file, it is used to read the data. The approach that implies the use of the manifest file is more reliable and works faster than scanning DLL files, therefore, it is recommended that this optional file is added to the V4/V5 plugin folders.

However, V4/V5 plugins must hold to the contract terms and specify attributes for the scanning even if the manifest is used. As manifests are supported starting from Syrve POS version 6.4, earlier versions would always scan DLL files regardless of the manifest availability.

Examples

<?xml version="1.0" encoding="utf-8" ?>
<Manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema ../Binaries/syrve/Manifest.xsd">
  <FileName>Resto.Front.Api.SamplePlugin.dll</FileName>
  <TypeName>Resto.Front.Api.SamplePlugin.SamplePlugin</TypeName>
  <ApiVersion>V6</ApiVersion>
  <LicenseModuleId>21005108</LicenseModuleId>
</Manifest>

This example, as well as the Manifest.xsd file scheme, can be found in the Syrve POS API SDK offline package Syrve POS API SDK.