NPKTools.Optimizer.PpmTargetParser 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package NPKTools.Optimizer.PpmTargetParser --version 1.0.1                
NuGet\Install-Package NPKTools.Optimizer.PpmTargetParser -Version 1.0.1                
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="NPKTools.Optimizer.PpmTargetParser" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NPKTools.Optimizer.PpmTargetParser --version 1.0.1                
#r "nuget: NPKTools.Optimizer.PpmTargetParser, 1.0.1"                
#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 NPKTools.Optimizer.PpmTargetParser as a Cake Addin
#addin nuget:?package=NPKTools.Optimizer.PpmTargetParser&version=1.0.1

// Install NPKTools.Optimizer.PpmTargetParser as a Cake Tool
#tool nuget:?package=NPKTools.Optimizer.PpmTargetParser&version=1.0.1                

NPKTools.Optimizer.PpmTargetParser

The NPKTools.Optimizer.PpmTargetParser project is designed as a specialized component within the NPKTools suite, aimed at interpreting and transforming user input into actionable data models. This project primarily focuses on parsing strings that represent the concentration of various elements in parts per million (ppm) and converting them into structured PpmTarget objects which can be further processed or analyzed within the system.

Developers

This tool was developed by Anatoliy Yermakov.

Special thanks to Artem Frolov for his invaluable assistance and guidance in the development of this project.

License:

This project is licensed under the MIT License.

Installation and Configuration

This section guides you through setting up and configuring the necessary components for the project using Dependency Injection (DI).

Direct Instantiation

To manually instantiate the components without using DI, use the following example:

using NPKTools.Optimizer.PpmTargetParser;
using NPKTools.Core.Domain.PpmTarget;

// Manually creating an instance of PpmTargetParser without DI
PpmTargetParser ppmTargetParser = new PpmTargetParser();

Using Dependency Injection For integrating these components into a project that supports Dependency Injection, such as an ASP.NET Core application, configure your services in the Startup.cs or a similar configuration file as follows:

public void ConfigureServices(IServiceCollection services)
{
// Registering services in the DI container
    services.AddSingleton<IPpmTargetParser, PpmTargetParser>();
}

Example usage

 string input = "N=150, P=50, K=200, Ca=40, Mg=30";
 try
 {
    PpmTarget target = ppmTargetParser.Parse(input);
    Console.WriteLine("Parsing successful! Target values are set.");
 }
 catch (Exception ex)
 {
    Console.WriteLine($"Error parsing input: {ex.Message}");
 }

Dependencies

NPKTools.Optimizer.PpmTargetParser.Tests

Contact Information:

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. 
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
1.0.4 111 5/14/2024
1.0.3 130 5/14/2024
1.0.1 112 5/3/2024
1.0.0 92 5/2/2024

- HotFix return empty solution and solutions