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.
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.
// Install Fiscal-Printer-Dotnet as a Cake Addin
#addin nuget:?package=Fiscal-Printer-Dotnet&version=1.0.0

// Install Fiscal-Printer-Dotnet as a Cake Tool
#tool nuget:?package=Fiscal-Printer-Dotnet&version=1.0.0                

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. 
.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 142 6/6/2024
1.4.0 511 10/18/2023
1.3.9 133 10/18/2023
1.3.8 428 9/23/2022
1.3.7 422 9/22/2022
1.3.6 750 3/4/2022
1.3.5 418 2/23/2022
1.3.4 524 2/2/2022
1.3.3 421 2/2/2022
1.3.2 424 2/2/2022
1.3.1 447 1/25/2022
1.3.0 420 1/25/2022
1.2.9 428 1/25/2022
1.2.7 405 1/24/2022
1.2.6 408 1/24/2022
1.2.5 398 1/24/2022
1.2.4 411 1/24/2022
1.2.3 407 1/22/2022
1.2.2 391 1/21/2022
1.2.1 408 1/20/2022
1.2.0 414 1/18/2022
1.1.9 428 1/18/2022
1.1.8 406 1/18/2022
1.1.7 410 1/17/2022
1.1.6 412 1/17/2022
1.1.5 278 12/27/2021
1.1.4 237 12/27/2021
1.1.3 257 12/27/2021
1.1.2 262 12/26/2021
1.1.1 245 12/26/2021
1.1.0 254 12/26/2021
1.0.9 245 12/26/2021
1.0.8 270 12/13/2021
1.0.7 275 12/13/2021
1.0.6 268 12/13/2021
1.0.5 280 12/10/2021
1.0.4 269 12/10/2021
1.0.3 270 12/10/2021
1.0.2 253 12/10/2021
1.0.1 272 12/10/2021
1.0.0 269 12/10/2021