EncoreBilisim.VisionSecurity 2.0.0

dotnet add package EncoreBilisim.VisionSecurity --version 2.0.0
                    
NuGet\Install-Package EncoreBilisim.VisionSecurity -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EncoreBilisim.VisionSecurity" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EncoreBilisim.VisionSecurity" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EncoreBilisim.VisionSecurity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EncoreBilisim.VisionSecurity --version 2.0.0
                    
#r "nuget: EncoreBilisim.VisionSecurity, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EncoreBilisim.VisionSecurity@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EncoreBilisim.VisionSecurity&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=EncoreBilisim.VisionSecurity&version=2.0.0
                    
Install as a Cake Tool

Encore Vision Security

Client library for the SaiGroups Vision Security API (.NET 8, trim/AOT compatible). One process = one self-checkout lane.

dotnet add package EncoreBilisim.VisionSecurity

Setup

using Encore.VisionSecurity.Common.Configuration;
using Encore.VisionSecurity.Common.Primitives;

services
    .AddVisionSecurity(options =>
    {
        options.BaseAddress = new Uri("http://vision-security.store.local:8080");
        options.Lane = Lane.Parse(3);
        options.StoreNumber = StoreNumber.Parse("1042"); // optional
    })
    .AddEventQueue()                                      // POS -> AI, ordered, non-blocking
    .AddFeed<MyAlertHandler, MyNotificationHandler>();    // AI -> POS, polled in the background

Which entry point

You are… Use
sending POS flow events (tx-start, scan, scan-info, ui-state, tx-end, …) IVisionSecurityEventQueue — synchronous, keeps wire order, never blocks the POS thread, stamps Ts at enqueue
answering alerts / notifications from the AI IAlertHandler / INotificationHandler, registered with .AddFeed<,>(); the feed sends the feedback for you
calling one endpoint and awaiting its result (tools, diagnostics, tests) IVisionSecurityClient — async, returns VisionSecurityResult<T>

Sending events

using Encore.VisionSecurity.Contracts;
using Encore.VisionSecurity.EventQueue;

var queue = provider.GetRequiredService<IVisionSecurityEventQueue>();

queue.TxStart(txId);                                   // every call returns immediately
queue.Scan(txId, Barcode.Parse("8690504010012"), ScanType.Product, ScanMode.Regular, mobileScan: false);
queue.ScanInfo(txId, Barcode.Parse("8690504010012"), "Milk 1L", 32.50m, quantity: 1, weight: 0m, voided: false, scanType: ScanInfoScanType.Product);
queue.UiState(txId, UiState.Payment);
queue.TxEnd(txId, EndType.Complete);

The return value is the enqueue result: Failure(ValidationError) means the request was invalid (rejected immediately), the queue is full, or the queue is stopped. Send outcomes are reported through ILogger<VisionSecurityEventQueue> and the encore.visionsecurity.eventqueue.* metrics. The queue is in-memory: pending events are lost if the process dies.

TxId is yours to supply — derive it from the POS receipt identity so logs on both sides correlate. Only one transaction may be open per lane; the queue does not enforce this.

Handling alerts

public sealed class MyAlertHandler : IAlertHandler
{
    public Task<VisionSecurityResult<AlertFeedbackType>> HandleAsync(AlertResponse alert, CancellationToken ct)
        => Task.FromResult(VisionSecurityResult<AlertFeedbackType>.Success(AlertFeedbackType.NoAction));
}

Never throw from a handler; return a Failure instead. The feed still sends NO_FEEDBACK if a handler fails, so the AI side never waits on a lost alert.

Errors

Nothing throws after construction. Every operation returns VisionSecurityResult / VisionSecurityResult<T>; inspect with TryGetValue / TryGetError. Error kinds: ApiError (4xx/5xx), TransportError, TimeoutError, ParseError, ValidationError, UnknownEnumError, CancelledError, HandlerError.

Full documentation (architecture, configuration, feed flows, domain rules, library invariants) lives in the repository: README.md, docs/kurallar.md, docs/invariants.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 38 9/22/2026
1.1.1 35 9/22/2026
1.1.0 77 9/21/2026
1.0.0 65 9/21/2026