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.
#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 206 6/6/2024
1.4.0 533 10/18/2023
1.3.9 154 10/18/2023
1.3.8 477 9/23/2022
1.3.7 471 9/22/2022
1.3.6 802 3/4/2022
1.3.5 476 2/23/2022
1.3.4 583 2/2/2022
1.3.3 486 2/2/2022
1.3.2 488 2/2/2022
1.3.1 502 1/25/2022
1.3.0 480 1/25/2022
1.2.9 488 1/25/2022
1.2.7 463 1/24/2022
1.2.6 468 1/24/2022
1.2.5 453 1/24/2022
1.2.4 474 1/24/2022
1.2.3 465 1/22/2022
1.2.2 445 1/21/2022
1.2.1 465 1/20/2022
1.2.0 474 1/18/2022
1.1.9 493 1/18/2022
1.1.8 463 1/18/2022
1.1.7 468 1/17/2022
1.1.6 471 1/17/2022
1.1.5 334 12/27/2021
1.1.4 292 12/27/2021
1.1.3 318 12/27/2021
1.1.2 317 12/26/2021
1.1.1 301 12/26/2021
1.1.0 312 12/26/2021
1.0.9 303 12/26/2021
1.0.8 325 12/13/2021
1.0.7 337 12/13/2021
1.0.6 330 12/13/2021
1.0.5 340 12/10/2021
1.0.4 325 12/10/2021
1.0.3 328 12/10/2021
1.0.2 312 12/10/2021
1.0.1 329 12/10/2021
1.0.0 324 12/10/2021