BatchSharp 0.2.2
dotnet add package BatchSharp --version 0.2.2
NuGet\Install-Package BatchSharp -Version 0.2.2
<PackageReference Include="BatchSharp" Version="0.2.2" />
<PackageVersion Include="BatchSharp" Version="0.2.2" />
<PackageReference Include="BatchSharp" />
paket add BatchSharp --version 0.2.2
#r "nuget: BatchSharp, 0.2.2"
#:package BatchSharp@0.2.2
#addin nuget:?package=BatchSharp&version=0.2.2
#tool nuget:?package=BatchSharp&version=0.2.2
BatchSharp
BatchSharp is a simple framework for batch application. This is inspired from Spring Batch.
Getting Started
BatchSharp can be installed using the Nuget package manager or the dotnet CLI.
Package Manager
Install-Package BatchSharpdotnet CLI
dotnet add package BatchSharp
Using BatchSharp
Create the main class
using BatchSharp; using BatchSharp.Example; using BatchSharp.Example.Processor; using BatchSharp.Example.Reader; using BatchSharp.Example.Writer; using BatchSharp.Processor; using BatchSharp.Reader; using BatchSharp.Writer; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var builder = Host.CreateDefaultBuilder(args) .ConfigureHostConfiguration(builder => { builder.AddBatchConfiguration(); }) .ConfigureServices((_, services) => { services.AddHostedService<BatchHostedService>() .AddScoped<IBatchApplication, ExampleBatchApplication>() .AddScoped<IReader<string>, ExampleReader>(); services.AddScoped<IProcessor<string, int>, ExampleProcessor>(); services.AddScoped<IWriter<int>, ExampleWriter>(); services.AddScoped<IStep, SimpleStep<string, int>>(); services.AddScoped<IStepState, StepState>(); }); var app = builder.Build(); await app.RunAsync();Add the batch application endpoint
Configure batch application input and output type.
Add the class of application endpoint that extend
DefaultBatchApplicationclass. First type parameter is input type, second type parameter is output type.IReaderis used to read input data.IProcessoris used to process input data.IWriteris used to write output data. These class are injected by DI container.public class ExampleBatchApplication : DefaultBatchApplication<string, int> { public ExampleBatchApplication( ILogger<ExampleBatchApplication> logger, IStep step) : base(logger, step) { } }
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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 is compatible. 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. |
-
net6.0
- Microsoft.Extensions.Hosting (>= 8.0.0)
-
net7.0
- Microsoft.Extensions.Hosting (>= 8.0.0)
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 |
|---|---|---|
| 0.2.2 | 167 | 7/17/2024 |
| 0.2.1 | 262 | 7/31/2023 |
| 0.2.0 | 256 | 7/26/2023 |
| 0.1.1 | 260 | 7/1/2023 |
| 0.1.1-alpha5 | 221 | 6/24/2023 |
| 0.1.1-alpha2 | 230 | 6/24/2023 |
| 0.1.1-alpha-1 | 214 | 6/24/2023 |
| 0.1.0 | 309 | 6/14/2023 |