ArgonFetch.Abstractions 1.0.1

dotnet add package ArgonFetch.Abstractions --version 1.0.1
                    
NuGet\Install-Package ArgonFetch.Abstractions -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="ArgonFetch.Abstractions" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArgonFetch.Abstractions" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ArgonFetch.Abstractions" />
                    
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 ArgonFetch.Abstractions --version 1.0.1
                    
#r "nuget: ArgonFetch.Abstractions, 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.
#:package ArgonFetch.Abstractions@1.0.1
                    
#: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=ArgonFetch.Abstractions&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ArgonFetch.Abstractions&version=1.0.1
                    
Install as a Cake Tool

ArgonFetch.Abstractions

Everything you need to write an ArgonFetch source plugin, and nothing else.

yt-dlp is what fetches things the ordinary way. A plugin exists for links that need something else first: one that has to become a different link before anything can be downloaded, one that lists a collection, or one that a separate piece of code fetches on its own.

[assembly: ArgonFetchPlugin("example", ArgonFetchPluginAttribute.CurrentAbi, Name = "Example")]

public sealed class ExampleProvider : ISourceProvider
{
    public string Id => "example";

    public bool CanHandle(Uri url) => url.Host.EndsWith("example.com");

    public async Task<ProviderOutcome> PrepareAsync(Uri url, IProviderContext ctx, CancellationToken ct)
    {
        var real = await FindRealUrl(url, ctx, ct);

        return ProviderOutcome.Rewrite(real, new MediaTags("Title", "Artist"));
    }
}

Reference this without shipping it

<PackageReference Include="ArgonFetch.Abstractions" Version="1.0.0" ExcludeAssets="runtime" />

ExcludeAssets="runtime" matters. The host loads this assembly and hands your plugin types from its own copy. A plugin that carries its own copy gets a second, unrelated ISourceProvider, and the load fails complaining that ISourceProvider cannot be cast to ISourceProvider.

Rules worth knowing before you write one

  • CanHandle is asked of every installed plugin on every request. Keep it to inspecting the URL: no network, no throwing, no waiting.
  • Return raw addresses in MediaStream. Caching them, hiding them behind keys and building the URLs a client sees is the host's business, and it changes.
  • Cache through IProviderContext.CacheKey, never a bare string - the cache is shared.

MIT licensed, so what you write with it is yours to license as you please.

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

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.1 107 8/26/2026
1.0.0 103 8/26/2026