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 108 6/6/2024
1.4.0 466 10/18/2023
1.3.9 109 10/18/2023
1.3.8 411 9/23/2022
1.3.7 403 9/22/2022
1.3.6 708 3/4/2022
1.3.5 396 2/23/2022
1.3.4 498 2/2/2022
1.3.3 394 2/2/2022
1.3.2 401 2/2/2022
1.3.1 427 1/25/2022
1.3.0 400 1/25/2022
1.2.9 408 1/25/2022
1.2.7 385 1/24/2022
1.2.6 385 1/24/2022
1.2.5 380 1/24/2022
1.2.4 390 1/24/2022
1.2.3 388 1/22/2022
1.2.2 367 1/21/2022
1.2.1 388 1/20/2022
1.2.0 394 1/18/2022
1.1.9 402 1/18/2022
1.1.8 386 1/18/2022
1.1.7 387 1/17/2022
1.1.6 392 1/17/2022
1.1.5 257 12/27/2021
1.1.4 217 12/27/2021
1.1.3 236 12/27/2021
1.1.2 240 12/26/2021
1.1.1 225 12/26/2021
1.1.0 233 12/26/2021
1.0.9 224 12/26/2021
1.0.8 250 12/13/2021
1.0.7 254 12/13/2021
1.0.6 249 12/13/2021
1.0.5 260 12/10/2021
1.0.4 248 12/10/2021
1.0.3 237 12/10/2021
1.0.2 233 12/10/2021
1.0.1 252 12/10/2021
1.0.0 250 12/10/2021