Fiscal-Printer-Dotnet 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Fiscal-Printer-Dotnet --version 1.0.0
                    
NuGet\Install-Package Fiscal-Printer-Dotnet -Version 1.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="Fiscal-Printer-Dotnet" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fiscal-Printer-Dotnet" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Fiscal-Printer-Dotnet" />
                    
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 Fiscal-Printer-Dotnet --version 1.0.0
                    
#r "nuget: Fiscal-Printer-Dotnet, 1.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 Fiscal-Printer-Dotnet@1.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=Fiscal-Printer-Dotnet&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Fiscal-Printer-Dotnet&version=1.0.0
                    
Install as a Cake Tool

Fiscal-Printer-Dotnet

A Library with stub or wrapper of documents used for fiscal printer

Pack it

dotnet pack

Publish

dotnet nuget push /opt/Development/workspace-dotnet/Fiscal-Printer-Dotnet/bin/Debug/Fiscal-Printer-Dotnet.<Your Version>.nupkg --api-key <Your key> --source https://api.nuget.org/v3/index.json

Using it

The main scope for this project is keep a wrapper for fiscal documents.

Clean

dotnet nuget locals all --clear

Add Library

dotnet add package Fiscal-Printer-Dotnet

Consumer

The consumer or callback is used for implement two actions:

  • GetWrapper: Is called from service and hope a IWrapper implementation to process. If the return is null then the ProcessDocument is not called
  • ProcessDocument: After get the wrapper, the service call this method for process the document. You should implement here your custom action like print a document or anything.

See the example here:

using System;
using System.Collections.Generic;
using PrintQueue.Implementations;
using PrintQueue.Wrappers;
using System.Text.Json;

namespace PrintQueue.Clients {
	public class DefaultConsumer : IConsumer {

		/** Get a object converted from value	*/
		public IWrapper GetWrapper(String key, byte[] value) {
			IWrapper wrapper = null;
			if(key.Equals("document")) {
            	Document printDocument = JsonSerializer.Deserialize<Document>(value);
            	Console.WriteLine("Document: " + printDocument.invoice.document_no);
				wrapper = printDocument;
            } else if(key.Equals("report")) {
            	Report printReport = JsonSerializer.Deserialize<Report>(value);
            	Console.WriteLine("Report: " + printReport.document_type);
				wrapper = printReport;
            } else if(key.Equals("setup")) {
            	Setup printSetup = JsonSerializer.Deserialize<Setup>(value);
            	Console.WriteLine("Setup: " + printSetup.type); 
				wrapper = printSetup;
            } else {
            	Console.WriteLine("Unsupported type: " + key);    
            }
			return wrapper;
		}
		/**	Print Document	*/
		public void ProcessDocument(IWrapper document) {
			Console.WriteLine("Hi: " + document);
		}
	}
}

Final Implementartion

The service can be called from a Main method like is defined the follow:

using System;
using System.Collections.Generic;
using PrintQueue.Implementations;
using PrintQueue.Wrappers;
using System.Text.Json;
using PrintQueue.Kafka;

namespace PrintQueue.Clients {
	public class TestImplementation {

		
        public static void Main(string[] args) {
            if(args == null) {
                throw new Exception("Arguments Not Found");
            }
            //	
            if(args == null || args.Length == 0) {
                throw new Exception("Arguments Must Be: [property file name]");
            }
			DefaultConsumer defaultConsumer = new DefaultConsumer();
            // 
			KafkaConsumerService service = new KafkaConsumerService(args[0], defaultConsumer);
			service.Start();
        }
	}
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Fiscal-Printer-Dotnet:

Package Downloads
local-printing-all-in-one-dotnet

This package adds support to Fiscal Printer sing The Factory HKA and other providers

ERPCYA_TFHKA

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.1 260 6/6/2024
1.4.0 548 10/18/2023
1.3.9 164 10/18/2023
1.3.8 502 9/23/2022
1.3.7 505 9/22/2022
1.3.6 830 3/4/2022
1.3.5 507 2/23/2022
1.3.4 610 2/2/2022
1.3.3 520 2/2/2022
1.3.2 523 2/2/2022
1.3.1 528 1/25/2022
1.3.0 507 1/25/2022
1.2.9 516 1/25/2022
1.2.7 490 1/24/2022
1.2.6 495 1/24/2022
1.2.5 482 1/24/2022
1.2.4 503 1/24/2022
1.2.3 492 1/22/2022
1.2.2 473 1/21/2022
1.2.1 494 1/20/2022
1.2.0 501 1/18/2022
1.1.9 527 1/18/2022
1.1.8 492 1/18/2022
1.1.7 496 1/17/2022
1.1.6 498 1/17/2022
1.1.5 362 12/27/2021
1.1.4 320 12/27/2021
1.1.3 345 12/27/2021
1.1.2 344 12/26/2021
1.1.1 329 12/26/2021
1.1.0 339 12/26/2021
1.0.9 330 12/26/2021
1.0.8 352 12/13/2021
1.0.7 365 12/13/2021
1.0.6 361 12/13/2021
1.0.5 367 12/10/2021
1.0.4 352 12/10/2021
1.0.3 355 12/10/2021
1.0.2 341 12/10/2021
1.0.1 356 12/10/2021
1.0.0 352 12/10/2021