PowGrade.FileConverters.Core 0.1.0

dotnet add package PowGrade.FileConverters.Core --version 0.1.0
                    
NuGet\Install-Package PowGrade.FileConverters.Core -Version 0.1.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="PowGrade.FileConverters.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PowGrade.FileConverters.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="PowGrade.FileConverters.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PowGrade.FileConverters.Core --version 0.1.0
                    
#r "nuget: PowGrade.FileConverters.Core, 0.1.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.
#:package PowGrade.FileConverters.Core@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PowGrade.FileConverters.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=PowGrade.FileConverters.Core&version=0.1.0
                    
Install as a Cake Tool

PowGrade.FileConverters.Core

This library provides the core interfaces and registration mechanisms for the PowGrade.FileConverters family of converters.

Features

  • IFileConverter interface for converting streams from one format to another
  • PowGrade.FileConverters.Converter as the consumer-facing conversion entry
  • Automatic discovery of attributed converters through the Core infrastructure
  • ServiceCollection extension to register converters in DI containers

Getting Started

Install the package (once published) via NuGet:

Install-Package PowGrade.FileConverters.Core

Implementing a converter

Create a class that implements IFileConverter and adorn it with FileConverterAttribute to indicate the formats it handles:

using PowGrade.FileConverters.Core;

[FileConverter("doc", "docx")]
public class MyConverter : IFileConverter
{
    public Stream Convert(Stream input)
    {
        // perform conversion
    }
}

When conversion is first requested, the Core infrastructure automatically scans loaded assemblies, instantiates each attributed converter, and caches it. In the common case no extra registration code is required.

Using dependency injection (host side)

This is intended for the application or library that hosts converter implementations. Regular consumers should prefer the static PowGrade.FileConverters.Converter entry shown below.

using PowGrade.FileConverters.Core;

services.AddFileConverter("doc", "docx", new MyConverter());

Consumer entry (recommended)

Converter is the main consumer-facing entry point:

using PowGrade.FileConverters;

using var outStream = Converter.Convert(inStream, "doc", "docx");

Contributing

Feel free to open issues or pull requests to add new converters or improve the core.

License

This project is released under the MIT License.

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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (13)

Showing the top 5 NuGet packages that depend on PowGrade.FileConverters.Core:

Package Downloads
PowGrade.FileConverters.PptxToPdf

A high-performance .NET library for converting PPTX (PowerPoint) files to PDF with zero third-party dependencies

PowGrade.FileConverters.PptxToPdf.Cli

Package Description

PowGrade.FileConverters.DocxToPdf

A .NET library for converting DOCX files to PDF using custom PDF engine

PowGrade.FileConverters.PptxToPpt

PPTX to PPT converter

PowGrade.FileConverters.XlsxToXls

High-performance XLSX → XLS converter; part of PowGrade.FileConverters ecosystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 806 4/30/2026