ExtensionPackageRef Class#
Parses and formats the reference strings stored in a notebook's
RequiredExtensions list.
A bare PackageId resolves to the latest available version, so older entries
authored without a version still load. A local: prefix marks an extension that
was sideloaded from disk; such entries reload from the managed directory only and are
never fetched from a NuGet feed.
public static class ExtensionPackageRef
Inheritance System.Object → ExtensionPackageRef
Methods#
Format(string, string, ExtensionSource) Method#
Formats a package id, optional version, and source into a reference string.
public static string Format(string id, string? version, Verso.Extensions.Marketplace.ExtensionSource source=Verso.Extensions.Marketplace.ExtensionSource.NuGet);
Parameters#
version System.String
source ExtensionSource
Returns#
Parse(string) Method#
Splits a reference into its package id, optional version, and source. NuGet package
ids never contain an @, so the first @ separates id from version. A
leading local: scheme (case-insensitive) marks the entry as a local sideload.
public static (string Id,string? Version,Verso.Extensions.Marketplace.ExtensionSource Source) Parse(string reference);
Parameters#
reference System.String
Returns#
<System.String,System.String,ExtensionSource>
ParseId(string) Method#
Returns just the package id portion of a reference, scheme and version stripped.
public static string ParseId(string reference);
Parameters#
reference System.String