DropBear.Preflight.Core 1.0.0-build

This is a prerelease version of DropBear.Preflight.Core.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DropBear.Preflight.Core --version 1.0.0-build
NuGet\Install-Package DropBear.Preflight.Core -Version 1.0.0-build
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="DropBear.Preflight.Core" Version="1.0.0-build" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DropBear.Preflight.Core --version 1.0.0-build
#r "nuget: DropBear.Preflight.Core, 1.0.0-build"
#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 DropBear.Preflight.Core as a Cake Addin
#addin nuget:?package=DropBear.Preflight.Core&version=1.0.0-build&prerelease

// Install DropBear.Preflight.Core as a Cake Tool
#tool nuget:?package=DropBear.Preflight.Core&version=1.0.0-build&prerelease

Preflight Core

Preflight.Core is a .NET library that provides an easy-to-use preflight manager.

Features

  • Simple API for adding tasks to the preflight manager.

Installation

You can add Preflight.Core to your project by using the NuGet package manager in Visual Studio, or by using the dotnet add package command in the .NET CLI:

dotnet add package DropBear.Preflight.Core

Usage

First, register the Preflight.Core services in your Startup.cs file:

public void ConfigureServices(IServiceCollection services)
{
    // Other service configuration...

    services.AddPreflightCore();
}

Then, you can inject and use IPreflightManager in your classes:

public class MyClass
{
    private readonly IPreflightManager _preflightManager;

    public MyClass(IPreflightManager preflightManager)
    {
        _preflightManager = preflightManager;
    }

    public async Task MyMethod()
    {
        var manager = new PreflightManager(config, logger);
        manager.AddTask(new ExampleTask(logger));
    }

    public class ExampleTask : PreflightTask
    {
        private ILogger<ExampleTask> logger;

        public ExampleTask(ILogger<ExampleTask> logger)
        {
            this.logger = logger;
        }

        public override async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            try
            {
                // Log the start of the task
                logger.LogInformation("Starting ExampleTask");

                // Do some work...

                // Log the completion of the task
                logger.LogInformation("Completed ExampleTask");

                // Markthe task as completed
                MarkAsCompleted();
            }
            catch (Exception ex)
            {
                // Log the error
                logger.LogError(ex, "Error executing ExampleTask");

                throw;
            }
        }
    }
}

Documentation

For more detailed documentation, please see the official documentation.

Contributing

We welcome contributions! Please see our contributing guide for details.

License

Preflight.Core is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET 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. 
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

Released under MIT license.